fix shifts modal after refactoring
This commit is contained in:
@ -5,7 +5,7 @@ import axiosInstance from 'src/axiosSecure';
|
|||||||
|
|
||||||
const PublisherShiftsModal = ({ publisher, _shifts, onClose, date, onAssignmentChange }) => {
|
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
|
//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));
|
const monthInfo = common.getMonthDatesInfo(new Date(date));
|
||||||
|
@ -882,7 +882,7 @@ export default function CalendarPage({ initialEvents, initialShifts }) {
|
|||||||
{isModalOpen && (
|
{isModalOpen && (
|
||||||
<PublisherShiftsModal
|
<PublisherShiftsModal
|
||||||
publisher={modalPub}
|
publisher={modalPub}
|
||||||
shifts={allShifts}
|
_shifts={allShifts}
|
||||||
onClose={() => setIsModalOpen(false)}
|
onClose={() => setIsModalOpen(false)}
|
||||||
date={value}
|
date={value}
|
||||||
onAssignmentChange={handleAssignmentChange}
|
onAssignmentChange={handleAssignmentChange}
|
||||||
|
Reference in New Issue
Block a user