Allow orphaned event and shit slots

When editing the slots of events and shifts there are certain situations
where the event or shift a slot should belong to becomes unclear or
difficult to reliably assign.  For example when adding a new slot in the
UI it may be desirable to do so before the user has input the event
or shift the slot should belong to.

In these cases, not being able to store the slot into the schedule makes
the UI logic needlessly complicated.  Allow slots to be added that do
not have its assiated relation linked up to make editing and handling
such scenarios easier.
This commit is contained in:
Hornwitser 2025-06-27 18:34:37 +02:00
parent d49ed38185
commit 73b28834a1
3 changed files with 45 additions and 38 deletions

View file

@ -123,7 +123,7 @@
<button
v-if="es.slot.isModified()"
type="button"
@click="es.event.discardSlot(es.slot.id)"
@click="schedule.discardEventSlot(es.slot.id)"
>Revert</button>
</td>
</template>

View file

@ -124,7 +124,7 @@
<button
v-if="ss.slot.isModified()"
type="button"
@click="ss.shift.discardSlot(ss.slot.id)"
@click="schedule.discardShiftSlot(ss.slot.id)"
>Revert</button>
</td>
</template>