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:
Matthieu
2026-01-22 11:48:56 +01:00
parent 603c03ca00
commit 86d15faa01
2 changed files with 7 additions and 3 deletions

View File

@@ -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) {

View File

@@ -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">