HOTFIX: Customer Risk color #942

Merged
jsegarra merged 2 commits from hotFix_customerRisk_icon into master 2024-11-15 10:32:36 +00:00
1 changed files with 6 additions and 3 deletions

View File

@ -37,6 +37,9 @@ const entityId = computed(() => {
const data = ref(useCardDescription()); const data = ref(useCardDescription());
const setData = (entity) => (data.value = useCardDescription(entity?.name, entity?.id)); const setData = (entity) => (data.value = useCardDescription(entity?.name, entity?.id));
const debtWarning = computed(() => {
return customer.value?.debt > customer.value?.credit ? 'negative' : 'primary';
});
</script> </script>
<template> <template>
@ -110,8 +113,8 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
<QIcon <QIcon
v-if="customer.debt > customer.credit" v-if="customer.debt > customer.credit"
name="vn:risk" name="vn:risk"
size="xs" size="xs"
color="primary" :color="debtWarning"
> >
<QTooltip>{{ t('customer.card.hasDebt') }}</QTooltip> <QTooltip>{{ t('customer.card.hasDebt') }}</QTooltip>
</QIcon> </QIcon>
@ -122,7 +125,7 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
color="primary" color="primary"
> >
<QTooltip>{{ t('customer.card.notChecked') }}</QTooltip> <QTooltip>{{ t('customer.card.notChecked') }}</QTooltip>
</QIcon> </QIcon>
<QBtn <QBtn
v-if="customer.unpaid" v-if="customer.unpaid"
flat flat