refactor: refs #8363 update color when modifying an item
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jon Elias 2025-03-12 15:49:13 +01:00
parent 5eb6e7b24b
commit d12cd60079
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,6 @@
<script setup>
import { computed } from 'vue';
const $props = defineProps({
colors: {
type: String,
@ -6,7 +8,7 @@ const $props = defineProps({
},
});
const colorArray = JSON.parse($props.colors)?.value;
const colorArray = computed(() => JSON.parse($props.colors)?.value);
const maxHeight = 30;
const colorHeight = maxHeight / colorArray?.length;
</script>

View File

@ -47,7 +47,6 @@ const columns = computed(() => [
},
{
labelAbbreviation: '',
label: 'Color',
name: 'hex',
columnSearch: false,
isEditable: false,
@ -243,6 +242,7 @@ const dateStyle = (date) =>
:beforeSaveFn="(data, getChanges) => beforeSave(data, getChanges, 'FixedPrices')"
>
<template #column-hex="{ row }">
<!-- {{ console.log('row: ', row?.hexJson, row?.warehouseName) }} -->
<VnColor :colors="row?.hexJson" style="height: 100%; min-width: 2000px" />
</template>
<template #column-name="{ row }">