Changes
This commit is contained in:
@@ -35,7 +35,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
labelSingle: "Vertrag",
|
||||
redirect:true
|
||||
},
|
||||
absenceRequests: {
|
||||
absencerequests: {
|
||||
label: "Abwesenheitsanträge",
|
||||
labelSingle: "Abwesenheitsantrag",
|
||||
redirect:true
|
||||
@@ -174,7 +174,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
const historyItems = ref([])
|
||||
const numberRanges = ref([])
|
||||
const notifications = ref([])
|
||||
const absenceRequests = ref([])
|
||||
const absencerequests = ref([])
|
||||
const accounts = ref([])
|
||||
const taxTypes = ref([])
|
||||
const plants = ref([])
|
||||
@@ -369,7 +369,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
historyItems.value = []
|
||||
numberRanges.value = []
|
||||
notifications.value = []
|
||||
absenceRequests.value = []
|
||||
absencerequests.value = []
|
||||
accounts.value = []
|
||||
taxTypes.value = []
|
||||
plants.value = []
|
||||
@@ -647,7 +647,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
notifications.value = (await supabase.from("notifications").select().eq('tenant', currentTenant.value).order("created_at", {ascending: false})).data
|
||||
}
|
||||
async function fetchAbsenceRequests () {
|
||||
absenceRequests.value = (await supabase.from("absencerequests").select().eq('tenant', currentTenant.value)).data
|
||||
absencerequests.value = (await supabase.from("absencerequests").select().eq('tenant', currentTenant.value)).data
|
||||
}
|
||||
async function fetchAccounts () {
|
||||
accounts.value = (await supabase.from("accounts").select()).data
|
||||
@@ -957,14 +957,15 @@ export const useDataStore = defineStore('data', () => {
|
||||
backgroundColor: "black"
|
||||
}
|
||||
}),
|
||||
...absenceRequests.value.map(absence => {
|
||||
...absencerequests.value.map(absence => {
|
||||
return {
|
||||
id: absence.id,
|
||||
resourceId: absence.user,
|
||||
resourceType: "person",
|
||||
title: absence.reason,
|
||||
title: `Abw.: ${absence.reason}`,
|
||||
start: dayjs(absence.start).toDate(),
|
||||
end: dayjs(absence.end).add(1,'day').toDate(),
|
||||
allDay: true
|
||||
allDay: true,
|
||||
}
|
||||
})
|
||||
]
|
||||
@@ -1017,11 +1018,12 @@ export const useDataStore = defineStore('data', () => {
|
||||
backgroundColor: "black"
|
||||
}
|
||||
}),*/
|
||||
...absenceRequests.value.map(absence => {
|
||||
...absencerequests.value.map(absence => {
|
||||
return {
|
||||
id: absence.id,
|
||||
resourceId: absence.user,
|
||||
resourceType: "person",
|
||||
title: absence.reason,
|
||||
title: `Abw.: ${absence.reason}`,
|
||||
start: dayjs(absence.start).toDate(),
|
||||
end: dayjs(absence.end).add(1,'day').toDate(),
|
||||
allDay: true
|
||||
@@ -1094,7 +1096,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
})
|
||||
|
||||
const getAbsenceRequestById = computed(() => (itemId) => {
|
||||
return absenceRequests.value.find(item => item.id === itemId)
|
||||
return absencerequests.value.find(item => item.id === itemId)
|
||||
})
|
||||
|
||||
const getProfileById = computed(() => (itemId) => {
|
||||
@@ -1183,7 +1185,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
historyItems,
|
||||
numberRanges,
|
||||
notifications,
|
||||
absenceRequests,
|
||||
absencerequests,
|
||||
accounts,
|
||||
taxTypes,
|
||||
plants,
|
||||
|
||||
Reference in New Issue
Block a user