6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit a5750735

AuthorEdmir Suljic<esu@dwarf.dk>
Date2026-03-03 13:42:18 +0100
tracking stuff

Changed files

.../ios/Runner.xcodeproj/project.pbxproj           |  18 +-
 .../xcshareddata/xcschemes/Stage.xcscheme          |   6 +
 .../lib/.generated/domain/models/user.freezed.dart |  39 ++--
 .../tracking/models/analytics_event_item.g.dart    |  10 +-
 .../lib/check_out/bloc/check_out_cubit.dart        |  13 +-
 comwell_key_app/lib/domain/models/user.dart        |   1 -
 .../lib/housekeeping/cubit/housekeeping_cubit.dart |   7 +-
 .../components/balance_bottom_sheet.dart           | 252 ---------------------
 .../lib/my_booking/cubit/my_booking_cubit.dart     |   2 +-
 .../lib/my_booking/my_booking_route.dart           |   7 -
 .../my_booking/pages/my_booking_payment_page.dart  |  69 ------
 .../screens/check_in/bloc/check_in_cubit.dart      |   9 +-
 .../pregistration/cubit/preregistration_cubit.dart |  29 +--
 .../bloc/profile_settings_cubit.dart               |   3 +-
 .../components/date_time_picker.dart               |   4 +-
 .../profile_settings/profile_settings_screen.dart  |   2 +
 comwell_key_app/lib/routing/app_routes.dart        |   1 -
 .../lib/routing/go_router_observer.dart            |   2 +
 .../lib/services/mappers/user_mapper.dart          |   5 +-
 .../lib/tracking/models/analytics_event_item.dart  |  16 +-
 .../lib/tracking/trackers/firebase_tracker.dart    |   1 +
 21 files changed, 73 insertions(+), 423 deletions(-)

Diff

