Corrected Incoming Invoice
Added Column Selection to Customers,Vendors and Contacts
This commit is contained in:
@@ -52,13 +52,14 @@ const createVendorInvoice = async () => {
|
|||||||
.from("incominginvoices")
|
.from("incominginvoices")
|
||||||
.insert([{
|
.insert([{
|
||||||
document: documentData.id,
|
document: documentData.id,
|
||||||
|
tenant: dataStore.currentTenant
|
||||||
}])
|
}])
|
||||||
.select()
|
.select()
|
||||||
if(vendorInvoiceError) {
|
if(vendorInvoiceError) {
|
||||||
console.log(vendorInvoiceError)
|
console.log(vendorInvoiceError)
|
||||||
} else if(vendorInvoiceData) {
|
} else if(vendorInvoiceData) {
|
||||||
|
|
||||||
const {data:documentData,error:documentError} = await supabase
|
const {data:documentUpdateData,error:documentError} = await supabase
|
||||||
.from("documents")
|
.from("documents")
|
||||||
.update({
|
.update({
|
||||||
vendorInvoice: vendorInvoiceData[0].id
|
vendorInvoice: vendorInvoiceData[0].id
|
||||||
|
|||||||
@@ -6,16 +6,40 @@
|
|||||||
v-model="searchString"
|
v-model="searchString"
|
||||||
placeholder="Suche..."
|
placeholder="Suche..."
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<USelectMenu
|
||||||
|
v-model="selectedColumns"
|
||||||
|
multiple
|
||||||
|
:options="columnTemplate"
|
||||||
|
:uiMenu="{width:'w-40'}"
|
||||||
|
:popper="{placement: 'bottom-start'}"
|
||||||
|
by="key"
|
||||||
|
>
|
||||||
|
<UButton
|
||||||
|
color="gray"
|
||||||
|
variant="ghost"
|
||||||
|
class="flex-1 justify-between"
|
||||||
|
icon="i-heroicons-view-columns"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<template #option="{ option }">
|
||||||
|
{{option.label}}
|
||||||
|
</template>
|
||||||
|
</USelectMenu>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
|
|
||||||
|
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<UTable
|
<UTable
|
||||||
:rows="filteredRows"
|
:rows="filteredRows"
|
||||||
:columns="itemColumns"
|
:columns="selectedColumns"
|
||||||
@select="selectItem"
|
@select="selectItem"
|
||||||
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
|
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
|
||||||
>
|
>
|
||||||
|
<template #active-data="{row}">
|
||||||
|
<span v-if="row.active" class="text-primary-500">Aktiv</span>
|
||||||
|
<span v-else class="text-rose">Gesperrt</span>
|
||||||
|
</template>
|
||||||
<template #customer-data="{row}">
|
<template #customer-data="{row}">
|
||||||
{{dataStore.customers.find(customer => customer.id === row.customer) ? dataStore.customers.find(customer => customer.id === row.customer).name : ''}}
|
{{dataStore.customers.find(customer => customer.id === row.customer) ? dataStore.customers.find(customer => customer.id === row.customer).name : ''}}
|
||||||
</template>
|
</template>
|
||||||
@@ -37,7 +61,7 @@ const dataStore = useDataStore()
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const mode = ref("show")
|
const mode = ref("show")
|
||||||
|
|
||||||
const itemColumns = [
|
const columnTemplate = ref([
|
||||||
|
|
||||||
{
|
{
|
||||||
key: "fullName",
|
key: "fullName",
|
||||||
@@ -57,8 +81,45 @@ const itemColumns = [
|
|||||||
{
|
{
|
||||||
key: "role",
|
key: "role",
|
||||||
label: "Rolle",
|
label: "Rolle",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "email",
|
||||||
|
label: "E-Mail",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "phoneMobile",
|
||||||
|
label: "Mobil",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "phoneHome",
|
||||||
|
label: "Festnetz",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "active",
|
||||||
|
label: "Aktiv",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "birtday",
|
||||||
|
label: "Geburtstag",
|
||||||
}
|
}
|
||||||
]
|
])
|
||||||
|
const selectedColumns = ref([
|
||||||
|
{
|
||||||
|
key: "fullName",
|
||||||
|
label: "Name",
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "customer",
|
||||||
|
label: "Kunde",
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "vendor",
|
||||||
|
label: "Lieferant",
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
const selectItem = (item) => {
|
const selectItem = (item) => {
|
||||||
|
|||||||
@@ -7,16 +7,44 @@
|
|||||||
v-model="searchString"
|
v-model="searchString"
|
||||||
placeholder="Suche..."
|
placeholder="Suche..."
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<USelectMenu
|
||||||
|
v-model="selectedColumns"
|
||||||
|
multiple
|
||||||
|
:options="columnTemplate"
|
||||||
|
:uiMenu="{width:'w-40'}"
|
||||||
|
:popper="{placement: 'bottom-start'}"
|
||||||
|
by="key"
|
||||||
|
>
|
||||||
|
<UButton
|
||||||
|
color="gray"
|
||||||
|
variant="ghost"
|
||||||
|
class="flex-1 justify-between"
|
||||||
|
icon="i-heroicons-view-columns"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<template #option="{ option }">
|
||||||
|
{{option.label}}
|
||||||
|
</template>
|
||||||
|
</USelectMenu>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
|
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<UTable
|
<UTable
|
||||||
:rows="filteredRows"
|
:rows="filteredRows"
|
||||||
:columns="customerColumns"
|
:columns="selectedColumns"
|
||||||
@select="selectCustomer"
|
@select="selectItem"
|
||||||
|
|
||||||
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
|
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
|
||||||
/>
|
>
|
||||||
|
<template #active-data="{row}">
|
||||||
|
<span v-if="row.active" class="text-primary-500">Aktiv</span>
|
||||||
|
<span v-else class="text-rose">Gesperrt</span>
|
||||||
|
</template>
|
||||||
|
<template #address-data="{row}">
|
||||||
|
{{row.infoData.street}}, {{row.infoData.special ? `${row.infoData.special},` : ''}} {{row.infoData.zip}} {{row.infoData.city}}, {{row.infoData.country}}
|
||||||
|
</template>
|
||||||
|
</UTable>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -30,7 +58,7 @@ const dataStore = useDataStore()
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const mode = ref("show")
|
const mode = ref("show")
|
||||||
|
|
||||||
const customerColumns = [
|
const columnTemplate = ref([
|
||||||
{
|
{
|
||||||
key: 'customerNumber',
|
key: 'customerNumber',
|
||||||
label: "Kundennr.",
|
label: "Kundennr.",
|
||||||
@@ -40,11 +68,39 @@ const customerColumns = [
|
|||||||
key: "name",
|
key: "name",
|
||||||
label: "Name",
|
label: "Name",
|
||||||
sortable: true
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "notes",
|
||||||
|
label: "Notizen",
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "active",
|
||||||
|
label: "Aktiv",
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "address",
|
||||||
|
label: "Adresse",
|
||||||
|
sortable: true
|
||||||
}
|
}
|
||||||
]
|
])
|
||||||
|
const selectedColumns = ref([
|
||||||
|
{
|
||||||
|
key: 'customerNumber',
|
||||||
|
label: "Kundennr.",
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "name",
|
||||||
|
label: "Name",
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
const selectCustomer = (customer) => {
|
|
||||||
|
const selectItem = (customer) => {
|
||||||
console.log(customer)
|
console.log(customer)
|
||||||
router.push(`/customers/show/${customer.id} `)
|
router.push(`/customers/show/${customer.id} `)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
|
<!--
|
||||||
<UButton @click="router.push(`/incominginvoices/create/`)">+ Eingangsrechnung</UButton>
|
<UButton @click="router.push(`/incominginvoices/create/`)">+ Eingangsrechnung</UButton>
|
||||||
|
-->
|
||||||
<UButton
|
<UButton
|
||||||
@click="router.push(`/createDocument/edit?type=quotes`)"
|
@click="router.push(`/createDocument/edit?type=quotes`)"
|
||||||
>
|
>
|
||||||
|
|||||||
49
spaces/pages/vendors/index.vue
vendored
49
spaces/pages/vendors/index.vue
vendored
@@ -6,16 +6,40 @@
|
|||||||
v-model="searchString"
|
v-model="searchString"
|
||||||
placeholder="Suche..."
|
placeholder="Suche..."
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<USelectMenu
|
||||||
|
v-model="selectedColumns"
|
||||||
|
multiple
|
||||||
|
:options="columnTemplate"
|
||||||
|
:uiMenu="{width:'w-40'}"
|
||||||
|
:popper="{placement: 'bottom-start'}"
|
||||||
|
by="key"
|
||||||
|
>
|
||||||
|
<UButton
|
||||||
|
color="gray"
|
||||||
|
variant="ghost"
|
||||||
|
class="flex-1 justify-between"
|
||||||
|
icon="i-heroicons-view-columns"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<template #option="{ option }">
|
||||||
|
{{option.label}}
|
||||||
|
</template>
|
||||||
|
</USelectMenu>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
|
|
||||||
|
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<UTable
|
<UTable
|
||||||
:rows="filteredRows"
|
:rows="filteredRows"
|
||||||
:columns="itemColumns"
|
:columns="selectedColumns"
|
||||||
@select="selectItem"
|
@select="selectItem"
|
||||||
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
|
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
|
||||||
/>
|
>
|
||||||
|
<template #address-data="{row}">
|
||||||
|
{{row.infoData.street ? `${row.infoData.street}, ` : ''}}{{row.infoData.special ? `${row.infoData.special},` : ''}} {{(row.infoData.zip || row.infoData.city) ? `${row.infoData.zip} ${row.infoData.city}, ` : ''}} {{row.infoData.country}}
|
||||||
|
</template>
|
||||||
|
</UTable>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@@ -30,7 +54,24 @@ const dataStore = useDataStore()
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const mode = ref("show")
|
const mode = ref("show")
|
||||||
|
|
||||||
const itemColumns = [
|
const columnTemplate = ref([
|
||||||
|
{
|
||||||
|
key: 'vendorNumber',
|
||||||
|
label: "Lieferantennr.",
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "name",
|
||||||
|
label: "Name",
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "address",
|
||||||
|
label: "Adresse",
|
||||||
|
sortable: true
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const selectedColumns = ref([
|
||||||
{
|
{
|
||||||
key: 'vendorNumber',
|
key: 'vendorNumber',
|
||||||
label: "Lieferantennr.",
|
label: "Lieferantennr.",
|
||||||
@@ -41,7 +82,7 @@ const itemColumns = [
|
|||||||
label: "Name",
|
label: "Name",
|
||||||
sortable: true
|
sortable: true
|
||||||
}
|
}
|
||||||
]
|
])
|
||||||
|
|
||||||
|
|
||||||
const selectItem = (item) => {
|
const selectItem = (item) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user