Restructured IncomingInvoices

Added Aspect Ration to DocumentDisplay.vue
This commit is contained in:
2024-04-16 18:00:35 +02:00
parent 1269d3b838
commit eddaae2d87
11 changed files with 331 additions and 161 deletions

View File

@@ -12,11 +12,14 @@ const props = defineProps({
openShowModal: { openShowModal: {
type: Boolean, type: Boolean,
required: false, required: false,
},
returnEmit: {
type: Boolean
} }
}) })
let {documentData, openShowModal:openShowModalProp } = props; let {documentData, openShowModal:openShowModalProp, returnEmit } = props;
const tags = dataStore.getDocumentTags const tags = dataStore.getDocumentTags
const openShowModal = ref(false) const openShowModal = ref(false)
@@ -128,7 +131,7 @@ const updateDocumentAssignment = async () => {
</script> </script>
<template> <template>
<div class="documentListItem" @click="openDocument"> <div class="documentListItem" @click="returnEmit ? $emit('clicked', documentData.id) : openDocument">
<object <object
:data="`${documentData.url}#toolbar=0&navpanes=0&scrollbar=0`" :data="`${documentData.url}#toolbar=0&navpanes=0&scrollbar=0`"
class="previewEmbed" class="previewEmbed"
@@ -155,7 +158,6 @@ const updateDocumentAssignment = async () => {
v-model="documentData.selected" v-model="documentData.selected"
class="ml-2" class="ml-2"
/>--> />-->
<br>
<!-- <UBadge <!-- <UBadge
v-if="documentData.vendorInvoice" v-if="documentData.vendorInvoice"
>{{dataStore.incominginvoices.find(item => item.id === documentData.vendorInvoice) ? dataStore.incominginvoices.find(item => item.id === documentData.vendorInvoice).reference : ''}}</UBadge> >{{dataStore.incominginvoices.find(item => item.id === documentData.vendorInvoice) ? dataStore.incominginvoices.find(item => item.id === documentData.vendorInvoice).reference : ''}}</UBadge>
@@ -183,8 +185,8 @@ const updateDocumentAssignment = async () => {
<UContainer class="h-full" :ui="{padding: 'px-1 sm:px-1 lg:px-1'}"> <UContainer class="h-full" :ui="{padding: 'px-1 sm:px-1 lg:px-1'}">
<object <object
class="h-full w-full" class="bigPreview"
:data="documentData.url" :data="`${documentData.url}#toolbar=0&navpanes=0&scrollbar=0`"
type="application/pdf" type="application/pdf"
v-if="!documentData.tags.includes('Bild')" v-if="!documentData.tags.includes('Bild')"
/> />
@@ -323,7 +325,7 @@ const updateDocumentAssignment = async () => {
.documentListItem { .documentListItem {
display:block; display:block;
width: 15vw; width: 15vw;
height: 33vh; aspect-ratio: 1 / 1.414;
padding:1em; padding:1em;
margin: 0.7em; margin: 0.7em;
border: 1px solid lightgrey; border: 1px solid lightgrey;
@@ -337,7 +339,7 @@ const updateDocumentAssignment = async () => {
.previewEmbed { .previewEmbed {
width: 100%; width: 100%;
height: 100%; aspect-ratio: 1 / 1.414;
overflow: hidden !important; overflow: hidden !important;
pointer-events: none !important; pointer-events: none !important;
-ms-overflow-style: none; /* IE and Edge */ -ms-overflow-style: none; /* IE and Edge */
@@ -348,4 +350,9 @@ const updateDocumentAssignment = async () => {
display: none; display: none;
} }
.bigPreview {
width: 100%;
aspect-ratio: 1/ 1.414;
}
</style> </style>

View File

@@ -3,12 +3,14 @@ const props = defineProps({
documents: { documents: {
type: Array, type: Array,
required:true required:true
},
returnDocumentId: {
type: Boolean,
} }
}) })
const dataStore = useDataStore() const dataStore = useDataStore()
</script> </script>
<template> <template>
@@ -17,6 +19,8 @@ const dataStore = useDataStore()
v-for="item in documents" v-for="item in documents"
:document-data="item" :document-data="item"
:key="item.id" :key="item.id"
@clicked="(info) => $emit('selectDocument', info)"
:return-emit="returnDocumentId"
/> />
</div> </div>
</template> </template>

View File

@@ -270,8 +270,12 @@ let links = computed(() => {
icon: "i-heroicons-chart-bar-square", icon: "i-heroicons-chart-bar-square",
children: [ children: [
{ {
label: "Belege", label: "Ausgangsbelege",
to: "/receipts", to: "/createDocument",
icon: "i-heroicons-document-text"
},{
label: "Eingangsbelege",
to: "/incomingInvoices",
icon: "i-heroicons-document-text" icon: "i-heroicons-document-text"
}, },
{ {

47
package-lock.json generated
View File

@@ -34,6 +34,7 @@
"base64-arraybuffer": "^1.0.2", "base64-arraybuffer": "^1.0.2",
"buffer": "^6.0.3", "buffer": "^6.0.3",
"client-oauth2": "^4.3.3", "client-oauth2": "^4.3.3",
"date-fns": "^3.6.0",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"handlebars": "^4.7.8", "handlebars": "^4.7.8",
"jsprintmanager": "^6.0.3", "jsprintmanager": "^6.0.3",
@@ -6034,6 +6035,21 @@
"vue": ">=3.2.0" "vue": ">=3.2.0"
} }
}, },
"node_modules/@vuepic/vue-datepicker/node_modules/date-fns": {
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
"integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==",
"dependencies": {
"@babel/runtime": "^7.21.0"
},
"engines": {
"node": ">=0.11"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/date-fns"
}
},
"node_modules/@vueuse/components": { "node_modules/@vueuse/components": {
"version": "10.9.0", "version": "10.9.0",
"resolved": "https://registry.npmjs.org/@vueuse/components/-/components-10.9.0.tgz", "resolved": "https://registry.npmjs.org/@vueuse/components/-/components-10.9.0.tgz",
@@ -8039,18 +8055,12 @@
} }
}, },
"node_modules/date-fns": { "node_modules/date-fns": {
"version": "2.30.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz",
"integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==",
"dependencies": {
"@babel/runtime": "^7.21.0"
},
"engines": {
"node": ">=0.11"
},
"funding": { "funding": {
"type": "opencollective", "type": "github",
"url": "https://opencollective.com/date-fns" "url": "https://github.com/sponsors/kossnocorp"
} }
}, },
"node_modules/date-fns-tz": { "node_modules/date-fns-tz": {
@@ -17900,6 +17910,21 @@
"vue": "^3.2.0" "vue": "^3.2.0"
} }
}, },
"node_modules/v-calendar/node_modules/date-fns": {
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
"integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==",
"dependencies": {
"@babel/runtime": "^7.21.0"
},
"engines": {
"node": ">=0.11"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/date-fns"
}
},
"node_modules/v-calendar/node_modules/date-fns-tz": { "node_modules/v-calendar/node_modules/date-fns-tz": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/date-fns-tz/-/date-fns-tz-2.0.1.tgz", "resolved": "https://registry.npmjs.org/date-fns-tz/-/date-fns-tz-2.0.1.tgz",

View File

@@ -47,6 +47,7 @@
"base64-arraybuffer": "^1.0.2", "base64-arraybuffer": "^1.0.2",
"buffer": "^6.0.3", "buffer": "^6.0.3",
"client-oauth2": "^4.3.3", "client-oauth2": "^4.3.3",
"date-fns": "^3.6.0",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"handlebars": "^4.7.8", "handlebars": "^4.7.8",
"jsprintmanager": "^6.0.3", "jsprintmanager": "^6.0.3",

View File

@@ -15,14 +15,9 @@
</template> </template>
</UInput> </UInput>
<UButton <UButton
@click="router.push(`/createDocument/edit?type=quotes`)" @click="router.push(`/createDocument/edit`)"
> >
+ Angebot + Dokument
</UButton>
<UButton
@click="router.push(`/createDocument/edit?type=invoices`)"
>
+ Rechnung
</UButton> </UButton>
</template> </template>
</UDashboardNavbar> </UDashboardNavbar>
@@ -72,8 +67,7 @@
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Belege anzuzeigen' }" :empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Belege anzuzeigen' }"
> >
<template #type-data="{row}"> <template #type-data="{row}">
<span v-if="row.type === 'incomingInvoice'">Eingangsrechnung</span> {{dataStore.documentTypesForCreation[row.type].labelSingle}}
<span v-else>{{dataStore.documentTypesForCreation[row.type].labelSingle}}</span>
</template> </template>
<template #state-data="{row}"> <template #state-data="{row}">
<span <span
@@ -142,6 +136,9 @@ defineShortcuts({
//console.log(searchinput) //console.log(searchinput)
//searchinput.value.focus() //searchinput.value.focus()
document.getElementById("searchinput").focus() document.getElementById("searchinput").focus()
},
'+': () => {
router.push('/createDocument/edit')
} }
}) })
@@ -210,24 +207,17 @@ const types = computed(() => templateTypes.filter((type) => selectedTypes.value.
const selectItem = (item) => { const selectItem = (item) => {
console.log(item) console.log(item)
if(item.type === "incomingInvoice"){ if(item.state === "Entwurf"){
if(item.state === "Entwurf") { router.push(`/createDocument/edit/${item.id}`)
router.push(`/receipts/incominginvoices/edit/${item.id} `) } else if(item.state !== "Entwurf") {
} else if(item.state === "Gebucht") { router.push(`/createDocument/show/${item.id}`)
router.push(`/receipts/incominginvoices/show/${item.id}`)
}
} else {
if(item.state === "Entwurf"){
router.push(`/createDocument/edit/${item.id}`)
} else if(item.state !== "Entwurf") {
router.push(`/createDocument/show/${item.id}`)
}
} }
} }
const getRowAmount = (row) => { const getRowAmount = (row) => {
@@ -245,7 +235,7 @@ const getRowAmount = (row) => {
const searchString = ref('') const searchString = ref('')
const showDrafts = ref(false) const showDrafts = ref(false)
const filteredRows = computed(() => { const filteredRows = computed(() => {
let items = [...dataStore.incominginvoices.map(i => {return {...i, type: "incomingInvoice"}}),...dataStore.createddocuments] let items = dataStore.createddocuments
items = items.filter(i => types.value.find(x => x.key === i.type)) items = items.filter(i => types.value.find(x => x.key === i.type))

View File

@@ -16,37 +16,16 @@ const toast = useToast()
const {vendors} = storeToRefs(useDataStore()) const {vendors} = storeToRefs(useDataStore())
const {fetchVendorInvoices} = useDataStore() const {fetchVendorInvoices} = useDataStore()
let currentVendorInvoice = ref(null) const availableDocuments = computed(() => {
return dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung' && dataStore.incominginvoices.filter(x => x.document === i).length === 0))
})
//let currentDocument = ref(null) //let currentDocument = ref(null)
//Working //Working
const mode = ref(route.params.mode || "show") const mode = ref(route.params.mode || "show")
const useNetMode = ref(true) const useNetMode = ref(true)
//Functions
const setupPage = async () => {
if(mode.value === "show" || mode.value === "edit"){
currentVendorInvoice.value = await dataStore.getIncomingInvoiceById(Number(useRoute().params.id))
//currentDocument.value = await dataStore.getDocumentById(currentVendorInvoice.value.document)
}
if(mode.value === "edit") itemInfo.value = currentVendorInvoice.value
}
const currentDocument = computed(() => {
if(currentVendorInvoice.value) {
return dataStore.getDocumentById(currentVendorInvoice.value.document)
} else {
return null
}
})
const itemInfo = ref({ const itemInfo = ref({
vendor: 0, vendor: 0,
expense: true, expense: true,
@@ -61,12 +40,38 @@ const itemInfo = ref({
account: null, account: null,
amountNet: null, amountNet: null,
amountTax: null, amountTax: null,
taxType: null, taxType: "19",
costCentre: null costCentre: null
} }
] ]
}) })
//Functions
const setupPage = async () => {
if((mode.value === "show" || mode.value === "edit" ) && route.params.id){
itemInfo.value = await dataStore.getIncomingInvoiceById(Number(route.params.id))
//currentDocument.value = await dataStore.getDocumentById(currentVendorInvoice.value.document)
}
console.log(itemInfo.value)
}
const currentDocument = computed(() => {
if(itemInfo.value) {
return dataStore.getDocumentById(itemInfo.value.document)
} else {
return null
}
})
const taxOptions = ref([ const taxOptions = ref([
{ {
label: "19% USt", label: "19% USt",
@@ -123,7 +128,7 @@ const totalCalculated = computed(() => {
const setState = async (newState) => { const setState = async (newState) => {
if(mode.value === 'show') { if(mode.value === 'show') {
await dataStore.updateItem('incominginvoices',{...currentVendorInvoice.value, state: newState}) await dataStore.updateItem('incominginvoices',{...itemInfo.value, state: newState})
} else if(mode.value === 'edit') { } else if(mode.value === 'edit') {
await dataStore.updateItem('incominginvoices',{...itemInfo.value, state: newState}) await dataStore.updateItem('incominginvoices',{...itemInfo.value, state: newState})
} }
@@ -136,59 +141,96 @@ setupPage()
</script> </script>
<template> <template>
<div id="main"> <UDashboardNavbar :title="itemInfo ? 'Eingangsbeleg bearbeiten' : 'Eingangsbeleg erstellen'">
<template #right>
<UButton
@click="dataStore.createNewItem('incominginvoices',itemInfo)"
v-if="mode === 'edit' && !itemInfo.id"
>
Speichern
</UButton>
<UButton
@click="dataStore.updateItem('incominginvoices',itemInfo)"
v-if="mode === 'edit' && itemInfo.id"
>
Speichern
</UButton>
<UButton
:disabled="itemInfo.state !== 'Entwurf'"
@click="router.push(`/incominginvoices/edit/${itemInfo.id}`)"
v-if="mode !== 'edit'"
>
Bearbeiten
</UButton>
<UButton
@click="setState('Entwurf')"
v-if="itemInfo.state !== 'Entwurf'"
color="cyan"
>
Status zu Entwurf
</UButton>
<UButton
@click="setState('Gebucht')"
v-if="itemInfo.state !== 'Gebucht'"
color="rose"
>
Status auf Gebucht
</UButton>
</template>
</UDashboardNavbar>
<div v-if="!itemInfo.document">
<div v-if="availableDocuments.length === 0" class="w-1/2 mx-auto text-center">
<p class="text-2xl mt-5">Keine Dokumente zur Auswahl vefügbar</p>
<UButton
@click="router.push(`/documents`)"
class="mt-5"
variant="outline"
>
Zu den Dokumenten
</UButton>
</div>
<DocumentList
v-else
:documents="availableDocuments"
:return-document-id="true"
@selectDocument="(documentId) => itemInfo.document = documentId"
/>
</div>
<div
v-else
class="flex justify-between mt-5"
>
<object <object
v-if="currentDocument ? currentDocument.url : false" v-if="currentDocument ? currentDocument.url : false"
:data="currentDocument.url + '#toolbar=0&navpanes=0&scrollbar=0&statusbar=0&messages=0&scrollbar=0'" :data="currentDocument.url + '#toolbar=0&navpanes=0&scrollbar=0&statusbar=0&messages=0&scrollbar=0'"
type="application/pdf" type="application/pdf"
class="h-100 w-full mx-5" class="mx-5 documentPreview"
/> />
<div class="w-4/5"> <div class="w-2/5 mx-5">
<InputGroup class="mt-3" v-if="currentVendorInvoice">
<UButton
@click="dataStore.updateItem('incominginvoices',itemInfo)"
v-if="mode === 'edit'"
>
Speichern
</UButton>
<UButton
:disabled="currentVendorInvoice.state !== 'Entwurf'"
@click="router.push(`/incominginvoices/edit/${currentVendorInvoice.id}`)"
v-if="mode !== 'edit'"
>
Bearbeiten
</UButton>
<UButton
@click="setState('Entwurf')"
v-if="currentVendorInvoice.state !== 'Entwurf'"
color="cyan"
>
Status zu Entwurf
</UButton>
<UButton
@click="setState('Gebucht')"
v-if="currentVendorInvoice.state !== 'Gebucht'"
color="rose"
>
Status auf Gebucht
</UButton>
</InputGroup>
<div v-if="mode === 'show'"> <div v-if="mode === 'show'">
{{currentVendorInvoice}} {{itemInfo}}
<HistoryDisplay
type="incomingInvoice"
v-if="itemInfo"
:element-id="itemInfo.id"
/>
</div> </div>
<div v-else-if="mode === 'edit'" class=" scrollContainer"> <div v-else class=" scrollContainer">
<InputGroup class="my-3"> <InputGroup class="mb-3">
<UButton <UButton
:variant="itemInfo.expense ? 'solid' : 'outline'" :variant="itemInfo.expense ? 'solid' : 'outline'"
@click="itemInfo.expense = true" @click="itemInfo.expense = true"
> >
Ausgabe Ausgabe
</UButton> </UButton>
<UButton <UButton
:variant="!itemInfo.expense ? 'solid' : 'outline'" :variant="!itemInfo.expense ? 'solid' : 'outline'"
@click="itemInfo.expense = false" @click="itemInfo.expense = false"
> >
Einnahme Einnahme
</UButton> </UButton>
@@ -263,7 +305,7 @@ setupPage()
Brutto Brutto
<UToggle <UToggle
v-model="useNetMode" v-model="useNetMode"
@update:model-value="itemInfo.accounts = [{account: null,amountNet: null,amountTax: null,taxType: null}]" @update:model-value="itemInfo.accounts = [{account: null,amountNet: null,amountTax: null,taxType: '19'}]"
/> />
Netto Netto
</InputGroup> </InputGroup>
@@ -409,41 +451,28 @@ setupPage()
</UButton> </UButton>
</div> </div>
<HistoryDisplay
type="incomingInvoice"
v-if="currentVendorInvoice"
:element-id="currentVendorInvoice.id"
/>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<style scoped> <style scoped>
#main { .documentPreview {
display: flex; width: 30vw;
flex-direction: row; aspect-ratio: 1 / 1.414;
height: 85vh;
}
.previewDoc {
min-width: 50vw;
min-height: 80vh;
}
.previewDoc object {
width: 90%;
height: 100%;
} }
.scrollContainer { .scrollContainer {
overflow-y: scroll; overflow-y: scroll;
padding-left: 1em;
padding-right: 1em;
height: 75vh; height: 75vh;
margin-top: 1em;
-ms-overflow-style: none; /* IE and Edge */ -ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */ scrollbar-width: none; /* Firefox */
} }

View File

@@ -0,0 +1,119 @@
<script setup>
definePageMeta({
middleware: "auth"
})
defineShortcuts({
'/': () => {
//console.log(searchinput)
//searchinput.value.focus()
document.getElementById("searchinput").focus()
},
'+': () => {
router.push("/incomingInvoices/edit")
}
})
const dataStore = useDataStore()
const router = useRouter()
const templateColumns = [
{
key: 'title',
label: "Titel:",
sortable: true
},
{
key: "start",
label: "Start",
sortable: true
},
{
key: "end",
label: "Ende"
},
{
key: "resources",
label: "Resourcen"
},
{
key: "project",
label: "Projekt"
}
]
const selectedColumns = ref(templateColumns)
const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))
const searchString = ref('')
const filteredRows = computed(() => {
if(!searchString.value) {
return dataStore.incominginvoices
}
return dataStore.incominginvoices.filter(item => {
return Object.values(item).some((value) => {
return String(value).toLowerCase().includes(searchString.value.toLowerCase())
})
})
})
</script>
<template>
<UDashboardNavbar title="Eingangsbelege">
<template #right>
<UInput
id="searchinput"
v-model="searchString"
icon="i-heroicons-funnel"
autocomplete="off"
placeholder="Suche..."
class="hidden lg:block"
@keydown.esc="$event.target.blur()"
>
<template #trailing>
<UKbd value="/" />
</template>
</UInput>
<UButton @click="router.push(`/incomingInvoices/edit`)">+ Beleg</UButton>
</template>
</UDashboardNavbar>
<UDashboardToolbar>
<template #right>
<USelectMenu
v-model="selectedColumns"
icon="i-heroicons-adjustments-horizontal-solid"
:options="templateColumns"
multiple
class="hidden lg:block"
by="key"
>
<template #label>
Spalten
</template>
</USelectMenu>
</template>
</UDashboardToolbar>
<UDashboardPanelContent>
<UTable
:rows="filteredRows"
class="w-full"
:ui="{ divide: 'divide-gray-200 dark:divide-gray-800' }"
@select="(i) => router.push(`/incomingInvoices/show/${i.id}`) "
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Belege anzuzeigen' }"
>
</UTable>
</UDashboardPanelContent>
</template>
<style scoped>
</style>

View File

@@ -10,23 +10,9 @@
</UChip> </UChip>
</UButton> </UButton>
</UTooltip> </UTooltip>
<!-- <UDropdown :items="items">
<UButton icon="i-heroicons-plus" size="md" class="ml-1.5 rounded-full" />
</UDropdown>-->
</template> </template>
</UDashboardNavbar> </UDashboardNavbar>
<!-- <UDashboardToolbar>
<template #left>
&lt;!&ndash; ~/components/home/HomeDateRangePicker.vue &ndash;&gt;
&lt;!&ndash; <HomeDateRangePicker v-model="range" class="-ml-2.5" />&ndash;&gt;
&lt;!&ndash; ~/components/home/HomePeriodSelect.vue &ndash;&gt;
&lt;!&ndash; <HomePeriodSelect v-model="period" :range="range" />&ndash;&gt;
</template>
</UDashboardToolbar>-->
<UDashboardPanelContent> <UDashboardPanelContent>
<UDashboardCard <UDashboardCard
title="Anwesenheiten" title="Anwesenheiten"
@@ -34,6 +20,24 @@
> >
<p v-for="time in dataStore.getStartedWorkingTimes()"><UIcon name="i-heroicons-check"/>{{dataStore.getProfileById(time.profile).fullName}}</p> <p v-for="time in dataStore.getStartedWorkingTimes()"><UIcon name="i-heroicons-check"/>{{dataStore.getProfileById(time.profile).fullName}}</p>
</UDashboardCard> </UDashboardCard>
<!-- <UDashboardCard
title="Offene Aufgaben"
v-if="dataStore.getOpenTasksCount > 0"
class="w-1/2 h-1/2"
>
<UTable
:rows="dataStore.tasks.filter(i => i.categorie !== 'Erledigt' && (i.profile === dataStore.activeProfile.id ||!i.profile))"
:columns="[
{
key: 'categorie',
label: 'Kategorie'
},{
key: 'name',
label: 'Name'
},
]"
></UTable>
</UDashboardCard>-->
</UDashboardPanelContent> </UDashboardPanelContent>
</UDashboardPanel> </UDashboardPanel>
@@ -59,9 +63,6 @@ const items = [[{
}]] }]]
const {getOpenTasksCount} = useDataStore()
const openTasks = getOpenTasksCount
const supabase = useSupabaseClient() const supabase = useSupabaseClient()
const user = useSupabaseUser() const user = useSupabaseUser()
@@ -69,16 +70,5 @@ const user = useSupabaseUser()
</script> </script>
<style scoped> <style scoped>
/*.cardHolder {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
}
.card{
width: 22vw;
height: 40vh;
border: 1px solid white
}*/
</style> </style>

View File

@@ -28,7 +28,7 @@ const setupPage = () => {
} }
if (mode.value === "edit") itemInfo.value = currentItem.value if (mode.value === "edit") itemInfo.value = currentItem.value
if(currentItem.value.id) oldItemInfo.value = JSON.parse(JSON.stringify(currentItem.value)) if(currentItem.value) oldItemInfo.value = JSON.parse(JSON.stringify(currentItem.value))
} }

View File

@@ -93,7 +93,8 @@ export const useDataStore = defineStore('data', () => {
}, },
incominginvoices: { incominginvoices: {
label: "Eingangsrechnungen", label: "Eingangsrechnungen",
labelSingle: "Eingangsrechnung" labelSingle: "Eingangsrechnung",
redirect:true
}, },
inventoryitems: { inventoryitems: {
label: "Inventarartikel", label: "Inventarartikel",