refactor: refs #6919 update data-key and state references to use 'Customer'
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2025-01-08 11:58:19 +01:00
parent 74dd49ffe0
commit 8c77f6fe40
3 changed files with 8 additions and 7 deletions

View File

@ -57,6 +57,7 @@ function onBeforeSave(formData, originalData) {
:url-update="`Clients/${route.params.id}`"
auto-load
:mapper="onBeforeSave"
module="Customer"
>
<template #form="{ data, validate }">
<VnRow>

View File

@ -5,7 +5,7 @@ import CustomerFilter from '../CustomerFilter.vue';
</script>
<template>
<VnCard
data-key="Client"
data-key="Customer"
:custom-url="`Clients/${$route.params.id}/getCard`"
:descriptor="CustomerDescriptor"
:filter-panel="$route.name != 'CustomerConsumption' && CustomerFilter"

View File

@ -17,7 +17,7 @@ const state = useState();
const customer = ref();
onMounted(async () => {
customer.value = state.get('customer');
customer.value = state.get('Customer');
if (customer.value) customer.value.webAccess = data.value?.account?.isActive;
});
@ -54,7 +54,7 @@ const debtWarning = computed(() => {
module="Customer"
:url="`Clients/${entityId}/getCard`"
:summary="$props.summary"
data-key="Client"
data-key="Customer"
@on-fetch="setData"
>
<template #menu="{ entity }">
@ -63,7 +63,7 @@ const debtWarning = computed(() => {
<template #body="{ entity }">
<VnLv
:label="t('customer.summary.payMethod')"
:value="entity.payMethod.name"
:value="entity.payMethod?.name"
/>
<VnLv
@ -92,7 +92,7 @@ const debtWarning = computed(() => {
</VnLv>
<VnLv
:label="t('customer.extendedList.tableVisibleColumns.businessTypeFk')"
:value="entity.businessType.description"
:value="entity.businessType?.description"
/>
</template>
<template #icons>
@ -150,13 +150,13 @@ const debtWarning = computed(() => {
<br />
{{
t('unpaidDated', {
dated: toDate(customer.unpaid.dated),
dated: toDate(customer.unpaid?.dated),
})
}}
<br />
{{
t('unpaidAmount', {
amount: toCurrency(customer.unpaid.amount),
amount: toCurrency(customer.unpaid?.amount),
})
}}
</QTooltip>