Merge branch 'beta' into 'main'

Version 1.1.1

See merge request fedeo/software!4
This commit is contained in:
2025-01-23 10:40:39 +00:00
6 changed files with 60 additions and 30 deletions

View File

@@ -31,7 +31,7 @@ const setupPage = async () => {
console.log(item.value)
} else if(mode.value === "list") {
//Load Data for List
items.value = await useSupabaseSelect(type, dataType.supabaseSelectWithInformation || "*", dataType.supabaseSortColumn)
items.value = await useSupabaseSelect(type, dataType.supabaseSelectWithInformation || "*", dataType.supabaseSortColumn,dataType.supabaseSortAscending || false)
}
loaded.value = true

View File

@@ -23,6 +23,11 @@ const setupPage = () => {
//setStartEnd()
}
oldItemInfo.value = itemInfo.value
if(route.query) {
if(route.query.profile) itemInfo.value.profile = route.query.profile
}
}
/*const setStartEnd = () => {

View File

@@ -12,16 +12,27 @@ const dataStore = useDataStore()
const profileStore = useProfileStore()
const supabase = useSupabaseClient()
const router = useRouter()
const route = useRoute()
const filterUser = ref(profileStore.activeProfile.id || "")
const workingtimes = ref([])
const setupPage = async () => {
if(route.query) {
if(route.query.profile) filterUser.value = route.query.profile
}
workingtimes.value = (await supabase.from("workingtimes").select().eq("profile",filterUser.value).order("startDate",{ascending: false})).data
}
const changeFilterUser = async () => {
await router.push(`/workingtimes/?profile=${filterUser.value}`)
await setupPage()
}
setupPage()
@@ -147,9 +158,9 @@ const setEndDate = (row) => {
<UDashboardNavbar title="Anwesenheiten">
<template #right>
<UButton
@click="router.push(`/workingtimes/edit`)"
@click="router.push(`/workingtimes/edit?profile=${filterUser}`)"
>
Erstellen
+ Anwesenheit
</UButton>
</template>
</UDashboardNavbar>
@@ -161,7 +172,7 @@ const setEndDate = (row) => {
option-attribute="fullName"
value-attribute="id"
v-model="filterUser"
@change="setupPage"
@change="changeFilterUser"
>
<template #label>
{{profileStore.getProfileById(filterUser) ? profileStore.getProfileById(filterUser).fullName : "Kein Benutzer ausgewählt"}}