diff --git a/src/store.ts b/src/store.ts index 1d74b50..166f625 100644 --- a/src/store.ts +++ b/src/store.ts @@ -42,8 +42,13 @@ export const useScheduleStore = defineStore({ }, async addJobType(name: string) { - await api.post('/events/job-types', { name: name }); - //TODO: HAndle new JT + try { + const { data } = await api.post('/events/job-types', { name: name }); + this.jobTypes.push(data) + } catch (error) { + // TODO: HANDLE ERROR + throw error + } }, async removeJobType(id: number) {