trying setup store

This commit is contained in:
Sockenklaus
2021-11-15 16:48:56 +01:00
parent cea22ed0ef
commit 174cb17b04
5 changed files with 103 additions and 20 deletions

View File

@@ -2,7 +2,7 @@
AddEmployeeModal(
:searchData="rows"
:searchData="store.rows"
:searchFields="['first_name', 'last_name']"
:searchRow="addEmployeeRow"
:modalId="modalId"
@@ -69,7 +69,7 @@ AddEmployeeModal(
import { watch, computed, ref } from 'vue'
import type { Ref, ComputedRef } from 'vue'
import { storeToRefs } from 'pinia'
import { useEmployees } from '@/stores/employees'
import useEmployees from '@/stores/employees'
import { addMonths, eachMonthOfInterval, subDays, addDays, format, getISODay, getYear, getMonth, getDaysInMonth } from 'date-fns'
import { de } from 'date-fns/locale'
import AddEmployeeModal from '@/components/Schedule/AddEmployeeModal.vue'
@@ -145,7 +145,7 @@ AddEmployeeModal(
const addEmployeeRow : Ref<number> = ref(-1)
const addEmployeeMonth : Ref<number> = ref(-1)
const scheduleData : Ref<ScheduleData> = ref(getScheduleData())
const { rows } = storeToRefs(store)
// const { rows } = storeToRefs(store)
const selected : Ref<string[]> = ref([])
const shiftAnchor : Ref<Coordinates | undefined> = ref(undefined)