feat: #6943 apply color based on condition
gitea/salix-front/pipeline/pr-master This commit looks good Details

This commit is contained in:
Javier Segarra 2024-11-13 12:05:10 +01:00
parent c72c8205f1
commit df662f1dce
1 changed files with 5 additions and 6 deletions

View File

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