diff --git a/src/components/Widget.vue b/src/components/Widget.vue index 2b78167..139616d 100644 --- a/src/components/Widget.vue +++ b/src/components/Widget.vue @@ -1,25 +1,53 @@ - - - Dienste diesen Monat: {{ jobs }} - - + + + + + + + Anstehende Dienste + {{ jobs }} + Nächster Dienst + {{ formatDate(nextJob) }} + + + Keine anstehenden Dienste + diff --git a/src/store/index.ts b/src/store/index.ts index f055256..75f3ce9 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -166,6 +166,15 @@ export const useEventStore = defineStore({ .then(({ data }) => fixJob(data)); }, + async getJobs(filter?: FG.PaginationFilter) { + return api + .get>('/events/jobs', { params: filter }) + .then(({ data }) => { + data.result.forEach((j) => fixJob(j)); + return data; + }); + }, + /** * Send invite to job or transfer to other user * @param job Job to invite to