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;
|
$negative: #fb5252;
|
||||||
$info: #84d0e2;
|
$info: #84d0e2;
|
||||||
$warning: #f4b974;
|
$warning: #f4b974;
|
||||||
|
$neutral: #b0b0b0;
|
||||||
// Pendiente de cuadrar con la base de datos
|
// Pendiente de cuadrar con la base de datos
|
||||||
$success: $positive;
|
$success: $positive;
|
||||||
$alert: $negative;
|
$alert: $negative;
|
||||||
|
@ -51,3 +52,6 @@ $width-xl: 1600px;
|
||||||
.bg-alert {
|
.bg-alert {
|
||||||
background-color: $negative;
|
background-color: $negative;
|
||||||
}
|
}
|
||||||
|
.bg-neutral {
|
||||||
|
background-color: $neutral;
|
||||||
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ const entityId = computed(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
function stateColor(entity) {
|
function stateColor(entity) {
|
||||||
return entity?.claimState?.classColor || 'grey';
|
return entity?.claimState?.classColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
@ -50,7 +50,10 @@ onMounted(async () => {
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv v-if="entity.claimState" :label="t('claim.state')">
|
<VnLv v-if="entity.claimState" :label="t('claim.state')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QBadge :color="stateColor(entity)" text-color="black" dense>
|
<QBadge
|
||||||
|
:color="stateColor(entity)"
|
||||||
|
style="color: var(--vn-black-text-color)"
|
||||||
|
>
|
||||||
{{ entity.claimState.description }}
|
{{ entity.claimState.description }}
|
||||||
</QBadge>
|
</QBadge>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -110,7 +110,7 @@ const markerLabels = [
|
||||||
|
|
||||||
function stateColor(code) {
|
function stateColor(code) {
|
||||||
const claimState = claimStates.value.find((state) => state.code === code);
|
const claimState = claimStates.value.find((state) => state.code === code);
|
||||||
return claimState?.classColor || 'grey';
|
return claimState?.classColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
const developmentColumns = ref([
|
const developmentColumns = ref([
|
||||||
|
|
|
@ -103,7 +103,7 @@ const columns = computed(() => [
|
||||||
condition: () => true,
|
condition: () => true,
|
||||||
color: ({ stateCode }) => {
|
color: ({ stateCode }) => {
|
||||||
const state = states.value?.find(({ code }) => code === stateCode);
|
const state = states.value?.find(({ code }) => code === stateCode);
|
||||||
return state ? `bg-${state.classColor}` : 'bg-grey';
|
return `bg-${state.classColor}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
|
|
Loading…
Reference in New Issue