Fix: add option to choose 24 hour working slot (#4018)

* Add option to choose 24 hour working slot

* fix spec

* add check to update open hour and close hour for open all day

* update 24 hour working slot change in widget side

* add validation to check open_all_day and closed_all_day true at the same time
This commit is contained in:
Aswin Dev P.S 2022-02-22 01:28:49 -08:00 committed by GitHub
parent 7ba24b90c4
commit e348db1e37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 151 additions and 19 deletions

View file

@ -31,9 +31,12 @@ export default {
closeHour,
closeMinute,
closedAllDay,
openAllDay,
} = this.currentDayAvailability;
const { utcOffset } = this.channelConfig;
if (openAllDay) return true;
if (closedAllDay) return false;
const startTime = buildDateFromTime(openHour, openMinute, utcOffset);
@ -56,6 +59,7 @@ export default {
openMinute: workingHourConfig.open_minutes,
closeHour: workingHourConfig.close_hour,
closeMinute: workingHourConfig.close_minutes,
openAllDay: workingHourConfig.open_all_day,
};
},
isInBusinessHours() {