fix "Нова смяна" shift name on manual shifts

This commit is contained in:
Dobromir Popov
2025-08-16 23:26:05 +03:00
parent 87302d3982
commit d0dab4e064

View File

@@ -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,