6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 6458a02d
Changed files
.../components/check_in_button_timer.dart | 3 +- .../components/prereg_bottom_button.dart | 1 - .../pages/prereg_confirmation_page.dart | 127 +++++++++++---------- 3 files changed, 67 insertions(+), 64 deletions(-)
Diff
diff --git a/comwell_key_app/lib/presentation/screens/booking_details/components/check_in_button_timer.dart b/comwell_key_app/lib/presentation/screens/booking_details/components/check_in_button_timer.dart
index 2034c695..64ce86f3 100644
--- a/comwell_key_app/lib/presentation/screens/booking_details/components/check_in_button_timer.dart
+++ b/comwell_key_app/lib/presentation/screens/booking_details/components/check_in_button_timer.dart
@@ -55,6 +55,7 @@ class _CheckInButtonTimerState extends State<CheckInButtonTimer> {
final (days, hours, minutes, seconds) = getDurationInMinutes(state.remainingTime);
final checkInTime = cubit.getCheckInTime();
final dateStr = DateFormat('d. MMM', 'da').format(checkInTime);
+ final availableUpSales = state.upSales?.addOnUpgrades.where((upgrade) => upgrade.id == 'EARCHI').firstOrNull;
final theme = Theme.of(context);
final timeStr = days > 0 && hours > 0
@@ -139,7 +140,7 @@ class _CheckInButtonTimerState extends State<CheckInButtonTimer> {
],
),
),
- if (!hasAddons) ...[
+ if (!hasAddons && availableUpSales != null) ...[
Divider(color: colorBackground.withValues(alpha: 0.1)),
GestureDetector(
onTap: widget.buyEarlyCheckin,
diff --git a/comwell_key_app/lib/presentation/screens/pregistration/components/prereg_bottom_button.dart b/comwell_key_app/lib/presentation/screens/pregistration/components/prereg_bottom_button.dart
index 88babb3f..2a402863 100644
--- a/comwell_key_app/lib/presentation/screens/pregistration/components/prereg_bottom_button.dart
+++ b/comwell_key_app/lib/presentation/screens/pregistration/components/prereg_bottom_button.dart
@@ -23,7 +23,6 @@ class PreregBottomButton extends StatelessWidget {
child: ElevatedButton(
onPressed:
() => cubit.onContinueClicked(context),
-
style: ElevatedButton.styleFrom(
backgroundColor: sandColor,
foregroundColor: Colors.white),
diff --git a/comwell_key_app/lib/presentation/screens/pregistration/pages/prereg_confirmation_page.dart b/comwell_key_app/lib/presentation/screens/pregistration/pages/prereg_confirmation_page.dart
index d216ad47..ec1acc62 100644
--- a/comwell_key_app/lib/presentation/screens/pregistration/pages/prereg_confirmation_page.dart
+++ b/comwell_key_app/lib/presentation/screens/pregistration/pages/prereg_confirmation_page.dart
@@ -99,8 +99,9 @@ class PreregConfirmationPage extends StatelessWidget {
const SizedBox(height: 8),
Text(
context.strings.preregistration_my_addons_subtitle,
- style: theme.textTheme.bodyMedium?.copyWith(
+ style: theme.textTheme.bodySmall?.copyWith(
color: colorHeadlineText,
+ fontSize: 13,
),
),
const SizedBox(height: 16),
@@ -130,77 +131,76 @@ class PreregConfirmationPage extends StatelessWidget {
),
),
const SizedBox(height: 12),
- // Serving time field
- Container(
- padding: const EdgeInsets.all(12),
- decoration: BoxDecoration(
- color: sandColor[10],
- borderRadius: const BorderRadius.all(Radius.circular(10)),
- ),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- context.strings.preregistration_serving_time_label,
- style: theme.textTheme.titleMedium?.copyWith(
- fontWeight: FontWeight.w500,
- color: colorHeadlineText,
+ // Serving time fieldƒ
+ GestureDetector(
+ onTap: () async {
+ final time = await showTimePicker(
+ builder: (context, child) {
+ return Theme(
+ data: theme.copyWith(
+ timePickerTheme: TimePickerThemeData(
+ hourMinuteColor: sandColor,
+ hourMinuteTextColor: Colors.white,
+ dialHandColor: sandColor,
+ dialBackgroundColor: sandColor[10],
+ entryModeIconColor: sandColor,
+ ),
+ textButtonTheme: TextButtonThemeData(
+ style: TextButton.styleFrom(
+ foregroundColor: sandColor,
+ textStyle: theme.textTheme.labelLarge,
+ ),
+ ),
+ ),
+ child: MediaQuery(
+ data: MediaQuery.of(context).copyWith(
+ alwaysUse24HourFormat: true,
+ ),
+ child: child!,
+ ),
+ );
+ },
+ context: context,
+ initialTime: state.servingTime ?? TimeOfDay.now(),
+ initialEntryMode: TimePickerEntryMode.inputOnly,
+ );
+ if (time != null) {
+ cubit.onServingTimeSelected(time);
+ }
+ },
+ child: Container(
+ padding: const EdgeInsets.all(12),
+ decoration: BoxDecoration(
+ border: Border.all(color: colorDivider),
+ borderRadius: const BorderRadius.all(Radius.circular(4)),
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ context.strings.preregistration_serving_time_label,
+ style: theme.textTheme.titleMedium?.copyWith(
+ fontWeight: FontWeight.w500,
+ color: colorHeadlineText,
+ ),
),
- ),
- const SizedBox(height: 8),
- GestureDetector(
- onTap: () async {
- final time = await showTimePicker(
- builder: (context, child) {
- return Theme(
- data: theme.copyWith(
- timePickerTheme: TimePickerThemeData(
- hourMinuteColor: sandColor,
- hourMinuteTextColor: Colors.white,
- dialHandColor: sandColor,
- dialBackgroundColor: sandColor[10],
- entryModeIconColor: sandColor,
- ),
- textButtonTheme: TextButtonThemeData(
- style: TextButton.styleFrom(
- foregroundColor: sandColor,
- textStyle: theme.textTheme.labelLarge,
- ),
- ),
- ),
- child: MediaQuery(
- data: MediaQuery.of(context).copyWith(
- alwaysUse24HourFormat: true,
- ),
- child: child!,
- ),
- );
- },
- context: context,
- initialTime: state.servingTime ?? TimeOfDay.now(),
- initialEntryMode: TimePickerEntryMode.inputOnly,
- );
- if (time != null) {
- cubit.onServingTimeSelected(time);
- }
- },
- child: Text(
+ Text(
state.servingTime != null
? state.servingTime!.format(context)
: '--:--',
- style: theme.textTheme.bodyMedium
+ style: theme.textTheme.bodyMedium,
),
- ),
- ],
+ ],
+ ),
),
),
- const SizedBox(height: 16),
+ const SizedBox(height: 24),
// Comment field
Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
- color: sandColor[10],
- borderRadius: const BorderRadius.all(Radius.circular(10)),
+ border: Border.all(color: colorDivider),
+ borderRadius: const BorderRadius.all(Radius.circular(4)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -219,7 +219,6 @@ class PreregConfirmationPage extends StatelessWidget {
decoration: InputDecoration(
hintText: context.strings.preregistration_comment_hint,
hintStyle: theme.textTheme.bodyMedium?.copyWith(
- color: colorHeadlineText,
fontWeight: FontWeight.w600,
),
border: InputBorder.none,
@@ -257,6 +256,7 @@ class PreregConfirmationPage extends StatelessWidget {
'${context.strings.preregistration_accept_terms_prefix} ',
style: theme.textTheme.bodySmall?.copyWith(
color: colorHeadlineText,
+ fontSize: 13,
),
),
GestureDetector(
@@ -269,6 +269,7 @@ class PreregConfirmationPage extends StatelessWidget {
color: sandColor,
decoration: TextDecoration.underline,
decorationColor: sandColor,
+ fontSize: 13,
),
),
),
@@ -276,6 +277,7 @@ class PreregConfirmationPage extends StatelessWidget {
' ${context.strings.preregistration_accept_terms_and} ',
style: theme.textTheme.bodySmall?.copyWith(
color: colorHeadlineText,
+ fontSize: 13,
),
),
GestureDetector(
@@ -288,6 +290,7 @@ class PreregConfirmationPage extends StatelessWidget {
color: sandColor,
decoration: TextDecoration.underline,
decorationColor: sandColor,
+ fontSize: 13,
),
),
),