feat: refs #8833 add neutral color variable and update state color handling in claim components
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Benjamin Esteve 2025-04-11 10:44:57 +02:00
parent 5225a9f57c
commit 5c6e97b42a
4 changed files with 11 additions and 4 deletions

View File

@ -18,6 +18,7 @@ $positive: #c8e484;
$negative: #fb5252;
$info: #84d0e2;
$warning: #f4b974;
$neutral: #b0b0b0;
// Pendiente de cuadrar con la base de datos
$success: $positive;
$alert: $negative;
@ -51,3 +52,6 @@ $width-xl: 1600px;
.bg-alert {
background-color: $negative;
}
.bg-neutral {
background-color: $neutral;
}

View File

@ -29,7 +29,7 @@ const entityId = computed(() => {
});
function stateColor(entity) {
return entity?.claimState?.classColor || 'grey';
return entity?.claimState?.classColor;
}
onMounted(async () => {
@ -50,7 +50,10 @@ onMounted(async () => {
<template #body="{ entity }">
<VnLv v-if="entity.claimState" :label="t('claim.state')">
<template #value>
<QBadge :color="stateColor(entity)" text-color="black" dense>
<QBadge
:color="stateColor(entity)"
style="color: var(--vn-black-text-color)"
>
{{ entity.claimState.description }}
</QBadge>
</template>

View File

@ -110,7 +110,7 @@ const markerLabels = [
function stateColor(code) {
const claimState = claimStates.value.find((state) => state.code === code);
return claimState?.classColor || 'grey';
return claimState?.classColor;
}
const developmentColumns = ref([

View File

@ -103,7 +103,7 @@ const columns = computed(() => [
condition: () => true,
color: ({ stateCode }) => {
const state = states.value?.find(({ code }) => code === stateCode);
return state ? `bg-${state.classColor}` : 'bg-grey';
return `bg-${state.classColor}`;
},
},
columnFilter: {