Introduced ProfileStore

Corrected All Links to DataStore
This commit is contained in:
2024-12-21 22:33:42 +01:00
parent 813944fc23
commit b465f4a75a
64 changed files with 508 additions and 959 deletions

View File

@@ -23,10 +23,9 @@ defineShortcuts({
})
const dataStore = useDataStore()
const profileStore = useProfileStore()
const route = useRoute()
const router = useRouter()
const toast = useToast()
const id = ref(route.params.id ? route.params.id : null )
const openTab = ref(0)
@@ -39,7 +38,8 @@ const itemInfo = ref({
country: "Deutschland"
},
active: true,
isCompany: true
isCompany: true,
profiles: [profileStore.activeProfile.id]
})
const oldItemInfo = ref({})
@@ -356,6 +356,23 @@ setupPage()
v-model="itemInfo.infoData.ustid"
/>
</UFormGroup>
<UFormGroup
label="Berechtigte Benutzer:"
>
<USelectMenu
v-model="itemInfo.profiles"
:options="profileStore.profiles"
option-attribute="fullName"
value-attribute="id"
searchable
multiple
:search-attributes="['fullName']"
>
<template #label>
{{itemInfo.profiles.length > 0 ? itemInfo.profiles.map(i => profileStore.getProfileById(i).fullName).join(", ") : "Kein Benutzer ausgewählt"}}
</template>
</USelectMenu>
</UFormGroup>
</UForm>
</UDashboardPanelContent>