From 58f7ec69f8fed1bb5b2aa79e471cadf6aa79b202 Mon Sep 17 00:00:00 2001 From: raviramnani Date: Tue, 30 Jul 2024 16:42:06 +0530 Subject: [PATCH 1/3] Added check for number of tickets to be less than 1ooo in price_screen.dart --- evently/lib/screens/price_screen.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evently/lib/screens/price_screen.dart b/evently/lib/screens/price_screen.dart index 267ad84545..d955b4570e 100644 --- a/evently/lib/screens/price_screen.dart +++ b/evently/lib/screens/price_screen.dart @@ -217,8 +217,8 @@ class _PriceScreenState extends State { isContinueEnable: provider.isFreeDrop == FreeDrop.unselected ? false : provider.isFreeDrop == FreeDrop.yes - ? provider.numberOfTickets > 0 - : provider.numberOfTickets > 0 && provider.price > 0, + ? (provider.numberOfTickets > 0 && provider.numberOfTickets <= 1000) + : (provider.numberOfTickets > 0 && provider.numberOfTickets <= 1000 && provider.price > 0), ), ) ], From 6c5167f29c77a297cb26bbedea80b886d9950792 Mon Sep 17 00:00:00 2001 From: raviramnani Date: Tue, 30 Jul 2024 16:45:18 +0530 Subject: [PATCH 2/3] solved thumbnail box bottom overflown by 13 pixel error in overview_screen.dart --- evently/lib/screens/overview_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evently/lib/screens/overview_screen.dart b/evently/lib/screens/overview_screen.dart index 8c5bd9ee0b..568270aca3 100644 --- a/evently/lib/screens/overview_screen.dart +++ b/evently/lib/screens/overview_screen.dart @@ -120,7 +120,7 @@ class _OverViewScreenState extends State { onTap: () => provider.pickThumbnail(), child: Container( width: double.infinity, - height: 180, + height: 200, padding: EdgeInsets.symmetric(vertical: 20.w), child: Column( children: [ From 1721d685858e9e25ec1719f5017e3b78da2f181f Mon Sep 17 00:00:00 2001 From: raviramnani Date: Tue, 30 Jul 2024 16:49:03 +0530 Subject: [PATCH 3/3] Added time validation if the date is same in detail_screen.dart --- evently/lib/screens/detail_screen.dart | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/evently/lib/screens/detail_screen.dart b/evently/lib/screens/detail_screen.dart index 5d62fde20b..5cb6a9b36b 100644 --- a/evently/lib/screens/detail_screen.dart +++ b/evently/lib/screens/detail_screen.dart @@ -181,7 +181,7 @@ class _DetailsScreenState extends State { if (_validateDates(provider)) { createEventViewModel.nextPage(); } else { - _showSnackBarWithPostFrameCallback('End date cannot be before start date!'); + _showSnackBarWithPostFrameCallback('End of event cannot be before start of event!'); } }, onPressSaveDraft: () { @@ -192,7 +192,7 @@ class _DetailsScreenState extends State { uploadStep: UploadStep.detail, ); } else { - _showSnackBarWithPostFrameCallback('End date cannot be before start date!'); + _showSnackBarWithPostFrameCallback('End of event cannot be before start of event!'); } }, isContinueEnable: provider.startDate.isNotEmpty && @@ -258,6 +258,15 @@ class _DetailsScreenState extends State { if (end.isBefore(start)) { return false; // End date is before start date } + // Check times if the dates are the same + if (provider.startDate.compareTo(provider.endDate) == 0) { + final DateTime startTime = DateFormat('HH:mm').parse(provider.startTime); + final DateTime endTime = DateFormat('HH:mm').parse(provider.endTime); + + if (endTime.isBefore(startTime)) { + return false; // End time is before start time on the same day + } + } } catch (e) { return false; // Invalid date format }