fix "Нова смяна" shift name on manual shifts
This commit is contained in:
@@ -598,8 +598,10 @@ export default function CalendarPage({ initialEvents, initialShifts }) {
|
||||
const lastShiftEndTime = new Date(lastShift.endTime);
|
||||
//add 90 minutes
|
||||
const newShiftEndTime = new Date(lastShiftEndTime.getTime() + 90 * 60000);
|
||||
// Generate shift name using the same format as displayed shifts (start-end time)
|
||||
const shiftName = common.getTimeRange(lastShiftEndTime, newShiftEndTime);
|
||||
await axiosInstance.post(`/api/data/shifts`, {
|
||||
name: "Нова смяна",
|
||||
name: shiftName,
|
||||
startTime: lastShiftEndTime,
|
||||
endTime: newShiftEndTime,
|
||||
isPublished: false,
|
||||
|
Reference in New Issue
Block a user