Kostenstellenhierarchie und Auswertung mit Unterkostenstellen ergänzt

This commit is contained in:
2026-04-24 22:56:33 +02:00
parent 5869f88c1a
commit d3ab03da7e
8 changed files with 204 additions and 7 deletions

View File

@@ -0,0 +1,32 @@
<script setup>
const props = defineProps({
row: {
type: Object,
required: true,
default: {}
},
inShow: {
type: Boolean,
default: false
}
})
const value = computed(() => {
const costcentre = props.row.parentCostcentre || props.row.costcentre || props.row.costCentre || null
if (!costcentre) {
return ""
}
return [costcentre.number, costcentre.name].filter(Boolean).join(" - ")
})
</script>
<template>
<div v-if="props.row.parentCostcentre">
<nuxt-link v-if="props.inShow" :to="`/standardEntity/costcentres/show/${props.row.parentCostcentre.id}`">
{{ value }}
</nuxt-link>
<span v-else>{{ value }}</span>
</div>
</template>