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:
vchikalkin 2025-08-02 18:37:42 +03:00
parent cfa5a02ca9
commit 7a89cfa7ce

View File

@ -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);
}
}