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