feat: refs #6683 add PropertyDescriptor component for enhanced property details display
This commit is contained in:
parent
70298cb96a
commit
5619e9c2ca
|
@ -0,0 +1,50 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import axios from 'axios';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import PropertyCard from './PropertyCard.vue';
|
||||
|
||||
const { notify } = useNotify();
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
const entityId = computed(() => {
|
||||
return Number(props.id || route.params.id);
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
summary: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<CardDescriptor
|
||||
v-bind="$attrs"
|
||||
:id="entityId"
|
||||
:card="PropertyCard"
|
||||
title="name"
|
||||
module="Property"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
<VnLv
|
||||
:label="$t('property.group')"
|
||||
:value="entity.propertyGroup.description"
|
||||
/>
|
||||
<VnLv :label="$t('property.protocol')" :value="entity.protocol" copy/>
|
||||
<VnLv :label="$t('property.cadaster')" :value="entity.cadaster" copy />
|
||||
<VnLv :label="$t('property.farm')" :value="entity.farm" />
|
||||
<VnLv :label="$t('property.area')" :value="entity.area" />
|
||||
</template>
|
||||
</CardDescriptor>
|
||||
</template>
|
Loading…
Reference in New Issue