refactor: refs #6683 update Property components for improved data handling and display
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jose Antonio Tubau 2025-04-02 08:55:13 +02:00
parent a4be25c24e
commit c34af4d888
5 changed files with 65 additions and 7 deletions

View File

@ -63,7 +63,6 @@ const isNew = Boolean(!route.params.id);
option-value="id"
option-label="code"
hide-selected
@update:model-value="onClientChange"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">

View File

@ -33,7 +33,7 @@ const importDms = async () => {
dmsId.value = null;
emit('onDataSaved');
} catch (e) {
throw new Error(e.message);
throw e;
}
};
</script>

View File

@ -28,7 +28,6 @@ const body = {
:add-note="true"
:filter="noteFilter"
:body="body"
style="overflow-y: auto"
required
/>
</template>

View File

@ -48,12 +48,17 @@ const columns = computed(() => [
align: 'right',
name: 'id',
label: t('property.id'),
width: '70px',
width: '35px',
chip: {
condition: () => true,
},
isId: true,
},
{
align: 'left',
name: 'name',
label: t('property.name'),
isTitle: true,
},
{
align: 'left',
@ -66,17 +71,25 @@ const columns = computed(() => [
optionValue: 'id',
optionLabel: 'description',
},
format: ({description}) => description,
format: ({ propertyGroup }) => propertyGroup,
},
{
label: t('property.group'),
name: 'propertyGroup',
cardVisible: true,
visible: false,
},
{
align: 'left',
name: 'protocol',
label: t('property.protocol'),
cardVisible: true,
},
{
align: 'left',
name: 'cadaster',
label: t('property.cadaster'),
cardVisible: true,
},
{
align: 'left',
@ -89,7 +102,13 @@ const columns = computed(() => [
optionValue: 'id',
optionLabel: 'code',
},
format: ({code}) => code,
format: ({ companyCode }) => companyCode,
},
{
label: t('property.owner'),
name: 'companyCode',
cardVisible: true,
visible: false,
},
{
align: 'left',
@ -98,6 +117,13 @@ const columns = computed(() => [
component: 'date',
format: ({ purchased }) => toDate(purchased),
},
{
label: t('property.purchased'),
name: 'purchased',
format: ({ purchased }) => toDate(purchased),
cardVisible: true,
visible: false,
},
{
align: 'left',
name: 'booked',
@ -105,6 +131,41 @@ const columns = computed(() => [
component: 'date',
format: ({ booked }) => toDate(booked),
},
{
label: t('property.booked'),
name: 'booked',
format: ({ booked }) => toDate(booked),
cardVisible: true,
visible: false,
},
{
label: t('property.hasFormalization'),
name: 'hasFormalization',
component: 'checkbox',
cardVisible: true,
visible: false,
},
{
label: t('property.hasSimpleCopy'),
name: 'hasSimpleCopy',
component: 'checkbox',
cardVisible: true,
visible: false,
},
{
label: t('property.hasOriginalPropertyDeed'),
name: 'hasOriginalPropertyDeed',
component: 'checkbox',
cardVisible: true,
visible: false,
},
{
label: t('property.hasFundProvision'),
name: 'hasFundProvision',
component: 'checkbox',
cardVisible: true,
visible: false,
},
]);
</script>

View File

@ -28,7 +28,6 @@ const body = {
:add-note="true"
:filter="noteFilter"
:body="body"
style="overflow-y: auto"
required
deletable
/>