fix availability ui bug
This commit is contained in:
@ -165,7 +165,6 @@ export default function AvailabilityForm({ publisherId, existingItem, inline, on
|
||||
e.preventDefault();
|
||||
try {
|
||||
|
||||
|
||||
if (!availability.name) {
|
||||
// availability.name = "От календара";
|
||||
availability.name = common.getTimeFomatted(availability.startTime) + "-" + common.getTimeFomatted(availability.endTime);
|
||||
@ -174,12 +173,13 @@ export default function AvailabilityForm({ publisherId, existingItem, inline, on
|
||||
availability.dayofweek = common.getDayOfWeekNameEnEnum(availability.startTime);
|
||||
if (availability.repeatWeekly) {
|
||||
availability.dayOfMonth = null;
|
||||
availability.weekOfMonth = 0; //weekly recurrance - no need for week of month. special value 0
|
||||
} else {
|
||||
availability.endDate = null;
|
||||
availability.dayOfMonth = availability.startTime.getDate();
|
||||
}
|
||||
|
||||
delete availability.date; //remove date from availability as it is not part of the db model
|
||||
delete availability.date; //remove date from availability as it is not part of the db model. we store the info in startDate and endDate
|
||||
// ---------------------- CB UI --------------
|
||||
if (config.checkboxUI.enabled) {
|
||||
const selectedSlots = timeSlots.filter(slot => slot.isChecked);
|
||||
|
Reference in New Issue
Block a user