id |
name |
+ timetableName |
host |
notice |
description |
@@ -32,6 +33,13 @@
v-model="event.name"
>
+
+
+ |
|
+
+
+ |
| {{ event.id }} |
{{ event.name }} |
+ {{ event.timetableName }} |
{{ event.host }} |
{{ event.notice }} |
{{ event.description }} |
@@ -157,6 +172,7 @@ function canEdit(event: ClientScheduleEvent) {
}
const newEventName = ref("");
+const newEventShortName = ref("");
const newEventHost = ref("");
const newEventNotice = ref("");
const newEventDescription = ref("");
@@ -178,6 +194,7 @@ function newEvent() {
schedule.value,
schedule.value.nextClientId--,
newEventName.value,
+ newEventShortName.value,
!newEventPublic.value,
newEventHost.value,
false,
@@ -189,6 +206,7 @@ function newEvent() {
);
schedule.value.events.add(event);
newEventName.value = "";
+ newEventShortName.value = "";
newEventHost.value = "";
newEventNotice.value = "";
newEventDescription.value = "";
diff --git a/components/Timetable.vue b/components/Timetable.vue
index 403c77b..86e4af9 100644
--- a/components/Timetable.vue
+++ b/components/Timetable.vue
@@ -106,7 +106,7 @@
:title="cell.event?.name"
>
{{ cell.event?.notice ? "⚠️" : undefined }}
- {{ cell.event?.name }}
+ {{ cell.event?.timetableName || cell.event?.name }}
diff --git a/shared/types/api.ts b/shared/types/api.ts
index eb192a4..b72ccb6 100644
--- a/shared/types/api.ts
+++ b/shared/types/api.ts
@@ -89,6 +89,7 @@ export type ApiScheduleEventSlot = z.infer;
export const apiScheduleEventSchema = defineApiEntity({
name: z.string(),
+ timetableName: z.optional(z.string()),
crew: z.optional(z.boolean()),
host: z.optional(z.string()),
cancelled: z.optional(z.boolean()),
diff --git a/stores/schedules.ts b/stores/schedules.ts
index 9f120e6..9d0a097 100644
--- a/stores/schedules.ts
+++ b/stores/schedules.ts
@@ -19,6 +19,10 @@ export const useSchedulesStore = defineStore("schedules", () => {
pendingSyncs: ref