Added Bankimport, BankAccounts, BankStatements Some Visual Changes Added Contacts Changes in VendorInvoices Added layouts with default an one for Login PAge Added Input Group Component
88 lines
1.5 KiB
Vue
88 lines
1.5 KiB
Vue
<template>
|
|
<div id="main">
|
|
<!-- TODO: Kontakte erstellen und dem Kunden zuweisen -->
|
|
|
|
<!--<InputGroup>
|
|
<UButton @click="router.push(`/banking/accounts/create/`)">+ Kontakt</UButton>
|
|
|
|
<UInput
|
|
v-model="searchString"
|
|
placeholder="Suche..."
|
|
/>
|
|
</InputGroup>-->
|
|
|
|
|
|
|
|
<UTable
|
|
:rows="filteredRows"
|
|
:columns="itemColumns"
|
|
@select="selectItem"
|
|
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
|
|
>
|
|
|
|
</UTable>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
|
|
definePageMeta({
|
|
middleware: "auth"
|
|
})
|
|
|
|
|
|
const router = useRouter()
|
|
const {bankAccounts} = storeToRefs(useDataStore())
|
|
const mode = ref("show")
|
|
|
|
const itemColumns = [
|
|
|
|
{
|
|
key: "name",
|
|
label: "Name",
|
|
sortable: true
|
|
},
|
|
{
|
|
key: "iban",
|
|
label: "IBAN",
|
|
sortable: true
|
|
},
|
|
{
|
|
key: "bankId",
|
|
label: "Bank",
|
|
sortable: true
|
|
},
|
|
{
|
|
key: "ownerName",
|
|
label: "Besitzer",
|
|
sortable: true
|
|
}
|
|
]
|
|
|
|
|
|
const selectItem = (item) => {
|
|
router.push(`/banking/statements/${item.id} `)
|
|
}
|
|
|
|
|
|
const searchString = ref('')
|
|
|
|
const filteredRows = computed(() => {
|
|
bankAccounts.value = bankAccounts.value.filter(account => account.used)
|
|
|
|
if(!searchString.value) {
|
|
return bankAccounts.value
|
|
}
|
|
|
|
return bankAccounts.value.filter(item => {
|
|
return Object.values(item).some((value) => {
|
|
return String(value).toLowerCase().includes(searchString.value.toLowerCase())
|
|
})
|
|
})
|
|
})
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style> |