fix(front): for now, all tags persisted on the backend are considered `presets` and can't be edited

2448-complete-tags
Flupsi 2025-07-25 18:21:21 +02:00
rodzic 6b420058b9
commit 9f34801243
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -317,7 +317,7 @@ const resetField = (fieldId: string) => {
:get="model => { values[fieldConfig.id] = model.currents.map(({ label }) => label) }"
:set="model => ({
...model,
currents: (values[fieldConfig.id] as string[]).map(tag => ({ type: 'custom' as const, label: tag })),
currents: (values[fieldConfig.id] as string[]).map(tag => ({ type: dataStore.tags().value.every(({ name })=> name !== tag) ? 'custom' as const : 'preset' as const, label: tag })),
others: dataStore.tags().value.map(({ name }) => ({ type: 'preset' as const, label: name })),
})"
:label="fieldConfig.label"

Wyświetl plik

@ -242,7 +242,7 @@ const current = computed(() => (
: currentItem.value.label === previousValue?.label && currentItem.value.type==='custom' && !otherItems.value?.find(({ label })=>label === currentItem.value?.label.trim()) && currentItem.value.label !== ''
? {
attributes: {
title: `Delete ${currentItem.value.label}`,
title: `Delete "${currentItem.value.label}"`,
icon: 'bi-trash',
destructive: true
},