minor changes
This commit is contained in:
parent
874be7fc90
commit
97f135b69d
3 changed files with 8 additions and 3 deletions
|
|
@ -54,8 +54,8 @@ class ScheduleFinal extends Component<ScheduleFinalProps, ScheduleOverridesState
|
|||
|
||||
const currentTimeHidden = currentTimeX < 0 || currentTimeX > 1;
|
||||
|
||||
console.log(toJS(shifts));
|
||||
console.log(toJS(layers));
|
||||
/* console.log('shifts', toJS(shifts));
|
||||
console.log('layers', toJS(layers)); */
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -89,6 +89,11 @@ export const enrichLayers = (
|
|||
shiftId: Shift['id'] | 'new',
|
||||
priority: Shift['priority_level']
|
||||
) => {
|
||||
/*const event = newEvents.find((event) => !event.is_gap);
|
||||
if (event) {
|
||||
shiftId = event.shift.pk;
|
||||
}*/
|
||||
|
||||
const updatingLayer = {
|
||||
priority,
|
||||
shifts: [{ shiftId: shiftId, events: fillGaps(newEvents.filter((event: Event) => !event.is_gap)) }],
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ export class ScheduleStore extends BaseStore {
|
|||
this.rotationPreview = layers;
|
||||
}
|
||||
|
||||
this.finalPreview = splitToShiftsAndFillGaps(response.final); /*.filter((shift) => shift.shiftId !== shiftId);*/
|
||||
this.finalPreview = splitToShiftsAndFillGaps(response.final).filter((shift) => shift.shiftId !== shiftId);
|
||||
}
|
||||
|
||||
async updateRotation(shiftId: Shift['id'], params: Partial<Shift>) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue