6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit e2fc3643
Changed files
comwell_key_app/assets/icons/mastercard.svg | 12 ++--- comwell_key_app/assets/icons/visa.svg | 8 ++-- comwell_key_app/assets/translations/da-DK.json | 1 + comwell_key_app/assets/translations/en-US.json | 1 + .../components/booking_details_bottom_sheet.dart | 3 +- .../lib/common/components/generic_dialog.dart | 2 - .../lib/contact/components/call_us_section.dart | 2 - .../components/get_a_phone_call_section.dart | 4 -- .../lib/find_booking/find_booking_page.dart | 1 - .../components/approve_conditions_widget.dart | 42 +++++++++++++++++ .../lib/payment_cards/payment_cards_page.dart | 52 ++++++++++++++-------- .../pregistration/bloc/preregistration_cubit.dart | 6 ++- .../pregistration/bloc/preregistration_state.dart | 8 +++- .../pregistration/components/information_card.dart | 2 +- .../pages/prereg_confirmation_page.dart | 13 +++--- .../lib/pregistration/preregistration_flow.dart | 2 +- .../components/address_bottom_sheet.dart | 3 -- comwell_key_app/lib/services/api.dart | 6 +-- comwell_key_app/lib/themes/light_theme.dart | 1 + 19 files changed, 113 insertions(+), 56 deletions(-)
Diff
diff --git a/comwell_key_app/assets/icons/mastercard.svg b/comwell_key_app/assets/icons/mastercard.svg
index fabf6670..0104f7e2 100644
--- a/comwell_key_app/assets/icons/mastercard.svg
+++ b/comwell_key_app/assets/icons/mastercard.svg
@@ -1,7 +1,7 @@
-<svg width="45" height="32" viewBox="0 0 45 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="1.28627" y="1.14272" width="43.1429" height="29.7143" rx="1.42857" fill="white"/>
-<rect x="1.28627" y="1.14272" width="43.1429" height="29.7143" rx="1.42857" stroke="#E0E0E0" stroke-width="1.14286"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M22.8557 22.3042C21.403 23.5395 19.5181 24.2853 17.4584 24.2853C12.8646 24.2853 9.14062 20.5757 9.14062 15.9996C9.14062 11.4235 12.8646 7.71387 17.4584 7.71387C19.5181 7.71387 21.403 8.45965 22.8557 9.69494C24.3084 8.45965 26.1933 7.71387 28.253 7.71387C32.8468 7.71387 36.5708 11.4235 36.5708 15.9996C36.5708 20.5757 32.8468 24.2853 28.253 24.2853C26.1933 24.2853 24.3084 23.5395 22.8557 22.3042Z" fill="#ED0006"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M22.8555 22.3042C24.6427 20.7845 25.7759 18.5239 25.7759 15.9996C25.7759 13.4753 24.6427 11.2147 22.8555 9.69494C24.3082 8.45965 26.1931 7.71387 28.2528 7.71387C32.8466 7.71387 36.5705 11.4235 36.5705 15.9996C36.5705 20.5757 32.8466 24.2853 28.2528 24.2853C26.1931 24.2853 24.3082 23.5395 22.8555 22.3042Z" fill="#F9A000"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M22.8462 22.3041C24.6335 20.7844 25.7666 18.5237 25.7666 15.9995C25.7666 13.4752 24.6335 11.2146 22.8462 9.69482C21.059 11.2146 19.9258 13.4752 19.9258 15.9995C19.9258 18.5237 21.059 20.7844 22.8462 22.3041Z" fill="#FF5E00"/>
+<svg width="40" height="29" viewBox="0 0 40 29" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.5" y="1" width="39" height="27" rx="1.5" fill="white"/>
+<rect x="0.5" y="1" width="39" height="27" rx="1.5" stroke="#E0E0E0"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M20.0007 20.0166C18.7296 21.0974 17.0803 21.75 15.278 21.75C11.2585 21.75 8 18.5041 8 14.5C8 10.4959 11.2585 7.25 15.278 7.25C17.0803 7.25 18.7296 7.90256 20.0007 8.98344C21.2718 7.90256 22.9211 7.25 24.7233 7.25C28.7429 7.25 32.0014 10.4959 32.0014 14.5C32.0014 18.5041 28.7429 21.75 24.7233 21.75C22.9211 21.75 21.2718 21.0974 20.0007 20.0166Z" fill="#ED0006"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M20 20.0166C21.5638 18.6868 22.5554 16.7087 22.5554 14.5C22.5554 12.2913 21.5638 10.3132 20 8.98344C21.2711 7.90256 22.9204 7.25 24.7227 7.25C28.7422 7.25 32.0007 10.4959 32.0007 14.5C32.0007 18.5041 28.7422 21.75 24.7227 21.75C22.9204 21.75 21.2711 21.0974 20 20.0166Z" fill="#F9A000"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M19.9929 20.0165C21.5567 18.6868 22.5482 16.7087 22.5482 14.5C22.5482 12.2912 21.5567 10.3132 19.9929 8.9834C18.429 10.3132 17.4375 12.2912 17.4375 14.5C17.4375 16.7087 18.429 18.6868 19.9929 20.0165Z" fill="#FF5E00"/>
</svg>
diff --git a/comwell_key_app/assets/icons/visa.svg b/comwell_key_app/assets/icons/visa.svg
index 2b852a9d..abe20b95 100644
--- a/comwell_key_app/assets/icons/visa.svg
+++ b/comwell_key_app/assets/icons/visa.svg
@@ -1,5 +1,5 @@
-<svg width="40" height="28" viewBox="0 0 40 28" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="0.5" y="0.5" width="39" height="27" rx="1.5" fill="white"/>
-<rect x="0.5" y="0.5" width="39" height="27" rx="1.5" stroke="#E0E0E0"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M12.0003 18.43H9.57707L7.75995 11.448C7.6737 11.1268 7.49057 10.8429 7.22119 10.7091C6.54893 10.3728 5.80814 10.1051 5 9.97016V9.70136H8.90362C9.44238 9.70136 9.84645 10.1051 9.91379 10.5741L10.8566 15.6104L13.2787 9.70136H15.6345L12.0003 18.43ZM16.9799 18.43H14.6914L16.5759 9.70136H18.8644L16.9799 18.43ZM21.8256 12.1194C21.8929 11.6493 22.297 11.3805 22.7684 11.3805C23.5092 11.313 24.3161 11.448 24.9896 11.7831L25.3937 9.90379C24.7202 9.63498 23.9794 9.5 23.3072 9.5C21.086 9.5 19.4697 10.709 19.4697 12.387C19.4697 13.6636 20.6146 14.3338 21.4227 14.7376C22.297 15.1402 22.6337 15.4091 22.5664 15.8117C22.5664 16.4156 21.8929 16.6844 21.2207 16.6844C20.4125 16.6844 19.6044 16.4831 18.8648 16.1468L18.4607 18.0273C19.2688 18.3624 20.1431 18.4974 20.9513 18.4974C23.4418 18.5637 24.9896 17.3559 24.9896 15.5429C24.9896 13.2598 21.8256 13.126 21.8256 12.1194ZM32.9985 18.43L31.1814 9.70136H29.2296C28.8255 9.70136 28.4214 9.97016 28.2867 10.3728L24.9219 18.43H27.2778L27.748 17.1546H30.6426L30.912 18.43H32.9985ZM29.5677 12.052L30.2399 15.3416H28.3555L29.5677 12.052Z" fill="#172B85"/>
+<svg width="40" height="29" viewBox="0 0 40 29" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.5" y="1" width="39" height="27" rx="1.5" fill="white"/>
+<rect x="0.5" y="1" width="39" height="27" rx="1.5" stroke="#E0E0E0"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M12.0003 18.93H9.57707L7.75995 11.948C7.6737 11.6268 7.49057 11.3429 7.22119 11.2091C6.54893 10.8728 5.80814 10.6051 5 10.4702V10.2014H8.90362C9.44238 10.2014 9.84645 10.6051 9.91379 11.0741L10.8566 16.1104L13.2787 10.2014H15.6345L12.0003 18.93ZM16.9799 18.93H14.6914L16.5759 10.2014H18.8644L16.9799 18.93ZM21.8256 12.6194C21.8929 12.1493 22.297 11.8805 22.7684 11.8805C23.5092 11.813 24.3161 11.948 24.9896 12.2831L25.3937 10.4038C24.7202 10.135 23.9794 10 23.3072 10C21.086 10 19.4697 11.209 19.4697 12.887C19.4697 14.1636 20.6146 14.8338 21.4227 15.2376C22.297 15.6402 22.6337 15.9091 22.5664 16.3117C22.5664 16.9156 21.8929 17.1844 21.2207 17.1844C20.4125 17.1844 19.6044 16.9831 18.8648 16.6468L18.4607 18.5273C19.2688 18.8624 20.1431 18.9974 20.9513 18.9974C23.4418 19.0637 24.9896 17.8559 24.9896 16.0429C24.9896 13.7598 21.8256 13.626 21.8256 12.6194ZM32.9985 18.93L31.1814 10.2014H29.2296C28.8255 10.2014 28.4214 10.4702 28.2867 10.8728L24.9219 18.93H27.2778L27.748 17.6546H30.6426L30.912 18.93H32.9985ZM29.5677 12.552L30.2399 15.8416H28.3555L29.5677 12.552Z" fill="#172B85"/>
</svg>
diff --git a/comwell_key_app/assets/translations/da-DK.json b/comwell_key_app/assets/translations/da-DK.json
index 89387014..f5e8cd61 100644
--- a/comwell_key_app/assets/translations/da-DK.json
+++ b/comwell_key_app/assets/translations/da-DK.json
@@ -180,6 +180,7 @@
"checkout_page_processing_success_subtitle": "Det check-out er nu bekræftet og du har nu 30 minutter til at forlade dit værelse. Herefter vil du ikke længere kunne bruge dit nøglekort.",
"checkout_page_processing_success_subtitle_no_digital_card": "Du er nu checket ud. Husk at aflevere din nøgle i lobbyen.",
"payment_cards_title": "Betalingskort",
+ "payment_cards_subtitle": "For at kunne overnatte på Comwell, skal vi bruge et betalingskort.",
"payment_cards_my_cards": "Mine kort",
"payment_cards_edit_card_title": "Redigér kort",
"payment_cards_confirm_remove_title": "Du er ved at fjerne et betalingskort",
diff --git a/comwell_key_app/assets/translations/en-US.json b/comwell_key_app/assets/translations/en-US.json
index 1256f66a..e7fa0941 100644
--- a/comwell_key_app/assets/translations/en-US.json
+++ b/comwell_key_app/assets/translations/en-US.json
@@ -179,6 +179,7 @@
"checkout_page_processing_success_subtitle": "You have 30 minutes to leave your room",
"checkout_page_processing_success_subtitle_no_digital_card": "You are now checked out. Please return your key to the reception",
"payment_cards_title": "Payment cards",
+ "payment_cards_subtitle": "To stay at Comwell, we need a payment card.",
"payment_cards_my_cards": "My cards",
"payment_cards_confirm_remove_title": "You are removing the card",
"payment_cards_confirm_remove_subtitle": "This payment card will no longer be usable",
diff --git a/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart b/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart
index a3092cef..34d46a72 100644
--- a/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart
+++ b/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart
@@ -3,6 +3,7 @@ import 'package:comwell_key_app/booking_details/components/check_out_button.dart
import 'package:comwell_key_app/booking_details/components/housekeeping_button.dart';
import 'package:comwell_key_app/booking_details/components/practical_information_button.dart';
import 'package:comwell_key_app/common/components/bottom_sheet_widget.dart';
+import 'package:comwell_key_app/overview/models/booking.dart';
import 'package:comwell_key_app/routing/app_routes.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
@@ -18,7 +19,7 @@ class BookingDetailsBottomSheet extends StatelessWidget {
Widget build(BuildContext context) {
return BottomSheetWidget(
widgetChildren: [
- cubit.booking.roomNumber != ''
+ cubit.booking.reservationStatus == ReservationStatus.checkedin
? HousekeepingButton(
key: ValueKey(state.isHouseKeepingOrdered),
roomNumber: cubit.booking.roomNumber)
diff --git a/comwell_key_app/lib/common/components/generic_dialog.dart b/comwell_key_app/lib/common/components/generic_dialog.dart
index 9a89ba70..a4c24ec6 100644
--- a/comwell_key_app/lib/common/components/generic_dialog.dart
+++ b/comwell_key_app/lib/common/components/generic_dialog.dart
@@ -66,8 +66,6 @@ class GenericDialog extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 16),
child: ElevatedButton(
style: theme.elevatedButtonTheme.style?.copyWith(
- minimumSize: const WidgetStatePropertyAll(
- Size(double.infinity, 52)),
shape: WidgetStatePropertyAll(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25))),
diff --git a/comwell_key_app/lib/contact/components/call_us_section.dart b/comwell_key_app/lib/contact/components/call_us_section.dart
index fff392f3..f9edb74f 100644
--- a/comwell_key_app/lib/contact/components/call_us_section.dart
+++ b/comwell_key_app/lib/contact/components/call_us_section.dart
@@ -25,8 +25,6 @@ class CallUsSection extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 0),
child: ElevatedButton(
style: theme.elevatedButtonTheme.style?.copyWith(
- minimumSize: const WidgetStatePropertyAll(
- Size(double.infinity, 52)),
shape: WidgetStatePropertyAll(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25))),
diff --git a/comwell_key_app/lib/contact/components/get_a_phone_call_section.dart b/comwell_key_app/lib/contact/components/get_a_phone_call_section.dart
index ed7551af..9e6f4529 100644
--- a/comwell_key_app/lib/contact/components/get_a_phone_call_section.dart
+++ b/comwell_key_app/lib/contact/components/get_a_phone_call_section.dart
@@ -42,10 +42,6 @@ class GetAPhoneCallSection extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 0),
child: ElevatedButton(
- style: theme.elevatedButtonTheme.style?.copyWith(
- minimumSize: const WidgetStatePropertyAll(
- Size(double.infinity, 52)),
- ),
onPressed: () async {
// await makePhoneCall('comwell_telefon_number'.tr());
},
diff --git a/comwell_key_app/lib/find_booking/find_booking_page.dart b/comwell_key_app/lib/find_booking/find_booking_page.dart
index ff905a8a..79bd150d 100644
--- a/comwell_key_app/lib/find_booking/find_booking_page.dart
+++ b/comwell_key_app/lib/find_booking/find_booking_page.dart
@@ -205,7 +205,6 @@ class FindBookingPageState extends State<FindBookingPage>
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25),
),
- minimumSize: const Size(double.infinity, 52),
),
onPressed: _isButtonEnabled
? () async {
diff --git a/comwell_key_app/lib/payment_cards/components/approve_conditions_widget.dart b/comwell_key_app/lib/payment_cards/components/approve_conditions_widget.dart
new file mode 100644
index 00000000..bb9f5d02
--- /dev/null
+++ b/comwell_key_app/lib/payment_cards/components/approve_conditions_widget.dart
@@ -0,0 +1,42 @@
+import 'package:comwell_key_app/pregistration/bloc/preregistration_cubit.dart';
+import 'package:comwell_key_app/pregistration/bloc/preregistration_state.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+class ApproveConditionsWidget extends StatelessWidget {
+ const ApproveConditionsWidget({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocBuilder<PreregistrationCubit, PreregistrationState>(
+ builder: (context, state) {
+ final cubit = context.read<PreregistrationCubit>();
+ return Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Checkbox(
+ value: cubit.state.isTermsAccepted,
+ onChanged: (value) {
+ cubit.onTermsAndConditionsToggled(value ?? false);
+ },
+ ),
+ const Expanded(
+ child: Wrap(
+ crossAxisAlignment: WrapCrossAlignment.center,
+ children: [
+ Text('Jeg accepter '),
+ Text(
+ 'betingelserne',
+ style: TextStyle(
+ color: const Color(0xFF9B7B52),
+ decoration: TextDecoration.underline,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ );
+ },
+ );
+ }
+}
\ No newline at end of file
diff --git a/comwell_key_app/lib/payment_cards/payment_cards_page.dart b/comwell_key_app/lib/payment_cards/payment_cards_page.dart
index 31a5915d..07fae880 100644
--- a/comwell_key_app/lib/payment_cards/payment_cards_page.dart
+++ b/comwell_key_app/lib/payment_cards/payment_cards_page.dart
@@ -9,6 +9,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import '../themes/light_theme.dart';
import 'bloc/payment_cards_cubit.dart';
+import 'components/approve_conditions_widget.dart';
class PaymentCardsPage extends StatelessWidget {
final bool needScaffold;
@@ -23,26 +24,31 @@ class PaymentCardsPage extends StatelessWidget {
return const Center(child: CircularProgressIndicator());
}
if (cubit.state.hasError) {
- return Center(child: Text('error_cards'.tr(), style: Theme.of(context).textTheme.bodyMedium,));
+ return Center(
+ child: Text(
+ 'error_cards'.tr(),
+ style: Theme.of(context).textTheme.bodyMedium,
+ ));
}
- return needScaffold ? Scaffold(
- backgroundColor: Colors.white,
- appBar: const ComwellAppBar(
- shouldShowProfileButton: true,
- ),
- body: _buildPaymentCards(context, state, cubit)
- ) : _buildPaymentCards(context, state, cubit);
+ return needScaffold
+ ? Scaffold(
+ backgroundColor: Colors.white,
+ appBar: const ComwellAppBar(
+ shouldShowProfileButton: true,
+ ),
+ body: _buildPaymentCards(context, state, cubit))
+ : _buildPaymentCards(context, state, cubit);
});
}
-
- Widget _buildPaymentCards(BuildContext context, PaymentCardsState state, PaymentCardsCubit cubit) {
+ Widget _buildPaymentCards(
+ BuildContext context, PaymentCardsState state, PaymentCardsCubit cubit) {
final cards = state.cards;
return ListView(
- children: [
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 16.0),
- child: Column(
+ children: [
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16.0),
+ child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 40),
@@ -50,6 +56,13 @@ class PaymentCardsPage extends StatelessWidget {
"payment_cards_title".tr(),
style: Theme.of(context).textTheme.headlineLarge,
),
+ const SizedBox(height: 12),
+ Text(
+ "payment_cards_subtitle".tr(),
+ style: Theme.of(context).textTheme.bodySmall?.copyWith(
+ color: Colors.black.withValues(alpha: 0.65),
+ ),
+ ),
const SizedBox(height: 40),
Text("payment_cards_my_cards".tr(),
style: Theme.of(context).textTheme.headlineMedium),
@@ -82,11 +95,12 @@ class PaymentCardsPage extends StatelessWidget {
),
),
const SizedBox(height: 12),
- const AddCard()
- ],
- ),
+ const AddCard(),
+ const ApproveConditionsWidget(),
+ ],
),
- ],
- );
+ ),
+ ],
+ );
}
}
diff --git a/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart b/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart
index 7bdc1586..62b1ed36 100644
--- a/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart
+++ b/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart
@@ -271,7 +271,7 @@ class PreregistrationCubit extends Cubit<PreregistrationState> {
case PreregistrationPage.address:
return isAddressValid || isPostalCodeValid || isCityValid;
case PreregistrationPage.payment:
- return true;
+ return state.isTermsAccepted;
case PreregistrationPage.confirmation:
return true;
}
@@ -293,6 +293,8 @@ class PreregistrationCubit extends Cubit<PreregistrationState> {
}
void onTermsAndConditionsToggled(bool toggle) {
- emit(state.copyWith(termsAndConditionsAccepted: toggle));
+ print("toggle: $toggle");
+ emit(state.copyWith(isTermsAccepted: toggle));
}
+
}
diff --git a/comwell_key_app/lib/pregistration/bloc/preregistration_state.dart b/comwell_key_app/lib/pregistration/bloc/preregistration_state.dart
index 9e752120..22c6972f 100644
--- a/comwell_key_app/lib/pregistration/bloc/preregistration_state.dart
+++ b/comwell_key_app/lib/pregistration/bloc/preregistration_state.dart
@@ -17,7 +17,7 @@ class PreregistrationState extends Equatable {
final bool isPhoneNumberValid;
final bool isFirstNameValid;
final bool isLastNameValid;
-
+ final bool isTermsAccepted;
const PreregistrationState({
required this.loading,
@@ -33,6 +33,7 @@ class PreregistrationState extends Equatable {
this.isPhoneNumberValid = false,
this.isFirstNameValid = false,
this.isLastNameValid = false,
+ this.isTermsAccepted = false,
});
@override
@@ -50,6 +51,7 @@ class PreregistrationState extends Equatable {
isPhoneNumberValid,
isFirstNameValid,
isLastNameValid,
+ isTermsAccepted,
];
PreregistrationState copyWith({
@@ -66,6 +68,7 @@ class PreregistrationState extends Equatable {
bool? isPhoneNumberValid,
bool? isFirstNameValid,
bool? isLastNameValid,
+ bool? isTermsAccepted,
}) {
return PreregistrationState(
forceUpdate: forceUpdate ? !this.forceUpdate : this.forceUpdate,
@@ -81,6 +84,7 @@ class PreregistrationState extends Equatable {
countryCode: countryCode,
isPhoneNumberValid: isPhoneNumberValid ?? this.isPhoneNumberValid,
isFirstNameValid: isFirstNameValid ?? this.isFirstNameValid,
- isLastNameValid: isLastNameValid ?? this.isLastNameValid);
+ isLastNameValid: isLastNameValid ?? this.isLastNameValid,
+ isTermsAccepted: isTermsAccepted ?? this.isTermsAccepted);
}
}
diff --git a/comwell_key_app/lib/pregistration/components/information_card.dart b/comwell_key_app/lib/pregistration/components/information_card.dart
index 1b5a90eb..538ccb12 100644
--- a/comwell_key_app/lib/pregistration/components/information_card.dart
+++ b/comwell_key_app/lib/pregistration/components/information_card.dart
@@ -30,7 +30,7 @@ class InformationCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(title, style: titleStyle),
- TextButton(onPressed: onEditClick, child: Text("edit".tr(), style: const TextStyle(decoration: TextDecoration.underline),))
+ TextButton(onPressed: onEditClick, child: Text("edit".tr(), style: const TextStyle(decoration: TextDecoration.underline, decorationColor: sandColor, color: sandColor),))
],
),
const SizedBox(height: 40),
diff --git a/comwell_key_app/lib/pregistration/pages/prereg_confirmation_page.dart b/comwell_key_app/lib/pregistration/pages/prereg_confirmation_page.dart
index d069965a..0eb2fdba 100644
--- a/comwell_key_app/lib/pregistration/pages/prereg_confirmation_page.dart
+++ b/comwell_key_app/lib/pregistration/pages/prereg_confirmation_page.dart
@@ -32,7 +32,10 @@ class PreregConfirmationPage extends StatelessWidget {
const SizedBox(height: 16),
InformationCard(
title: "preregistration_confirmation_profile_card_title".tr(),
- titleStyle: theme.textTheme.titleMedium,
+ titleStyle: theme.textTheme.titleMedium?.copyWith(
+ fontWeight: FontWeight.w500,
+ color: Colors.black.withValues(alpha: 0.65),
+ ),
onEditClick: cubit.onEditProfileClicked,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -55,9 +58,7 @@ class PreregConfirmationPage extends StatelessWidget {
const SizedBox(height: 12),
InformationCard(
title: "preregistration_confirmation_address_card_title".tr(),
- titleStyle: theme.textTheme.titleMedium?.copyWith(
- fontWeight: FontWeight.w500,
- ),
+ titleStyle: theme.textTheme.titleMedium,
onEditClick: cubit.onEditAddressClicked,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -67,7 +68,7 @@ class PreregConfirmationPage extends StatelessWidget {
style: theme.textTheme.bodyMedium,
),
Text(
- "${state.user!.address.zipCode}, ${state.user!.address.city}, ${state.user!.address.country}",
+ "${state.user!.address.zipCode}, ${state.user!.address.city}${state.user!.address.country.isNotEmpty ? ', ${state.user!.address.country}' : ''}",
style: theme.textTheme.bodyMedium,
),
],
@@ -78,6 +79,7 @@ class PreregConfirmationPage extends StatelessWidget {
title: "payment_card_profile_menu".tr(),
titleStyle: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w500,
+ color: Colors.black.withValues(alpha: 0.65),
),
onEditClick: cubit.onPaymentContinueClicked,
child: Column(
@@ -109,6 +111,7 @@ class PreregConfirmationPage extends StatelessWidget {
title: extrasTitleText,
titleStyle: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w500,
+ color: Colors.black.withValues(alpha: 0.65),
),
onEditClick: cubit.onEditExtrasClicked,
child: Column(
diff --git a/comwell_key_app/lib/pregistration/preregistration_flow.dart b/comwell_key_app/lib/pregistration/preregistration_flow.dart
index 2fad19eb..119985f9 100644
--- a/comwell_key_app/lib/pregistration/preregistration_flow.dart
+++ b/comwell_key_app/lib/pregistration/preregistration_flow.dart
@@ -42,7 +42,7 @@ class _PreregistrationFlowState extends State<PreregistrationFlow> {
children: [
Expanded(
child: Padding(
- padding: const EdgeInsets.all(16.0),
+ padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 40.0),
child: ElevatedButton(
onPressed: cubit.canContinue
? () => cubit.onContinueClicked(context)
diff --git a/comwell_key_app/lib/profile_settings/components/address_bottom_sheet.dart b/comwell_key_app/lib/profile_settings/components/address_bottom_sheet.dart
index 518b6023..b14bb42a 100644
--- a/comwell_key_app/lib/profile_settings/components/address_bottom_sheet.dart
+++ b/comwell_key_app/lib/profile_settings/components/address_bottom_sheet.dart
@@ -147,9 +147,6 @@ class _AddressBottomSheetState extends State<AddressBottomSheet> {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: ElevatedButton(
- style: theme.elevatedButtonTheme.style?.copyWith(
- minimumSize: const WidgetStatePropertyAll(Size(double.infinity, 52)),
- ),
onPressed: () async {
final address = Address(
street: _addressController.text,
diff --git a/comwell_key_app/lib/services/api.dart b/comwell_key_app/lib/services/api.dart
index f8debef0..b9b0d402 100644
--- a/comwell_key_app/lib/services/api.dart
+++ b/comwell_key_app/lib/services/api.dart
@@ -159,9 +159,9 @@ class Api {
"confirmationId": confirmationId,
};
final data = jsonEncode(body);
- debugPrint("json in api: $data");
+
final response = await dio.post<Json>(ApiEndpoints.checkIn, data: data);
- debugPrint("response in api: ${response.data}");
+
return response.data;
}
@@ -211,7 +211,7 @@ class Api {
Future<BookingDTO?> getBookingDetails(String bookingId) async {
final response = await dio.get<Json>('${ApiEndpoints.getBookingDetails}$bookingId');
- debugPrint("response=$response");
+
return BookingDTO.fromJson(response.data!);
}
}
diff --git a/comwell_key_app/lib/themes/light_theme.dart b/comwell_key_app/lib/themes/light_theme.dart
index e6d64ff1..c286c75d 100644
--- a/comwell_key_app/lib/themes/light_theme.dart
+++ b/comwell_key_app/lib/themes/light_theme.dart
@@ -42,6 +42,7 @@ ThemeData lightTheme = ThemeData(
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: sandColor[80],
+ minimumSize: const Size(100, 52),
textStyle: const TextStyle(
color: Colors.white,
fontSize: 16,