Merge branch 'beta'

# Conflicts:
#	components/DocumentDisplay.vue
#	components/MainNav.vue
#	composables/useRole.js
#	composables/useSupabase.js
#	pages/createDocument/edit/[[id]].vue
#	pages/files/index.vue
#	pages/inventoryitems/index.vue
#	pages/services/[mode]/[[id]].vue
#	pages/vendors/[mode]/[[id]].vue
#	stores/data.js
This commit is contained in:
2025-01-20 11:05:22 +01:00
135 changed files with 7403 additions and 11455 deletions

View File

@@ -1,5 +1,6 @@
<script setup>
const dataStore = useDataStore()
const profileStore = useProfileStore()
const route = useRoute()
const supabase = useSupabaseClient()
const toast = useToast()
@@ -43,7 +44,7 @@ const generateLink = async () => {
body: {
method: "generateLink",
institutionId: bankData.value.id,
tenant: dataStore.currentTenant
tenant: profileStore.currentTenant
}
})
@@ -62,7 +63,7 @@ const addAccount = async (account) => {
accountId: account.id,
ownerName: account.owner_name,
iban: account.iban,
tenant: dataStore.currentTenant,
tenant: profileStore.currentTenant,
bankId: account.institution_id
}

View File

@@ -2,6 +2,7 @@
import axios from "axios"
const supabase = useSupabaseClient()
const dataStore = useDataStore()
const profileStore = useProfileStore()
const createEMailAddress = ref("")
const createEMailType = ref("imap")
@@ -22,7 +23,7 @@ const createAccount = async () => {
body: {
emailAddress: createEMailAddress.value,
accountType: createEMailType.value,
profile: dataStore.activeProfile.id
profile: profileStore.activeProfile.id
}
})
@@ -95,11 +96,14 @@ const columns = computed(() => templateColumns.filter((column) => selectedColumn
</UModal>
<UDashboardNavbar title="E-Mail Konten">
<template #right>
<UButton
@click="showEmailAddressModal = true"
>
+ E-Mail Konto
</UButton>
<UTooltip title="In der Beta nicht verfügbar">
<UButton
@click="showEmailAddressModal = true"
>
+ E-Mail Konto
</UButton>
</UTooltip>
</template>
</UDashboardNavbar>
<UTable
@@ -110,10 +114,10 @@ const columns = computed(() => templateColumns.filter((column) => selectedColumn
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine E-Mail Konten anzuzeigen' }"
>
<template #profiles-data="{row}">
{{row.profiles.map(i => profiles.find(x => x.id === i).fullName).join(", ")}}
{{row.profiles}}
</template>
<template #mailboxes-data="{row}">
{{row.mailboxes.map(i => i.name).join(", ")}}
{{row.mailboxes}}
</template>
</UTable>
</template>

View File

@@ -3,6 +3,7 @@ definePageMeta({
middleware: "auth"
})
const dataStore = useDataStore()
const profileStore = useProfileStore()
const supabase = useSupabaseClient()
const router = useRouter()
@@ -71,14 +72,14 @@ const isLight = computed({
/>
<InputGroup>
<UBadge
v-for="tag in dataStore.ownTenant.tags.documents"
v-for="tag in profileStore.ownTenant.tags.documents"
>
{{tag}}
</UBadge>
</InputGroup>
{{dataStore.ownTenant.tags}}
{{profileStore.ownTenant.tags}}
</div>
</UCard>

View File

@@ -87,6 +87,7 @@ defineShortcuts({
const router = useRouter()
const supabase = useSupabaseClient()
const dataStore = useDataStore()
const profileStore = useProfileStore()
const mode = useRoute().params.mode
const openTab = ref(0)
@@ -106,7 +107,7 @@ const renderDemoZPL = () => {
const printLabel = async () => {
await supabase.from("printJobs").insert({
tenant: dataStore.currentTenant,
tenant: profileStore.currentTenant,
rawContent: useGenerateZPL(itemInfo.value.handlebarsZPL,{barcode:"XXX"}),
printerName: "ZD411",
printServer: "0dbe30f3-3008-4cde-8a7c-e785b1c22bfc"

View File

@@ -5,6 +5,7 @@ definePageMeta({
const supabase = useSupabaseClient()
const dataStore = useDataStore()
const profileStore = useProfileStore()
@@ -35,19 +36,22 @@ const resources = {
},
confirmationOrders: {
label: "Auftragsbestätigungen"
},
deliveryNotes: {
label: "Lieferscheine"
}
}
const numberRanges = ref(dataStore.ownTenant.numberRanges)
const numberRanges = ref(profileStore.ownTenant.numberRanges)
const updateNumberRanges = async (range) => {
const {data,error} = await supabase
.from("tenants")
.update({numberRanges: numberRanges.value})
.eq('id',dataStore.currentTenant)
.eq('id',profileStore.currentTenant)
await dataStore.fetchOwnTenant()
await profileStore.fetchOwnTenant()
}

View File

@@ -16,12 +16,6 @@ const setupPage = async () => {
>
</UDashboardNavbar>
{{dataStore.ownTenant.ownFields}}
</template>
<style scoped>

View File

@@ -1,6 +1,7 @@
<script setup>
const dataStore = useDataStore()
const profileStore = useProfileStore()
const supabase = useSupabaseClient()
const itemInfo = ref({
@@ -10,17 +11,17 @@ const itemInfo = ref({
})
const setupPage = async () => {
itemInfo.value = (await supabase.from("tenants").select().eq("id",dataStore.currentTenant).single()).data
itemInfo.value = (await supabase.from("tenants").select().eq("id",profileStore.currentTenant).single()).data
console.log(itemInfo.value)
}
const features = ref(dataStore.ownTenant.features)
const businessInfo = ref(dataStore.ownTenant.businessInfo)
const features = ref(profileStore.ownTenant.features)
const businessInfo = ref(profileStore.ownTenant.businessInfo)
const updateTenant = async (newData) => {
const {data,error} = await supabase.from("tenants")
.update(newData)
.eq("id",dataStore.currentTenant)
.eq("id",profileStore.currentTenant)
.select()
if (error) console.log(error)
@@ -38,10 +39,6 @@ setupPage()
:items="[
{
label: 'Rechnung & Kontakt'
}/*,{
label: 'Lizenz'
}*/,{
label: 'Funktionen'
}
]"
>