diff --git a/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj b/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj
index 04bccdf3..e39c19aa 100644
--- a/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj
+++ b/comwell_key_app/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 60;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@@ -204,8 +204,8 @@
);
mainGroup = 97C146E51CF9000F007C117D;
packageReferences = (
- 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
- 60BC597B2DEF216C00031449 /* XCLocalSwiftPackageReference "../../mobilekeys_sdk_plugin/ios/seos_mobile_keys_plugin" */,
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
+ 60BC597B2DEF216C00031449 /* XCLocalSwiftPackageReference "seos_mobile_keys_plugin" */,
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
@@ -328,14 +328,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
- inputPaths = (
- );
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
- outputPaths = (
- );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
@@ -349,14 +345,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
- inputPaths = (
- );
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
- outputPaths = (
- );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
@@ -1128,11 +1120,11 @@
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
- 60BC597B2DEF216C00031449 /* XCLocalSwiftPackageReference "../../mobilekeys_sdk_plugin/ios/seos_mobile_keys_plugin" */ = {
+ 60BC597B2DEF216C00031449 /* XCLocalSwiftPackageReference "seos_mobile_keys_plugin" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../../mobilekeys_sdk_plugin/ios/seos_mobile_keys_plugin;
};
- 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
diff --git a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Stage.xcscheme b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Stage.xcscheme
index e0b155b7..22e6e5d2 100644
--- a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Stage.xcscheme
+++ b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Stage.xcscheme
@@ -70,6 +70,12 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
+ <CommandLineArguments>
+ <CommandLineArgument
+ argument = "-FIRDebugEnabled"
+ isEnabled = "YES">
+ </CommandLineArgument>
+ </CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
diff --git a/comwell_key_app/lib/.generated/domain/models/user.freezed.dart b/comwell_key_app/lib/.generated/domain/models/user.freezed.dart
index 123b2609..0fbcd074 100644
--- a/comwell_key_app/lib/.generated/domain/models/user.freezed.dart
+++ b/comwell_key_app/lib/.generated/domain/models/user.freezed.dart
@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$User {
- String get userId; String get hmsId; String get firstName; String get lastName; String get addressCountry; String get phoneNumber; String get email; String get shopperReference; String get gender; String get companyId; String get companyName; String get symplifyId; String get signUpCampaign; String get signUpSource; String get locale; String get nationality; bool get emailVerified; bool get isClubMember; bool get wasRecentlyCreated; Address get address; int get points; DateTime? get birthDate; DateTime? get createDate; DateTime? get signUpDate;
+ String get userId; String get hmsId; String get firstName; String get lastName; String get phoneNumber; String get email; String get shopperReference; String get gender; String get companyId; String get companyName; String get symplifyId; String get signUpCampaign; String get signUpSource; String get locale; String get nationality; bool get emailVerified; bool get isClubMember; bool get wasRecentlyCreated; Address get address; int get points; DateTime? get birthDate; DateTime? get createDate; DateTime? get signUpDate;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -25,16 +25,16 @@ $UserCopyWith<User> get copyWith => _$UserCopyWithImpl<User>(this as User, _$ide
@override
bool operator ==(Object other) {
- return identical(this, other) || (other.runtimeType == runtimeType&&other is User&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.hmsId, hmsId) || other.hmsId == hmsId)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.addressCountry, addressCountry) || other.addressCountry == addressCountry)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.email, email) || other.email == email)&&(identical(other.shopperReference, shopperReference) || other.shopperReference == shopperReference)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.companyName, companyName) || other.companyName == companyName)&&(identical(other.symplifyId, symplifyId) || other.symplifyId == symplifyId)&&(identical(other.signUpCampaign, signUpCampaign) || other.signUpCampaign == signUpCampaign)&&(identical(other.signUpSource, signUpSource) || other.signUpSource == signUpSource)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.nationality, nationality) || other.nationality == nationality)&&(identical(other.emailVerified, emailVerified) || other.emailVerified == emailVerified)&&(identical(other.isClubMember, isClubMember) || other.isClubMember == isClubMember)&&(identical(other.wasRecentlyCreated, wasRecentlyCreated) || other.wasRecentlyCreated == wasRecentlyCreated)&&(identical(other.address, address) || other.address == address)&&(identical(other.points, points) || other.points == points)&&(identical(other.birthDate, birthDate) || other.birthDate == birthDate)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.signUpDate, signUpDate) || other.signUpDate == signUpDate));
+ return identical(this, other) || (other.runtimeType == runtimeType&&other is User&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.hmsId, hmsId) || other.hmsId == hmsId)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.email, email) || other.email == email)&&(identical(other.shopperReference, shopperReference) || other.shopperReference == shopperReference)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.companyName, companyName) || other.companyName == companyName)&&(identical(other.symplifyId, symplifyId) || other.symplifyId == symplifyId)&&(identical(other.signUpCampaign, signUpCampaign) || other.signUpCampaign == signUpCampaign)&&(identical(other.signUpSource, signUpSource) || other.signUpSource == signUpSource)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.nationality, nationality) || other.nationality == nationality)&&(identical(other.emailVerified, emailVerified) || other.emailVerified == emailVerified)&&(identical(other.isClubMember, isClubMember) || other.isClubMember == isClubMember)&&(identical(other.wasRecentlyCreated, wasRecentlyCreated) || other.wasRecentlyCreated == wasRecentlyCreated)&&(identical(other.address, address) || other.address == address)&&(identical(other.points, points) || other.points == points)&&(identical(other.birthDate, birthDate) || other.birthDate == birthDate)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.signUpDate, signUpDate) || other.signUpDate == signUpDate));
}
@override
-int get hashCode => Object.hashAll([runtimeType,userId,hmsId,firstName,lastName,addressCountry,phoneNumber,email,shopperReference,gender,companyId,companyName,symplifyId,signUpCampaign,signUpSource,locale,nationality,emailVerified,isClubMember,wasRecentlyCreated,address,points,birthDate,createDate,signUpDate]);
+int get hashCode => Object.hashAll([runtimeType,userId,hmsId,firstName,lastName,phoneNumber,email,shopperReference,gender,companyId,companyName,symplifyId,signUpCampaign,signUpSource,locale,nationality,emailVerified,isClubMember,wasRecentlyCreated,address,points,birthDate,createDate,signUpDate]);
@override
String toString() {
- return 'User(userId: $userId, hmsId: $hmsId, firstName: $firstName, lastName: $lastName, addressCountry: $addressCountry, phoneNumber: $phoneNumber, email: $email, shopperReference: $shopperReference, gender: $gender, companyId: $companyId, companyName: $companyName, symplifyId: $symplifyId, signUpCampaign: $signUpCampaign, signUpSource: $signUpSource, locale: $locale, nationality: $nationality, emailVerified: $emailVerified, isClubMember: $isClubMember, wasRecentlyCreated: $wasRecentlyCreated, address: $address, points: $points, birthDate: $birthDate, createDate: $createDate, signUpDate: $signUpDate)';
+ return 'User(userId: $userId, hmsId: $hmsId, firstName: $firstName, lastName: $lastName, phoneNumber: $phoneNumber, email: $email, shopperReference: $shopperReference, gender: $gender, companyId: $companyId, companyName: $companyName, symplifyId: $symplifyId, signUpCampaign: $signUpCampaign, signUpSource: $signUpSource, locale: $locale, nationality: $nationality, emailVerified: $emailVerified, isClubMember: $isClubMember, wasRecentlyCreated: $wasRecentlyCreated, address: $address, points: $points, birthDate: $birthDate, createDate: $createDate, signUpDate: $signUpDate)';
}
@@ -45,7 +45,7 @@ abstract mixin class $UserCopyWith<$Res> {
factory $UserCopyWith(User value, $Res Function(User) _then) = _$UserCopyWithImpl;
@useResult
$Res call({
- String userId, String hmsId, String firstName, String lastName, String addressCountry, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate
+ String userId, String hmsId, String firstName, String lastName, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate
});
@@ -62,13 +62,12 @@ class _$UserCopyWithImpl<$Res>
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
-@pragma('vm:prefer-inline') @override $Res call({Object? userId = null,Object? hmsId = null,Object? firstName = null,Object? lastName = null,Object? addressCountry = null,Object? phoneNumber = null,Object? email = null,Object? shopperReference = null,Object? gender = null,Object? companyId = null,Object? companyName = null,Object? symplifyId = null,Object? signUpCampaign = null,Object? signUpSource = null,Object? locale = null,Object? nationality = null,Object? emailVerified = null,Object? isClubMember = null,Object? wasRecentlyCreated = null,Object? address = null,Object? points = null,Object? birthDate = freezed,Object? createDate = freezed,Object? signUpDate = freezed,}) {
+@pragma('vm:prefer-inline') @override $Res call({Object? userId = null,Object? hmsId = null,Object? firstName = null,Object? lastName = null,Object? phoneNumber = null,Object? email = null,Object? shopperReference = null,Object? gender = null,Object? companyId = null,Object? companyName = null,Object? symplifyId = null,Object? signUpCampaign = null,Object? signUpSource = null,Object? locale = null,Object? nationality = null,Object? emailVerified = null,Object? isClubMember = null,Object? wasRecentlyCreated = null,Object? address = null,Object? points = null,Object? birthDate = freezed,Object? createDate = freezed,Object? signUpDate = freezed,}) {
return _then(_self.copyWith(
userId: null == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable
as String,hmsId: null == hmsId ? _self.hmsId : hmsId // ignore: cast_nullable_to_non_nullable
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
-as String,addressCountry: null == addressCountry ? _self.addressCountry : addressCountry // ignore: cast_nullable_to_non_nullable
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String,email: null == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
as String,shopperReference: null == shopperReference ? _self.shopperReference : shopperReference // ignore: cast_nullable_to_non_nullable
@@ -182,10 +181,10 @@ return $default(_that);case _:
/// }
/// ```
-@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String userId, String hmsId, String firstName, String lastName, String addressCountry, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate)? $default,{required TResult orElse(),}) {final _that = this;
+@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String userId, String hmsId, String firstName, String lastName, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _User() when $default != null:
-return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.addressCountry,_that.phoneNumber,_that.email,_that.shopperReference,_that.gender,_that.companyId,_that.companyName,_that.symplifyId,_that.signUpCampaign,_that.signUpSource,_that.locale,_that.nationality,_that.emailVerified,_that.isClubMember,_that.wasRecentlyCreated,_that.address,_that.points,_that.birthDate,_that.createDate,_that.signUpDate);case _:
+return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.phoneNumber,_that.email,_that.shopperReference,_that.gender,_that.companyId,_that.companyName,_that.symplifyId,_that.signUpCampaign,_that.signUpSource,_that.locale,_that.nationality,_that.emailVerified,_that.isClubMember,_that.wasRecentlyCreated,_that.address,_that.points,_that.birthDate,_that.createDate,_that.signUpDate);case _:
return orElse();
}
@@ -203,10 +202,10 @@ return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.ad
/// }
/// ```
-@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String userId, String hmsId, String firstName, String lastName, String addressCountry, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate) $default,) {final _that = this;
+@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String userId, String hmsId, String firstName, String lastName, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate) $default,) {final _that = this;
switch (_that) {
case _User():
-return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.addressCountry,_that.phoneNumber,_that.email,_that.shopperReference,_that.gender,_that.companyId,_that.companyName,_that.symplifyId,_that.signUpCampaign,_that.signUpSource,_that.locale,_that.nationality,_that.emailVerified,_that.isClubMember,_that.wasRecentlyCreated,_that.address,_that.points,_that.birthDate,_that.createDate,_that.signUpDate);case _:
+return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.phoneNumber,_that.email,_that.shopperReference,_that.gender,_that.companyId,_that.companyName,_that.symplifyId,_that.signUpCampaign,_that.signUpSource,_that.locale,_that.nationality,_that.emailVerified,_that.isClubMember,_that.wasRecentlyCreated,_that.address,_that.points,_that.birthDate,_that.createDate,_that.signUpDate);case _:
throw StateError('Unexpected subclass');
}
@@ -223,10 +222,10 @@ return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.ad
/// }
/// ```
-@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String userId, String hmsId, String firstName, String lastName, String addressCountry, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate)? $default,) {final _that = this;
+@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String userId, String hmsId, String firstName, String lastName, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate)? $default,) {final _that = this;
switch (_that) {
case _User() when $default != null:
-return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.addressCountry,_that.phoneNumber,_that.email,_that.shopperReference,_that.gender,_that.companyId,_that.companyName,_that.symplifyId,_that.signUpCampaign,_that.signUpSource,_that.locale,_that.nationality,_that.emailVerified,_that.isClubMember,_that.wasRecentlyCreated,_that.address,_that.points,_that.birthDate,_that.createDate,_that.signUpDate);case _:
+return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.phoneNumber,_that.email,_that.shopperReference,_that.gender,_that.companyId,_that.companyName,_that.symplifyId,_that.signUpCampaign,_that.signUpSource,_that.locale,_that.nationality,_that.emailVerified,_that.isClubMember,_that.wasRecentlyCreated,_that.address,_that.points,_that.birthDate,_that.createDate,_that.signUpDate);case _:
return null;
}
@@ -238,14 +237,13 @@ return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.ad
class _User implements User {
- const _User({this.userId = "", this.hmsId = "", this.firstName = "", this.lastName = "", this.addressCountry = "", this.phoneNumber = "", this.email = "", this.shopperReference = "", this.gender = "", this.companyId = "", this.companyName = "", this.symplifyId = "", this.signUpCampaign = "", this.signUpSource = "", this.locale = "", this.nationality = "", this.emailVerified = false, this.isClubMember = false, this.wasRecentlyCreated = false, this.address = const Address(), this.points = 0, this.birthDate, this.createDate, this.signUpDate});
+ const _User({this.userId = "", this.hmsId = "", this.firstName = "", this.lastName = "", this.phoneNumber = "", this.email = "", this.shopperReference = "", this.gender = "", this.companyId = "", this.companyName = "", this.symplifyId = "", this.signUpCampaign = "", this.signUpSource = "", this.locale = "", this.nationality = "", this.emailVerified = false, this.isClubMember = false, this.wasRecentlyCreated = false, this.address = const Address(), this.points = 0, this.birthDate, this.createDate, this.signUpDate});
@override@JsonKey() final String userId;
@override@JsonKey() final String hmsId;
@override@JsonKey() final String firstName;
@override@JsonKey() final String lastName;
-@override@JsonKey() final String addressCountry;
@override@JsonKey() final String phoneNumber;
@override@JsonKey() final String email;
@override@JsonKey() final String shopperReference;
@@ -276,16 +274,16 @@ _$UserCopyWith<_User> get copyWith => __$UserCopyWithImpl<_User>(this, _$identit
@override
bool operator ==(Object other) {
- return identical(this, other) || (other.runtimeType == runtimeType&&other is _User&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.hmsId, hmsId) || other.hmsId == hmsId)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.addressCountry, addressCountry) || other.addressCountry == addressCountry)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.email, email) || other.email == email)&&(identical(other.shopperReference, shopperReference) || other.shopperReference == shopperReference)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.companyName, companyName) || other.companyName == companyName)&&(identical(other.symplifyId, symplifyId) || other.symplifyId == symplifyId)&&(identical(other.signUpCampaign, signUpCampaign) || other.signUpCampaign == signUpCampaign)&&(identical(other.signUpSource, signUpSource) || other.signUpSource == signUpSource)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.nationality, nationality) || other.nationality == nationality)&&(identical(other.emailVerified, emailVerified) || other.emailVerified == emailVerified)&&(identical(other.isClubMember, isClubMember) || other.isClubMember == isClubMember)&&(identical(other.wasRecentlyCreated, wasRecentlyCreated) || other.wasRecentlyCreated == wasRecentlyCreated)&&(identical(other.address, address) || other.address == address)&&(identical(other.points, points) || other.points == points)&&(identical(other.birthDate, birthDate) || other.birthDate == birthDate)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.signUpDate, signUpDate) || other.signUpDate == signUpDate));
+ return identical(this, other) || (other.runtimeType == runtimeType&&other is _User&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.hmsId, hmsId) || other.hmsId == hmsId)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.email, email) || other.email == email)&&(identical(other.shopperReference, shopperReference) || other.shopperReference == shopperReference)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.companyName, companyName) || other.companyName == companyName)&&(identical(other.symplifyId, symplifyId) || other.symplifyId == symplifyId)&&(identical(other.signUpCampaign, signUpCampaign) || other.signUpCampaign == signUpCampaign)&&(identical(other.signUpSource, signUpSource) || other.signUpSource == signUpSource)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.nationality, nationality) || other.nationality == nationality)&&(identical(other.emailVerified, emailVerified) || other.emailVerified == emailVerified)&&(identical(other.isClubMember, isClubMember) || other.isClubMember == isClubMember)&&(identical(other.wasRecentlyCreated, wasRecentlyCreated) || other.wasRecentlyCreated == wasRecentlyCreated)&&(identical(other.address, address) || other.address == address)&&(identical(other.points, points) || other.points == points)&&(identical(other.birthDate, birthDate) || other.birthDate == birthDate)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.signUpDate, signUpDate) || other.signUpDate == signUpDate));
}
@override
-int get hashCode => Object.hashAll([runtimeType,userId,hmsId,firstName,lastName,addressCountry,phoneNumber,email,shopperReference,gender,companyId,companyName,symplifyId,signUpCampaign,signUpSource,locale,nationality,emailVerified,isClubMember,wasRecentlyCreated,address,points,birthDate,createDate,signUpDate]);
+int get hashCode => Object.hashAll([runtimeType,userId,hmsId,firstName,lastName,phoneNumber,email,shopperReference,gender,companyId,companyName,symplifyId,signUpCampaign,signUpSource,locale,nationality,emailVerified,isClubMember,wasRecentlyCreated,address,points,birthDate,createDate,signUpDate]);
@override
String toString() {
- return 'User(userId: $userId, hmsId: $hmsId, firstName: $firstName, lastName: $lastName, addressCountry: $addressCountry, phoneNumber: $phoneNumber, email: $email, shopperReference: $shopperReference, gender: $gender, companyId: $companyId, companyName: $companyName, symplifyId: $symplifyId, signUpCampaign: $signUpCampaign, signUpSource: $signUpSource, locale: $locale, nationality: $nationality, emailVerified: $emailVerified, isClubMember: $isClubMember, wasRecentlyCreated: $wasRecentlyCreated, address: $address, points: $points, birthDate: $birthDate, createDate: $createDate, signUpDate: $signUpDate)';
+ return 'User(userId: $userId, hmsId: $hmsId, firstName: $firstName, lastName: $lastName, phoneNumber: $phoneNumber, email: $email, shopperReference: $shopperReference, gender: $gender, companyId: $companyId, companyName: $companyName, symplifyId: $symplifyId, signUpCampaign: $signUpCampaign, signUpSource: $signUpSource, locale: $locale, nationality: $nationality, emailVerified: $emailVerified, isClubMember: $isClubMember, wasRecentlyCreated: $wasRecentlyCreated, address: $address, points: $points, birthDate: $birthDate, createDate: $createDate, signUpDate: $signUpDate)';
}
@@ -296,7 +294,7 @@ abstract mixin class _$UserCopyWith<$Res> implements $UserCopyWith<$Res> {
factory _$UserCopyWith(_User value, $Res Function(_User) _then) = __$UserCopyWithImpl;
@override @useResult
$Res call({
- String userId, String hmsId, String firstName, String lastName, String addressCountry, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate
+ String userId, String hmsId, String firstName, String lastName, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate
});
@@ -313,13 +311,12 @@ class __$UserCopyWithImpl<$Res>
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
-@override @pragma('vm:prefer-inline') $Res call({Object? userId = null,Object? hmsId = null,Object? firstName = null,Object? lastName = null,Object? addressCountry = null,Object? phoneNumber = null,Object? email = null,Object? shopperReference = null,Object? gender = null,Object? companyId = null,Object? companyName = null,Object? symplifyId = null,Object? signUpCampaign = null,Object? signUpSource = null,Object? locale = null,Object? nationality = null,Object? emailVerified = null,Object? isClubMember = null,Object? wasRecentlyCreated = null,Object? address = null,Object? points = null,Object? birthDate = freezed,Object? createDate = freezed,Object? signUpDate = freezed,}) {
+@override @pragma('vm:prefer-inline') $Res call({Object? userId = null,Object? hmsId = null,Object? firstName = null,Object? lastName = null,Object? phoneNumber = null,Object? email = null,Object? shopperReference = null,Object? gender = null,Object? companyId = null,Object? companyName = null,Object? symplifyId = null,Object? signUpCampaign = null,Object? signUpSource = null,Object? locale = null,Object? nationality = null,Object? emailVerified = null,Object? isClubMember = null,Object? wasRecentlyCreated = null,Object? address = null,Object? points = null,Object? birthDate = freezed,Object? createDate = freezed,Object? signUpDate = freezed,}) {
return _then(_User(
userId: null == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable
as String,hmsId: null == hmsId ? _self.hmsId : hmsId // ignore: cast_nullable_to_non_nullable
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
-as String,addressCountry: null == addressCountry ? _self.addressCountry : addressCountry // ignore: cast_nullable_to_non_nullable
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String,email: null == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
as String,shopperReference: null == shopperReference ? _self.shopperReference : shopperReference // ignore: cast_nullable_to_non_nullable
diff --git a/comwell_key_app/lib/.generated/tracking/models/analytics_event_item.g.dart b/comwell_key_app/lib/.generated/tracking/models/analytics_event_item.g.dart
index 95eedcaf..05c871a5 100644
--- a/comwell_key_app/lib/.generated/tracking/models/analytics_event_item.g.dart
+++ b/comwell_key_app/lib/.generated/tracking/models/analytics_event_item.g.dart
@@ -12,10 +12,10 @@ AnalyticsEventItem _$AnalyticsEventItemFromJson(Map json) => AnalyticsEventItem(
value: json['value'] as num,
placement: json['placement'] as String,
items: (json['items'] as List<dynamic>).map((e) => e as String),
- itemId: json['itemId'] as String,
- itemName: json['itemName'] as String,
- price: json['price'] as num,
- quantity: json['quantity'] as num,
+ itemIds: (json['itemIds'] as List<dynamic>).map((e) => e as String),
+ itemName: json['itemName'] as String?,
+ price: json['price'] as num?,
+ quantity: json['quantity'] as num?,
bookingReference: json['bookingReference'] as String,
);
@@ -26,7 +26,7 @@ Map<String, dynamic> _$AnalyticsEventItemToJson(AnalyticsEventItem instance) =>
'value': instance.value,
'placement': instance.placement,
'items': instance.items.toList(),
- 'itemId': instance.itemId,
+ 'itemIds': instance.itemIds.toList(),
'itemName': instance.itemName,
'price': instance.price,
'quantity': instance.quantity,
diff --git a/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart b/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
index 77f5f2c9..3d68aa78 100644
--- a/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
+++ b/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
@@ -68,12 +68,11 @@ class CheckoutCubit extends Cubit<CheckoutState> {
hotelName: booking.hotelName,
currency: "DKK",
value: booking.balance?.toInt() ?? 0,
- placement: "placement",
+ placement: "check-out",
+ itemIds: booking.addOnItems?.map((e) => e.code).toList() ?? [],
items: booking.addOnItems?.map((e) => e.description).toList() ?? [],
- itemId: "itemId",
- itemName: "itemName",
- price: booking.balance?.toInt() ?? 0,
- quantity: 1,
+ price: totalAddonPrice,
+ quantity: booking.addOnItems?.length ?? 0,
bookingReference: booking.confirmationNumber,
);
_tracking.trackBeginCheckout(analyticsEventItem);
@@ -207,4 +206,8 @@ class CheckoutCubit extends Cubit<CheckoutState> {
return balance.toInt();
}
}
+
+ int get totalAddonPrice {
+ return booking.addOnItems?.fold(0, (total, item) => total! + item.price) ?? 0;
+ }
}
diff --git a/comwell_key_app/lib/domain/models/user.dart b/comwell_key_app/lib/domain/models/user.dart
index bcf966a6..b34d725d 100644
--- a/comwell_key_app/lib/domain/models/user.dart
+++ b/comwell_key_app/lib/domain/models/user.dart
@@ -11,7 +11,6 @@ abstract class User with _$User {
@Default("") String hmsId,
@Default("") String firstName,
@Default("") String lastName,
- @Default("") String addressCountry,
@Default("") String phoneNumber,
@Default("") String email,
@Default("") String shopperReference,
diff --git a/comwell_key_app/lib/housekeeping/cubit/housekeeping_cubit.dart b/comwell_key_app/lib/housekeeping/cubit/housekeeping_cubit.dart
index 28075564..3456a735 100644
--- a/comwell_key_app/lib/housekeeping/cubit/housekeeping_cubit.dart
+++ b/comwell_key_app/lib/housekeeping/cubit/housekeeping_cubit.dart
@@ -43,15 +43,12 @@ class HouseKeepingCubit extends Cubit<HouseKeepingState> {
Future<List<String>> onOrderHousekeepingClicked(Booking booking) async {
final analyticsEventItem = AnalyticsEventItem(
- hotelName: "Comwell",
+ hotelName: booking.hotelName,
currency: "DKK",
value: 0,
placement: "housekeeping_page",
items: state.selectedServices.map((e) => HouseKeepingService.values.firstWhere((element) => element.name == e).name).toList(),
- itemId: "housekeeping",
- itemName: "itemName",
- price: 0,
- quantity: 1,
+ itemIds: state.selectedServices.map((e) => HouseKeepingService.values.firstWhere((element) => element.name == e).name).toList(),
bookingReference: booking.confirmationNumber);
tracking.trackAddToCart(analyticsEventItem);
return state.selectedServices.toList();
diff --git a/comwell_key_app/lib/my_booking/components/balance_bottom_sheet.dart b/comwell_key_app/lib/my_booking/components/balance_bottom_sheet.dart
deleted file mode 100644
index 03510440..00000000
--- a/comwell_key_app/lib/my_booking/components/balance_bottom_sheet.dart
+++ /dev/null
@@ -1,252 +0,0 @@
-import 'package:comwell_key_app/my_booking/cubit/my_booking_cubit.dart';
-import 'package:comwell_key_app/overview/models/booking.dart';
-import 'package:comwell_key_app/routing/app_routes.dart';
-import 'package:comwell_key_app/services/models/booking_dto.dart';
-import 'package:comwell_key_app/themes/light_theme.dart';
-import 'package:comwell_key_app/utils/l10n_utils.dart';
-import 'package:comwell_key_app/utils/share_button_utils.dart';
-import 'package:flutter/material.dart';
-import 'package:go_router/go_router.dart';
-
-class BalanceBottomSheet extends StatelessWidget {
- final num balance;
- final String userName;
- final Booking booking;
- final List<BookingAddonItem> addOnItems;
- final MyBookingCubit cubit;
-
- const BalanceBottomSheet({
- super.key,
- required this.booking,
- required this.balance,
- required this.userName,
- required this.addOnItems,
- required this.cubit,
- });
-
- @override
- Widget build(BuildContext context) {
- final theme = Theme.of(context);
- return Container(
- decoration: const BoxDecoration(
- color: Colors.white,
- ),
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Padding(
- padding: const EdgeInsets.symmetric(vertical: 40.0, horizontal: 16),
- child: Container(
- padding: const EdgeInsets.symmetric(vertical: 8),
- decoration: const BoxDecoration(
- border: Border(
- bottom: BorderSide(color: colorDivider),
- ),
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- const SizedBox(width: 16),
- Text(
- context.strings.my_balance,
- style: theme.textTheme.titleLarge?.copyWith(
- fontWeight: FontWeight.bold,
- ),
- ),
- CircleAvatar(
- radius: 16,
- backgroundColor: sandColor[40],
- child: IconButton(
- padding: EdgeInsets.zero,
- constraints: const BoxConstraints(),
- icon: const Icon(Icons.keyboard_arrow_down, size: 20),
- onPressed: () => Navigator.pop(context),
- color: colorDivider,
- ),
- ),
- ],
- ),
- ),
- ),
-
- // Content
- Padding(
- padding: const EdgeInsets.all(10),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- // User info
- Row(
- children: [
- CircleAvatar(
- backgroundColor: sandColor,
- child: Text(
- generateInitialsString(userName),
- style: const TextStyle(color: Colors.white),
- ),
- ),
- const SizedBox(width: 12),
- Text(
- userName,
- style: theme.textTheme.bodyMedium?.copyWith(
- fontWeight: FontWeight.bold,
- ),
- ),
- ],
- ),
- const SizedBox(height: 16),
- ...addOnItems.map((item) => _buildBalanceItem(item, theme)),
- const SizedBox(height: 24),
-
- Container(
- padding: const EdgeInsets.all(16),
- decoration: BoxDecoration(
- color: sandColor[10],
- borderRadius: BorderRadius.circular(4),
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- context.strings.total_charge,
- style: theme.textTheme.bodyMedium?.copyWith(
- fontSize: 16,
- fontWeight: FontWeight.w400,
- ),
- ),
- Text(
- context.strings.total_charge_value(cubit.totalAddonBalance),
- style: theme.textTheme.titleLarge?.copyWith(
- fontWeight: FontWeight.bold,
- ),
- ),
- ],
- ),
- const SizedBox(width: 12),
- CircleAvatar(
- backgroundColor: sandColor[40],
- child: const Icon(
- Icons.credit_card,
- color: Colors.black54,
- size: 20,
- ),
- ),
- ],
- ),
- ),
-
- const SizedBox(height: 16),
- ],
- ),
- ),
- ],
- ),
-
- // Payment button
- Column(
- children: [
- const Divider(color: colorDivider),
- Padding(
- padding: const EdgeInsets.all(16),
- child: SizedBox(
- width: double.infinity,
- child: ElevatedButton(
- onPressed: () => cubit.canContinueToPayment
- ? context.push(AppRoutes.payMyBooking, extra: booking)
- : null,
- style: theme.elevatedButtonTheme.style?.copyWith(
- backgroundColor: WidgetStatePropertyAll(
- cubit.canContinueToPayment ? sandColor : Colors.grey,
- ),
- padding: const WidgetStatePropertyAll(EdgeInsets.symmetric(vertical: 16)),
- shape: WidgetStatePropertyAll(
- RoundedRectangleBorder(borderRadius: BorderRadius.circular(32)),
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 16),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Text(
- context.strings.go_to_payment,
- style: theme.textTheme.bodyMedium?.copyWith(
- color: Colors.white,
- fontSize: 16,
- fontWeight: FontWeight.w600,
- ),
- ),
- Text(
- context.strings.total_charge_value(balance.toInt()),
- style: theme.textTheme.bodyMedium?.copyWith(
- color: Colors.white,
- fontSize: 16,
- fontWeight: FontWeight.w600,
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ],
- ),
- ),
- );
- }
-
- Widget _buildBalanceItem(BookingAddonItem item, ThemeData theme) {
- final quantityString = item.quantity > 1 ? 'x ${item.quantity}' : '';
- return Padding(
- padding: const EdgeInsets.symmetric(vertical: 8),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Text(
- "${item.description} $quantityString",
- style: TextStyle(
- fontSize: 16,
- color: Colors.grey[600],
- ),
- ),
- Row(
- children: [
- Text(
- '${item.price.toInt()}',
- style: const TextStyle(
- fontSize: 16,
- ),
- ),
- //TODO: add paid status when we know how the receipt is structured
-
- // if (item.isPaid > 0)
- // Container(
- // margin: const EdgeInsets.only(left: 8),
- // padding: const EdgeInsets.symmetric(
- // horizontal: 6,
- // vertical: 2,
- // ),
- // decoration: BoxDecoration(
- // color: Colors.grey[200],
- // borderRadius: BorderRadius.circular(2),
- // ),
- // child: Text('paid'.tr(), style: theme.textTheme.bodySmall),
- // ),
- ],
- ),
- ],
- ),
- );
- }
-}
diff --git a/comwell_key_app/lib/my_booking/cubit/my_booking_cubit.dart b/comwell_key_app/lib/my_booking/cubit/my_booking_cubit.dart
index 21b060bf..b87169d3 100644
--- a/comwell_key_app/lib/my_booking/cubit/my_booking_cubit.dart
+++ b/comwell_key_app/lib/my_booking/cubit/my_booking_cubit.dart
@@ -80,7 +80,7 @@ class MyBookingCubit extends Cubit<MyBookingState> {
value: booking.balance?.toInt() ?? 0,
placement: "placement",
items: booking.addOnItems?.map((e) => e.description).toList() ?? [],
- itemId: "itemId",
+ itemIds: booking.addOnItems?.map((e) => e.code).toList() ?? [],
itemName: "itemName",
price: booking.balance?.toInt() ?? 0,
quantity: 1,
diff --git a/comwell_key_app/lib/my_booking/my_booking_route.dart b/comwell_key_app/lib/my_booking/my_booking_route.dart
index b078a30a..0dc02d25 100644
--- a/comwell_key_app/lib/my_booking/my_booking_route.dart
+++ b/comwell_key_app/lib/my_booking/my_booking_route.dart
@@ -1,6 +1,5 @@
import 'package:comwell_key_app/my_booking/cubit/my_booking_cubit.dart';
import 'package:comwell_key_app/my_booking/my_booking_page.dart';
-import 'package:comwell_key_app/my_booking/pages/my_booking_payment_page.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
import 'package:comwell_key_app/routing/app_routes.dart';
import 'package:comwell_key_app/utils/locator.dart';
@@ -43,11 +42,5 @@ final myBookingRoute = ShellRoute(
return MyBookingPage(booking: state.extra as Booking);
},
),
- GoRoute(
- path: AppRoutes.payMyBooking,
- builder: (context, state) {
- return const MyBookingPaymentPage();
- },
- ),
],
);
diff --git a/comwell_key_app/lib/my_booking/pages/my_booking_payment_page.dart b/comwell_key_app/lib/my_booking/pages/my_booking_payment_page.dart
deleted file mode 100644
index c13ecd59..00000000
--- a/comwell_key_app/lib/my_booking/pages/my_booking_payment_page.dart
+++ /dev/null
@@ -1,69 +0,0 @@
-import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
-import 'package:comwell_key_app/common/template_pages/payment_page_template.dart';
-import 'package:comwell_key_app/my_booking/cubit/my_booking_cubit.dart';
-import 'package:comwell_key_app/my_booking/cubit/my_booking_state.dart';
-import 'package:comwell_key_app/routing/app_routes.dart';
-import 'package:comwell_key_app/themes/light_theme.dart';
-import 'package:comwell_key_app/utils/l10n_utils.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:go_router/go_router.dart';
-
-class MyBookingPaymentPage extends StatelessWidget {
- const MyBookingPaymentPage({super.key});
-
- @override
- Widget build(BuildContext context) {
- return BlocBuilder<MyBookingCubit, MyBookingState>(
- builder: (context, state) {
- final theme = Theme.of(context);
- final cubit = context.read<MyBookingCubit>();
- final addOnItems = cubit.state.items;
- final applyClubPoints = cubit.state.applyClubPoints;
- final totalPriceBeforeDiscount = cubit.state.totalPriceBeforeDiscount;
- final totalPriceAfterDiscount = cubit.state.totalPriceAfterDiscount;
- final trimmedBalance = cubit.totalAddonBalance;
- final clubPoints = cubit.state.clubPoints;
- final isTermsAccepted = cubit.state.isTermsAccepted;
- final onAcceptTermsChanged = cubit.onAcceptTermsChanged;
- final showError = cubit.state.showTermsError;
- final onShowTermsAndConditions = cubit.showTermsAndConditions;
- final onApplyClubPointsChanged = cubit.onApplyClubPointsClicked;
-
- return Scaffold(
- appBar: const ComwellAppBar(),
- body: PaymentPageTemplate(
- addOnItems: addOnItems,
- applyClubPoints: applyClubPoints,
- totalPriceBeforeDiscount: totalPriceBeforeDiscount,
- totalPriceAfterDiscount: totalPriceAfterDiscount,
- trimmedBalance: trimmedBalance,
- clubPoints: clubPoints,
- isTermsAccepted: isTermsAccepted,
- userEmail: cubit.booking.bookerLastName,
- onAcceptTermsChanged: onAcceptTermsChanged,
- showError: showError,
- onShowTermsAndConditions: onShowTermsAndConditions,
- onApplyClubPointsChanged: onApplyClubPointsChanged),
- bottomNavigationBar: Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- const Divider(color: colorDivider),
- Padding(
- padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 24.0, top: 16.0),
- child: ElevatedButton(
- onPressed: () {
- context.push(AppRoutes.paymentProcessing);
- cubit.processPayment();
- },
- child: Text(context.strings.pay_bill,
- style: theme.textTheme.bodyMedium
- ?.copyWith(color: Colors.white)),
- ),
- ),
- ],
- ),
- );
- });
- }
-}
diff --git a/comwell_key_app/lib/presentation/screens/check_in/bloc/check_in_cubit.dart b/comwell_key_app/lib/presentation/screens/check_in/bloc/check_in_cubit.dart
index 05f8c086..80f77b22 100644
--- a/comwell_key_app/lib/presentation/screens/check_in/bloc/check_in_cubit.dart
+++ b/comwell_key_app/lib/presentation/screens/check_in/bloc/check_in_cubit.dart
@@ -103,12 +103,11 @@ class CheckInCubit extends BaseCubit<CheckInState> {
hotelName: booking.hotelName,
currency: "DKK",
value: booking.balance?.toInt() ?? 0,
- placement: "placement",
+ placement: "check-in",
items: booking.addOnItems?.map((e) => e.description).toList() ?? [],
- itemId: "itemId",
- itemName: "itemName",
- price: booking.balance?.toInt() ?? 0,
- quantity: 1,
+ itemIds: booking.addOnItems?.map((e) => e.code).toList() ?? [],
+ price: booking.addOnItems?.map((e) => e.price).reduce((total, price) => total + price) ?? 0,
+ quantity: booking.addOnItems?.length ?? 0,
bookingReference: booking.confirmationNumber,
);
_tracking.trackBeginCheckout(analyticsEventItem);
diff --git a/comwell_key_app/lib/presentation/screens/pregistration/cubit/preregistration_cubit.dart b/comwell_key_app/lib/presentation/screens/pregistration/cubit/preregistration_cubit.dart
index 438dd1f2..70f478ab 100644
--- a/comwell_key_app/lib/presentation/screens/pregistration/cubit/preregistration_cubit.dart
+++ b/comwell_key_app/lib/presentation/screens/pregistration/cubit/preregistration_cubit.dart
@@ -208,36 +208,17 @@ class PreregistrationCubit extends BaseCubit<PreregistrationState> {
void addToCart() {
final analyticsEventItem = AnalyticsEventItem(
- hotelName: "Comwell",
+ hotelName: booking.hotelName,
currency: "DKK",
- value: 500,
- placement: "placement",
- items: ["items"],
- itemId: "itemId",
- itemName: "itemName",
- price: 200,
- quantity: 200,
+ value: extrasTotalPrice,
+ placement: "pre-registration",
+ items: selectedAddOnUpgrades.map((e) => e.name).toList(),
+ itemIds: selectedAddOnUpgrades.map((e) => e.id).toList(),
bookingReference: booking.confirmationNumber,
);
_tracking.trackAddToCart(analyticsEventItem);
}
- void removeToCard() {
- final analyticsEventItem = AnalyticsEventItem(
- hotelName: "Comwell",
- currency: "DKK",
- value: 500,
- placement: "placement",
- items: ["items"],
- itemId: "itemId",
- itemName: "itemName",
- price: 200,
- quantity: 200,
- bookingReference: booking.confirmationNumber,
- );
- _tracking.trackRemoveFromCart(analyticsEventItem);
- }
-
void _onConfirmPressed(BuildContext context) async {
emit(state.copyWith(isLoading: true));
try {
diff --git a/comwell_key_app/lib/presentation/screens/profile_settings/bloc/profile_settings_cubit.dart b/comwell_key_app/lib/presentation/screens/profile_settings/bloc/profile_settings_cubit.dart
index 6406770b..6706d732 100644
--- a/comwell_key_app/lib/presentation/screens/profile_settings/bloc/profile_settings_cubit.dart
+++ b/comwell_key_app/lib/presentation/screens/profile_settings/bloc/profile_settings_cubit.dart
@@ -49,7 +49,7 @@ class ProfileSettingsCubit extends BaseCubit<ProfileSettingsState> {
lastNameController.text = user.lastName;
phoneNumberController.text = user.phoneNumber;
- selectedCountry = user.addressCountry != '' ? user.addressCountry : 'DK';
+ selectedCountry = user.address.country != '' ? user.address.country : 'DK';
phoneNumberController.text = phoneNumber!;
} catch (e, st) {
@@ -80,6 +80,7 @@ class ProfileSettingsCubit extends BaseCubit<ProfileSettingsState> {
}
void updateAddress(Address address) {
+ debugPrint('qqq updateAddress: $address');
final updatedUser = user.copyWith(address: address);
_profileCubit.updateUser(updatedUser);
}
diff --git a/comwell_key_app/lib/presentation/screens/profile_settings/components/date_time_picker.dart b/comwell_key_app/lib/presentation/screens/profile_settings/components/date_time_picker.dart
index dc0a5755..73a97419 100644
--- a/comwell_key_app/lib/presentation/screens/profile_settings/components/date_time_picker.dart
+++ b/comwell_key_app/lib/presentation/screens/profile_settings/components/date_time_picker.dart
@@ -139,7 +139,7 @@ class _DatePickerState extends State<DateTimePicker> {
widget.title,
textAlign: TextAlign.start,
style: theme.textTheme.bodySmall?.copyWith(
- color: errorMessage != null ? colorError : colorHeadlineText,
+ color: errorMessage != null ? colorError : Colors.black,
),
),
const SizedBox(height: 0.0),
@@ -148,7 +148,7 @@ class _DatePickerState extends State<DateTimePicker> {
? dateFormat.format(_selectedDate!)
: dateFormat.format(widget.initialValue),
style: theme.textTheme.headlineSmall?.copyWith(
- color: errorMessage != null ? colorError : colorHeadlineText,
+ color: errorMessage != null ? colorError : Colors.black,
),
),
],
diff --git a/comwell_key_app/lib/presentation/screens/profile_settings/profile_settings_screen.dart b/comwell_key_app/lib/presentation/screens/profile_settings/profile_settings_screen.dart
index 5555f393..0170d5bc 100644
--- a/comwell_key_app/lib/presentation/screens/profile_settings/profile_settings_screen.dart
+++ b/comwell_key_app/lib/presentation/screens/profile_settings/profile_settings_screen.dart
@@ -128,6 +128,8 @@ class ProfileSettingsScreen extends StatelessWidget {
),
);
+ debugPrint('qqq response: $response');
+
if (response is Address) {
cubit.updateAddress(response);
} else {
diff --git a/comwell_key_app/lib/routing/app_routes.dart b/comwell_key_app/lib/routing/app_routes.dart
index 1b848b50..fac3c853 100644
--- a/comwell_key_app/lib/routing/app_routes.dart
+++ b/comwell_key_app/lib/routing/app_routes.dart
@@ -49,7 +49,6 @@ abstract class AppRoutes {
static const forceUpdate = "/force-update";
static const upSalesError = "/up-sales-error";
static const sharedBooking = "/shared-booking";
- static const payMyBooking = "/pay-my-booking";
static const checkOutError = "/check-out-error";
static const permissionOverview = "/permission-overview";
}
diff --git a/comwell_key_app/lib/routing/go_router_observer.dart b/comwell_key_app/lib/routing/go_router_observer.dart
index e6d15fcd..c2ef6759 100644
--- a/comwell_key_app/lib/routing/go_router_observer.dart
+++ b/comwell_key_app/lib/routing/go_router_observer.dart
@@ -48,6 +48,7 @@ class GoRouterObserver extends NavigatorObserver {
final context = route.navigator?.context;
final tracker = context?.tracker;
if (tracker != null && context != null) {
+ debugPrint('DidPush: ${route.settings.name}');
tracker.trackScreenView(context);
}
super.didPush(route, previousRoute);
@@ -58,6 +59,7 @@ class GoRouterObserver extends NavigatorObserver {
final context = route.navigator?.context;
final tracker = context?.tracker;
if (tracker != null && context != null) {
+ debugPrint('DidPop: ${route.settings.name}');
tracker.trackScreenView(context);
}
super.didPop(route, previousRoute);
diff --git a/comwell_key_app/lib/services/mappers/user_mapper.dart b/comwell_key_app/lib/services/mappers/user_mapper.dart
index 95f41aeb..2d7d6fc6 100644
--- a/comwell_key_app/lib/services/mappers/user_mapper.dart
+++ b/comwell_key_app/lib/services/mappers/user_mapper.dart
@@ -12,7 +12,6 @@ extension UserMapper on UserDto {
lastName: lastName,
email: email,
emailVerified: emailVerified,
- addressCountry: addressCountry,
phoneNumber: phoneNumber,
address: Address(
street: addressStreet,
@@ -60,7 +59,7 @@ extension UserDtoMapper on User {
addressStreet: address.street,
addressZip: address.zipCode,
addressCity: address.city,
- addressCountry: addressCountry,
+ addressCountry: address.country,
points: points,
signUpDate: signUpDate,
signUpCampaign: signUpCampaign,
@@ -85,7 +84,7 @@ extension SimpleUserDtoMapper on User {
addressStreet: address.street,
addressZip: address.zipCode,
addressCity: address.city,
- addressCountry: addressCountry,
+ addressCountry: address.country,
locale: locale.isNotEmpty ? locale : null,
permissions: {}, // Permissions are not stored in User model
);
diff --git a/comwell_key_app/lib/tracking/models/analytics_event_item.dart b/comwell_key_app/lib/tracking/models/analytics_event_item.dart
index 111d1126..53c2aa46 100644
--- a/comwell_key_app/lib/tracking/models/analytics_event_item.dart
+++ b/comwell_key_app/lib/tracking/models/analytics_event_item.dart
@@ -10,10 +10,10 @@ class AnalyticsEventItem {
final num value; // The items for the event.
final String placement; // Where in the app flow this event happened
final Iterable<String> items; // The ID of the item. One of item_id or item_name is required.
- final String itemId; // The name of the item. One of item_id or item_name is required.
- final String itemName; // The monetary unit price of the item, in units of the specified currency parameter.
- final num price; // Item quantity. If not set, quantity is set to 1.
- final num quantity; // The hotel name associated with the event.
+ final Iterable<String> itemIds; // The name of the item. One of item_id or item_name is required.
+ final String? itemName; // The monetary unit price of the item, in units of the specified currency parameter.
+ final num? price; // Item quantity. If not set, quantity is set to 1.
+ final num? quantity; // The hotel name associated with the event.
final String bookingReference; // The booking reference associated with the event.
AnalyticsEventItem({
@@ -22,10 +22,10 @@ class AnalyticsEventItem {
required this.value,
required this.placement,
required this.items,
- required this.itemId,
- required this.itemName,
- required this.price,
- required this.quantity,
+ required this.itemIds,
+ this.itemName,
+ this.price,
+ this.quantity,
required this.bookingReference,
});
diff --git a/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart b/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart
index 72f5565e..69645011 100644
--- a/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart
+++ b/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart
@@ -64,6 +64,7 @@ class FirebaseTracker {
screenName: name,
screenClass: screenClass
);
+ debugPrint('qqq trackScreen: $name, $screenClass');
} catch (e, st) {
if (kDebugMode) print("err=$e, $st");