Compare commits

...

1 Commits

Author SHA1 Message Date
Ferdinand Thiessen 4d3654f08a [store] Rename to EventStore 2021-11-21 12:39:02 +01:00
6 changed files with 21 additions and 19 deletions

View File

@ -102,7 +102,7 @@
<script lang="ts">
import { computed, defineComponent, PropType, ref, onBeforeMount } from 'vue';
import { date, ModifyDateOptions } from 'quasar';
import { useScheduleStore } from '../../store';
import { useEventStore } from '../../store';
import { notEmpty } from '@flaschengeist/api';
import { IsoDateInput } from '@flaschengeist/api/components';
import EditJobSlot from './EditJobSlot.vue';
@ -127,7 +127,7 @@ export default defineComponent({
done: (val: boolean) => typeof val === 'boolean',
},
setup(props, { emit }) {
const store = useScheduleStore();
const store = useEventStore();
const startDate = computed(() => {
const d = date.buildDate({milliseconds: 0, seconds: 0, minutes: 0, hours: 0})
if (!props.date || !date.isValid(props.date)) return d

View File

@ -53,7 +53,7 @@
import { defineComponent, computed, onBeforeMount, PropType } from 'vue';
import { IsoDateInput } from '@flaschengeist/api/components';
import { notEmpty } from '@flaschengeist/api';
import { useScheduleStore } from '../../store';
import { useEventStore } from '../../store';
export default defineComponent({
name: 'JobSlot',
@ -73,7 +73,7 @@ export default defineComponent({
'update:modelValue': (job: FG.Job) => !!job,
},
setup(props, { emit }) {
const store = useScheduleStore();
const store = useEventStore();
onBeforeMount(() => store.getJobTypes());

View File

@ -50,8 +50,8 @@
<script lang="ts">
import { isAxiosError } from '@flaschengeist/api';
import { defineComponent, ref, computed, PropType, onBeforeMount } from 'vue';
import { useScheduleStore } from '../../store';
import { Notify, QInput } from 'quasar';
import { useEventStore } from '../../store';
import { useQuasar, QInput } from 'quasar';
export default defineComponent({
name: 'ManageTypes',
@ -61,7 +61,9 @@ export default defineComponent({
title: {type: String, required: true}
},
setup(props) {
const store = useScheduleStore();
const store = useEventStore();
const quasar = useQuasar();
const dialogOpen = ref(false);
const emptyType = { id: -1, name: '' };
const actualType = ref(emptyType);
@ -105,12 +107,12 @@ export default defineComponent({
})
.catch((e) => {
if (isAxiosError(e, 409))
Notify.create({
quasar.notify({
type: 'negative',
message: 'Der Name wird bereits verwendet',
});
else
Notify.create({
quasar.notify({
type: 'negative',
message: 'Unbekannter Fehler beim speichern.',
});

View File

@ -99,7 +99,7 @@
<script lang="ts">
import { ComponentPublicInstance, computed, defineComponent, onBeforeMount, ref } from 'vue';
import { useScheduleStore } from '../../store';
import { useEventStore } from '../../store';
import EventSlot from './slots/EventSlot.vue';
import { date, useQuasar } from 'quasar';
import { startOfWeek } from '@flaschengeist/api';
@ -111,7 +111,7 @@ export default defineComponent({
components: { EventSlot, EditEvent, QCalendarAgenda: <ComponentPublicInstance>QCalendarAgenda },
setup() {
const store = useScheduleStore();
const store = useEventStore();
const quasar = useQuasar();
const selectedDate = ref(date.formatDate(new Date(), 'YYYY-MM-DD'));

View File

@ -36,9 +36,9 @@
<script lang="ts">
import { defineComponent, onBeforeMount, computed, PropType } from 'vue';
import { Notify } from 'quasar';
import { useQuasar } from 'quasar';
import { asHour, useMainStore, useUserStore } from '@flaschengeist/api';
import { useScheduleStore } from '../../../store';
import { useEventStore } from '../../../store';
export default defineComponent({
name: 'JobSlot',
@ -54,10 +54,10 @@ export default defineComponent({
},
emits: { 'update:modelValue': (v: FG.Job) => !!v },
setup(props, { emit }) {
const store = useScheduleStore();
const store = useEventStore();
const mainStore = useMainStore();
const userStore = useUserStore();
const availableUsers = null;
const quasar = useQuasar();
onBeforeMount(async () => userStore.getUsers());
@ -90,7 +90,7 @@ export default defineComponent({
emit('update:modelValue', job);
} catch (error) {
console.warn(error);
Notify.create({
quasar.notify({
group: false,
type: 'negative',
message: 'Fehler beim Eintragen als Dienst',
@ -113,7 +113,7 @@ export default defineComponent({
emit('update:modelValue', job);
} catch (error) {
console.warn(error);
Notify.create({
quasar.notify({
group: false,
type: 'negative',
message: 'Fehler beim Austragen als Dienst',

View File

@ -7,14 +7,14 @@
<script lang="ts">
import { onBeforeMount, defineComponent, ref } from 'vue';
import EditEvent from '../components/management/EditEvent.vue';
import { useScheduleStore } from '../store';
import { useEventStore } from '../store';
import { useRoute } from 'vue-router';
export default defineComponent({
components: { EditEvent },
setup() {
const route = useRoute();
const store = useScheduleStore();
const store = useEventStore();
const event = ref<FG.Event | undefined>(undefined);
onBeforeMount(async () => {
if ('id' in route.params && typeof route.params.id === 'string')