owltide/components/DiffScheduleEventSlot.vue
Hornwitser a32a49b281
All checks were successful
/ build (push) Successful in 1m35s
/ deploy (push) Successful in 16s
Add UI for setting cancelled status
Add indications in event cards, event slot cards and the timetable for
an event or event slot being cancelled by striking it through and
dimming the text colour.  And a checkbox in the event and event slot
list to edit the cancelled status.  And a diff entry for the cancelled
status on events and event slots.
2025-09-21 23:15:10 +02:00

51 lines
1.2 KiB
Vue

<!--
SPDX-FileCopyrightText: © 2025 Hornwitser <code@hornwitser.no>
SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<div>
<h5>{{ state }} slot at {{ slot.start.toFormat("yyyy-LL-dd HH:mm") }}</h5>
<DiffFieldString
title="Start"
:before='slot.serverStart.toFormat("yyyy-LL-dd HH:mm")'
:after='slot.start.toFormat("yyyy-LL-dd HH:mm")'
:state
/>
<DiffFieldString
title="End"
:before='slot.serverEnd.toFormat("yyyy-LL-dd HH:mm")'
:after='slot.end.toFormat("yyyy-LL-dd HH:mm")'
:state
/>
<DiffFieldSetEntityId
title="Locations"
:before="slot.serverLocationIds"
:after="slot.locationIds"
:entities="schedule.locations"
:state
/>
<DiffFieldString
title="Cancelled"
:before='slot.serverCancelled ? "Yes" : "No"'
:after='slot.cancelled ? "Yes" : "No"'
:state
/>
<DiffFieldSetEntityId
title="Assigned"
:before="slot.serverAssigned"
:after="slot.assigned"
:entities="usersStore.users"
:state
/>
</div>
</template>
<script lang="ts" setup>
defineProps<{
schedule: ClientSchedule,
slot: ClientScheduleEventSlot,
state: "deleted" | "created" | "modified",
}>();
const usersStore = useUsersStore();
</script>