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
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
5225a9f57c
commit
5c6e97b42a
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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([
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue