fix: update slot start time validation to check against the current day
- Modified the validation logic to ensure that the slot start time is not before the current day, preventing past slots from being created.
This commit is contained in:
parent
cfa5a02ca9
commit
7a89cfa7ce
@ -40,7 +40,7 @@ export default {
|
||||
if (datetime_start) {
|
||||
const now = dayjs().tz(DEFAULT_TZ);
|
||||
const slotStart = dayjs(datetime_start).tz(DEFAULT_TZ);
|
||||
if (slotStart.isBefore(now, 'minute')) {
|
||||
if (slotStart.isBefore(now, 'day')) {
|
||||
throw new Error(ERR_PAST_SLOT);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user