Compare commits
	
		
			1 Commits
		
	
	
		
			4d3654f08a
			...
			8b6fd67f1d
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 8b6fd67f1d | 
|  | @ -45,8 +45,8 @@ | |||
| 
 | ||||
| <script lang="ts"> | ||||
| import { computed, defineComponent, onBeforeMount, ref } from 'vue'; | ||||
| import { useScheduleStore } from '../../store'; | ||||
| import { date, scroll } from 'quasar'; | ||||
| import { useEventStore } from '../../store'; | ||||
| import { date } from 'quasar'; | ||||
| import EditEvent from '../management/EditEvent.vue'; | ||||
| import EventSlot from '../overview/slots/EventSlot.vue'; | ||||
| 
 | ||||
|  | @ -59,7 +59,7 @@ export default defineComponent({ | |||
|       [index: string]: FG.Event[]; | ||||
|     } | ||||
| 
 | ||||
|     const store = useScheduleStore(); | ||||
|     const store = useEventStore(); | ||||
| 
 | ||||
|     const editor = ref<FG.Event | undefined>(undefined); | ||||
|     const events = ref<FG.Event[]>([]); | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| import { api, isAxiosError } from '@flaschengeist/api'; | ||||
| import { AxiosError } from 'axios'; | ||||
| import { defineStore } from 'pinia'; | ||||
| 
 | ||||
| interface UserService { | ||||
|  | @ -18,7 +17,7 @@ function fixEvent(event: FG.Event) { | |||
|   event.jobs.forEach((job) => fixJob(job)); | ||||
| } | ||||
| 
 | ||||
| export const useScheduleStore = defineStore({ | ||||
| export const useEventStore = defineStore({ | ||||
|   id: 'events', | ||||
| 
 | ||||
|   state: () => ({ | ||||
|  | @ -89,8 +88,7 @@ export const useScheduleStore = defineStore({ | |||
|         const idx = this.templates.findIndex((v) => v.id === id); | ||||
|         if (idx !== -1) this.templates.splice(idx, 1); | ||||
|       } catch (e) { | ||||
|         const error = <AxiosError>e; | ||||
|         if (error.response && error.response.status === 404) return false; | ||||
|         if (isAxiosError(e, 404)) return false | ||||
|         throw e; | ||||
|       } | ||||
|       return true; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue