New Backend changes

This commit is contained in:
2025-09-02 18:47:12 +02:00
parent 6d76acc0bc
commit 27af6a0953
54 changed files with 485 additions and 684 deletions

View File

@@ -1,9 +1,7 @@
<script setup>
import dayjs from "dayjs"
import {useSum} from "~/composables/useSum.js";
definePageMeta({
middleware: "auth"
})
defineShortcuts({
'/': () => {
@@ -44,9 +42,14 @@ const sum = useSum()
const items = ref([])
const selectedItem = ref(0)
const sort = ref({
column: 'date',
direction: 'desc'
})
const setupPage = async () => {
items.value = await useSupabaseSelect("incominginvoices","*, vendor(id,name), statementallocations(id,amount)","created_at",false)
//items.value = await useSupabaseSelect("incominginvoices","*, vendor(id,name), statementallocations(id,amount)","created_at",false)
items.value = await useEntities("incominginvoices").select("*, vendor(id,name), statementallocations(id,amount)",sort.value.column,sort.value.direction === "asc")
}
setupPage()
@@ -54,26 +57,29 @@ setupPage()
const templateColumns = [
{
key: 'reference',
label: "Referenz:"
label: "Referenz:",
sortable: true,
}, {
key: 'state',
label: "Status:"
},
{
key: "date",
label: "Datum"
label: "Datum",
sortable: true,
},
{
key: "vendor",
label: "Lieferant"
label: "Lieferant",
},
{
key: "amount",
label: "Betrag"
label: "Betrag",
},
{
key: "dueDate",
label: "Fälligkeitsdatum"
label: "Fälligkeitsdatum",
sortable: true,
},
{
key: "paid",
@@ -81,7 +87,8 @@ const templateColumns = [
},
{
key: "paymentType",
label: "Zahlart"
label: "Zahlart",
sortable: true,
},
{
key: "description",
@@ -92,6 +99,7 @@ const selectedColumns = ref(templateColumns)
const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))
const searchString = ref(tempStore.searchStrings['incominginvoices'] ||'')
const clearSearchString = () => {
@@ -185,6 +193,9 @@ const selectIncomingInvoice = (invoice) => {
<UDashboardPanelContent>
<UTable
v-model:sort="sort"
sort-mode="manual"
@update:sort="setupPage"
:rows="filteredRows"
:columns="columns"
class="w-full"