fix: add missing template tag and preserve constructeurIds
- Fix missing <template> tag in product/create.vue causing build error - Preserve constructeurIds when product already has constructeurs loaded Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,10 @@ export function useProducts () {
|
||||
const hasConstructeurs =
|
||||
Array.isArray(product.constructeurs) && product.constructeurs.length > 0
|
||||
|
||||
if (hasConstructeurs && ids.length) {
|
||||
product.constructeurIds = ids
|
||||
}
|
||||
|
||||
if (ids.length && !hasConstructeurs) {
|
||||
const resolved = await ensureConstructeurs(ids)
|
||||
if (resolved.length) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<main class="mx-auto flex w-full max-w-4xl flex-col gap-8 px-4 py-8 sm:px-6 lg:px-8">
|
||||
<template>
|
||||
<main class="mx-auto flex w-full max-w-4xl flex-col gap-8 px-4 py-8 sm:px-6 lg:px-8">
|
||||
<header class="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-3xl font-semibold text-base-content">Nouveau produit</h1>
|
||||
@@ -231,7 +231,7 @@
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
Reference in New Issue
Block a user