WIP
This commit is contained in:
@@ -78,7 +78,9 @@ const getConstructeurContact = (link: ConstructeurLinkEntry): string => {
|
||||
|
||||
const updateReference = (index: number, value: string) => {
|
||||
const updated = [...props.modelValue]
|
||||
updated[index] = { ...updated[index], supplierReference: value || null }
|
||||
const entry = updated[index]
|
||||
if (!entry) return
|
||||
updated[index] = { ...entry, supplierReference: value || null }
|
||||
emit('update:modelValue', updated)
|
||||
}
|
||||
|
||||
@@ -86,6 +88,6 @@ const removeLink = (index: number) => {
|
||||
const removed = props.modelValue[index]
|
||||
const updated = props.modelValue.filter((_, i) => i !== index)
|
||||
emit('update:modelValue', updated)
|
||||
emit('remove', removed.constructeurId)
|
||||
if (removed) emit('remove', removed.constructeurId)
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user