Reffractored vendors,vehicles,services,servicecategories,products,productcategories, projects, plants, customers, contracts, contacts

This commit is contained in:
2024-12-20 20:00:08 +01:00
parent acf5d1c2ea
commit 0d849f5fcb
20 changed files with 361 additions and 1161 deletions

View File

@@ -122,6 +122,7 @@ const filteredRows = computed(() => {
</template>
</USelectMenu>
<USelectMenu
v-if="selectableFilters.length > 0"
icon="i-heroicons-adjustments-horizontal-solid"
multiple
v-model="selectedFilters"
@@ -133,7 +134,6 @@ const filteredRows = computed(() => {
</USelectMenu>
</template>
</UDashboardToolbar>
<UTable
:rows="filteredRows"
:columns="columns"
@@ -142,8 +142,35 @@ const filteredRows = computed(() => {
@select="(i) => router.push(`/projects/show/${i.id}`) "
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: `Keine ${dataType.label} anzuzeigen` }"
>
<template #name-data="{row}">
<span
v-if="row.id === filteredRows[selectedItem].id"
class="text-primary-500 font-bold">{{row.name}}
</span>
<span v-else>
{{row.name}}
</span>
</template>
<template #fullName-data="{row}">
<span
v-if="row.id === filteredRows[selectedItem].id"
class="text-primary-500 font-bold">{{row.fullName}}
</span>
<span v-else>
{{row.fullName}}
</span>
</template>
<template #licensePlate-data="{row}">
<span
v-if="row.id === filteredRows[selectedItem].id"
class="text-primary-500 font-bold">{{row.licensePlate}}
</span>
<span v-else>
{{row.licensePlate}}
</span>
</template>
<template
v-for="column in dataType.templateColumns"
v-for="column in dataType.templateColumns.filter(i => i.key !== 'name' && i.key !== 'fullName' && i.key !== 'licensePlate')"
v-slot:[`${column.key}-data`]="{row}">
<component v-if="column.component" :is="column.component" :row="row"></component>
<span v-else>{{row[column.key]}}</span>

View File

@@ -68,11 +68,6 @@ const links = computed(() => {
}
]
},
/*{
label: "E-Mail",
to: "/email",
icon: "i-heroicons-envelope"
},*/
... dataStore.ownTenant.features.contacts ? [{
label: "Kontakte",
defaultOpen: false,
@@ -223,7 +218,7 @@ const links = computed(() => {
to: "/contracts",
icon: "i-heroicons-clipboard-document"
}] : [],
... (role.checkRight("objects") && dataStore.ownTenant.features.objects) ? [{
... (role.checkRight("plants") && dataStore.ownTenant.features.objects) ? [{
label: "Objekte",
to: "/plants",
icon: "i-heroicons-clipboard-document"

View File

@@ -0,0 +1,13 @@
<script setup>
const props = defineProps({
row: {
type: Object,
required: true,
default: {}
}
})
</script>
<template>
<span>{{props.row.active ? 'Ja' : 'Nein'}}</span>
</template>

View File

@@ -0,0 +1,13 @@
<script setup>
const props = defineProps({
row: {
type: Object,
required: true,
default: {}
}
})
</script>
<template>
<span>{{props.row.sellingPrice ? useCurrency(props.row.sellingPrice) : ''}}</span>
</template>

View File

@@ -0,0 +1,13 @@
<script setup>
const props = defineProps({
row: {
type: Object,
required: true,
default: {}
}
})
</script>
<template>
<span>{{props.row.unit ? props.row.unit.name : ''}}</span>
</template>

View File

@@ -0,0 +1,13 @@
<script setup>
const props = defineProps({
row: {
type: Object,
required: true,
default: {}
}
})
</script>
<template>
<span>{{props.row.vendor ? props.row.vendor.name : ''}}</span>
</template>