Fix notifications max time check
This commit is contained in:
parent
1f3e0596b1
commit
1e5afda77c
1 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ import { setSession } from '@/src/store/dataStore';
|
||||||
import { ThemedIcon } from '@/src/components/themed/ThemedIcon';
|
import { ThemedIcon } from '@/src/components/themed/ThemedIcon';
|
||||||
|
|
||||||
interface NotificationType {
|
interface NotificationType {
|
||||||
key: 'dayBefore' | 'sameDay' | 'pickup';
|
key: string;
|
||||||
label: string;
|
label: string;
|
||||||
defaultTime: string;
|
defaultTime: string;
|
||||||
minTime?: string;
|
minTime?: string;
|
||||||
|
@ -131,8 +131,8 @@ export default function CategoryScreen() {
|
||||||
Message.error( t( "notifications-before-16-00" ) );
|
Message.error( t( "notifications-before-16-00" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (notification.minTime) {
|
} else if (notification.maxTime) {
|
||||||
const maxDate = new Date( `1970-01-01T${notification.minTime}` );
|
const maxDate = new Date( `1970-01-01T${notification.maxTime}` );
|
||||||
if (maxDate < selectedDate) {
|
if (maxDate < selectedDate) {
|
||||||
Message.error( t( "notifications-after-09-00" ) );
|
Message.error( t( "notifications-after-09-00" ) );
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue