Add UI to edit and display event notices

Add a warning like display of event notices to the event card and the
event slot card and indicate in the timesheet that an event has a
notice.  Also includes the input controls needed to edit the notice.
This commit is contained in:
Hornwitser 2025-09-06 19:25:20 +02:00
parent adeef4f629
commit 5898a46a1b
5 changed files with 70 additions and 2 deletions

View file

@ -10,6 +10,7 @@
<th>id</th>
<th>name</th>
<th>host</th>
<th>notice</th>
<th>description</th>
<th>p</th>
<th>s</th>
@ -38,6 +39,13 @@
v-model="event.host"
>
</td>
<td>
<textarea
rows="1"
:disabled="!canEdit(event)"
v-model="event.notice"
/>
</td>
<td>
<textarea
rows="1"
@ -81,6 +89,12 @@
v-model="newEventHost"
>
</td>
<td>
<textarea
rows="1"
v-model="newEventNotice"
/>
</td>
<td>
<textarea
rows="1"
@ -116,6 +130,7 @@
<td>{{ event.id }}</td>
<td>{{ event.name }}</td>
<td>{{ event.host }}</td>
<td class="preWrap">{{ event.notice }}</td>
<td class="preWrap">{{ event.description }}</td>
<td>{{ event.crew ? "" : "Yes"}}</td>
<td>{{ event.slots.size ? event.slots.size : "" }}</td>
@ -143,6 +158,7 @@ function canEdit(event: ClientScheduleEvent) {
const newEventName = ref("");
const newEventHost = ref("");
const newEventNotice = ref("");
const newEventDescription = ref("");
const newEventPublic = ref(false);
function eventExists(name: string) {
@ -165,7 +181,7 @@ function newEvent() {
!newEventPublic.value,
newEventHost.value,
false,
"",
newEventNotice.value,
newEventDescription.value,
0,
new Set(),
@ -174,6 +190,7 @@ function newEvent() {
schedule.value.events.add(event);
newEventName.value = "";
newEventHost.value = "";
newEventNotice.value = "";
newEventDescription.value = "";
newEventPublic.value = false;
}