feat: #6943 apply color based on condition
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:
parent
c72c8205f1
commit
df662f1dce
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue