Some Tidying

This commit is contained in:
2024-11-08 18:42:42 +01:00
parent a61382486f
commit 27ccfd2c72
4 changed files with 40 additions and 18 deletions

View File

@@ -3,6 +3,17 @@
const dataStore = useDataStore()
const supabase = useSupabaseClient()
const itemInfo = ref({
features: {},
businessInfo: {},
projectTypes: []
})
const setupPage = async () => {
itemInfo.value = (await supabase.from("tenants").select().eq("id",dataStore.currentTenant).single()).data
console.log(itemInfo.value)
}
const features = ref(dataStore.ownTenant.features)
const businessInfo = ref(dataStore.ownTenant.businessInfo)
@@ -15,6 +26,7 @@ const updateTenant = async (newData) => {
if (error) console.log(error)
}
setupPage()
</script>
<template>
@@ -33,27 +45,27 @@ const updateTenant = async (newData) => {
},{
label: 'Bankkonten'
},{
label: 'Tags'
label: 'Projekte'
}
]"
>
<template #item="{item}">
<UCard class="mt-5">
<div v-if="item.label === 'Rechnung & Kontakt'">
<div v-if="item.label === 'Rechnung & Kontakt'">
<UCard class="mt-5">
<UForm class="w-1/2">
<UFormGroup
label="Firmenname:"
label="Firmenname:"
>
<UInput v-model="businessInfo.name"/>
</UFormGroup>
<UFormGroup
label="Straße + Hausnummer:"
label="Straße + Hausnummer:"
>
<UInput v-model="businessInfo.street"/>
</UFormGroup>
<UFormGroup
label="PLZ + Ort"
class="w-full"
label="PLZ + Ort"
class="w-full"
>
<InputGroup class="w-full">
<UInput v-model="businessInfo.zip"/>
@@ -67,14 +79,17 @@ const updateTenant = async (newData) => {
Speichern
</UButton>
</UForm>
</div>
<div v-else-if="item.label === 'Funktionen'">
</UCard>
</div>
<div v-else-if="item.label === 'Funktionen'">
<UCard class="mt-5">
<UAlert
title="Funktionen ausblenden"
description="Nur Funktionen mit gesetztem Haken sind im Unternehmen verfügbar. Diese Einstellungen gelten für alle Mitarbeiter und sind unabhängig von Berechtigungen."
color="rose"
variant="outline"
class="mb-5"
title="Funktionen ausblenden"
description="Nur Funktionen mit gesetztem Haken sind im Unternehmen verfügbar. Diese Einstellungen gelten für alle Mitarbeiter und sind unabhängig von Berechtigungen."
color="rose"
variant="outline"
class="mb-5"
/>
<UCheckbox
label="Kalendar"
@@ -133,6 +148,13 @@ const updateTenant = async (newData) => {
/>
</div>
</UCard>
</UCard>
</div>
<div v-else-if="item.label === 'Projekte'">
<UCard class="mt-5">
<template #header>Projekttypen</template>
</UCard>
</div>
</template>
</UTabs>
</template>