forked from verdnatura/salix-front
Reviewed-on: verdnatura/salix-front#151 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
2148c18952
|
@ -2,7 +2,7 @@
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate, toPercentage } from 'src/filters';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
|
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
|
||||||
|
@ -32,7 +32,16 @@ const filter = {
|
||||||
{
|
{
|
||||||
relation: 'client',
|
relation: 'client',
|
||||||
scope: {
|
scope: {
|
||||||
include: { relation: 'salesPersonUser' },
|
include: [
|
||||||
|
{ relation: 'salesPersonUser' },
|
||||||
|
{
|
||||||
|
relation: 'claimsRatio',
|
||||||
|
scope: {
|
||||||
|
fields: ['claimingRate'],
|
||||||
|
limit: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -135,6 +144,10 @@ const setData = (entity) => {
|
||||||
:value="entity.ticket?.address?.province?.name"
|
:value="entity.ticket?.address?.province?.name"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('claim.card.zone')" :value="entity.ticket?.zone?.name" />
|
<VnLv :label="t('claim.card.zone')" :value="entity.ticket?.zone?.name" />
|
||||||
|
<VnLv
|
||||||
|
:label="t('claim.card.zone')"
|
||||||
|
:value="toPercentage(entity.client?.claimsRatio?.claimingRate)"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #actions="{ entity }">
|
<template #actions="{ entity }">
|
||||||
<QCardActions>
|
<QCardActions>
|
||||||
|
|
|
@ -38,7 +38,7 @@ const balanceDue = computed(() => {
|
||||||
const balanceDueWarning = computed(() => (balanceDue.value ? 'negative' : ''));
|
const balanceDueWarning = computed(() => (balanceDue.value ? 'negative' : ''));
|
||||||
|
|
||||||
const claimRate = computed(() => {
|
const claimRate = computed(() => {
|
||||||
return customer.value.claimsRatio.claimingRate * 100;
|
return customer.value.claimsRatio.claimingRate;
|
||||||
});
|
});
|
||||||
|
|
||||||
const priceIncreasingRate = computed(() => {
|
const priceIncreasingRate = computed(() => {
|
||||||
|
|
Loading…
Reference in New Issue