Merge branch 'master' into hotFix_ticketSummary_add_ticketDescriptorMenu
gitea/salix-front/pipeline/pr-master This commit looks good
Details
gitea/salix-front/pipeline/pr-master This commit looks good
Details
This commit is contained in:
commit
5b4299114b
|
@ -4,7 +4,7 @@ import { useRoute } from 'vue-router';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||
|
||||
import { toCurrency, toPercentage, toDate } from 'src/filters';
|
||||
import { toCurrency, toPercentage, toDate, dashOrCurrency } from 'src/filters';
|
||||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||
|
@ -25,16 +25,16 @@ const $props = defineProps({
|
|||
const entityId = computed(() => $props.id || route.params.id);
|
||||
const customer = computed(() => summary.value.entity);
|
||||
const summary = ref();
|
||||
|
||||
const defaulterAmount = computed(() => customer.value.defaulters[0]?.amount);
|
||||
const balanceDue = computed(() => {
|
||||
return (
|
||||
customer.value &&
|
||||
customer.value.defaulters.length &&
|
||||
customer.value.defaulters[0].amount
|
||||
);
|
||||
const amount = defaulterAmount.value;
|
||||
if (!amount || amount < 0) {
|
||||
return null;
|
||||
}
|
||||
return amount;
|
||||
});
|
||||
|
||||
const balanceDueWarning = computed(() => (balanceDue.value ? 'negative' : ''));
|
||||
const balanceDueWarning = computed(() => (defaulterAmount.value ? 'negative' : ''));
|
||||
|
||||
const claimRate = computed(() => {
|
||||
return customer.value.claimsRatio?.claimingRate ?? 0;
|
||||
|
@ -281,7 +281,7 @@ const sumRisk = ({ clientRisks }) => {
|
|||
<VnLv
|
||||
v-if="entity.defaulters"
|
||||
:label="t('customer.summary.balanceDue')"
|
||||
:value="toCurrency(balanceDue)"
|
||||
:value="dashOrCurrency(balanceDue)()"
|
||||
:class="balanceDueWarning"
|
||||
:info="t('customer.summary.balanceDueInfo')"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue