fix shifts modal after refactoring

This commit is contained in:
Dobromir Popov
2024-07-06 22:07:02 +03:00
parent a7e2786fc2
commit 0758a15f15
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import axiosInstance from 'src/axiosSecure';
const PublisherShiftsModal = ({ publisher, _shifts, onClose, date, onAssignmentChange }) => {
const [shifts, setShifts] = React.useState([_shifts]);
const [shifts, setShifts] = React.useState([..._shifts]);
//Refactor ToDo: show the whole month instead of just the current week by showing the shift start time in front of the rows, and show all shifts in the month from the first to the last week in the cell where we show one shift now
const monthInfo = common.getMonthDatesInfo(new Date(date));

View File

@ -882,7 +882,7 @@ export default function CalendarPage({ initialEvents, initialShifts }) {
{isModalOpen && (
<PublisherShiftsModal
publisher={modalPub}
shifts={allShifts}
_shifts={allShifts}
onClose={() => setIsModalOpen(false)}
date={value}
onAssignmentChange={handleAssignmentChange}