diff --git a/app/components/ComponentItem.vue b/app/components/ComponentItem.vue index da8c2dc..6de2d7b 100644 --- a/app/components/ComponentItem.vue +++ b/app/components/ComponentItem.vue @@ -127,7 +127,7 @@ Voir le produit diff --git a/app/components/DetailHeader.vue b/app/components/DetailHeader.vue new file mode 100644 index 0000000..d54869a --- /dev/null +++ b/app/components/DetailHeader.vue @@ -0,0 +1,40 @@ + + + diff --git a/app/components/PieceItem.vue b/app/components/PieceItem.vue index 4d72aeb..579c535 100644 --- a/app/components/PieceItem.vue +++ b/app/components/PieceItem.vue @@ -180,7 +180,7 @@

Ouvrir la fiche produit diff --git a/app/composables/useComponentCreate.ts b/app/composables/useComponentCreate.ts index cd7c6c4..40ab58f 100644 --- a/app/composables/useComponentCreate.ts +++ b/app/composables/useComponentCreate.ts @@ -344,7 +344,7 @@ export function useComponentCreate() { selectedDocuments.value = [] } toast.showSuccess('Composant créé avec succès') - await router.replace(`/component/${createdComponent.id}/edit`) + await router.replace(`/component/${createdComponent.id}?edit=true`) } else if (result.error) { toast.showError(result.error) diff --git a/app/composables/useComponentEdit.ts b/app/composables/useComponentEdit.ts index 48dafc6..48e9afe 100644 --- a/app/composables/useComponentEdit.ts +++ b/app/composables/useComponentEdit.ts @@ -569,6 +569,7 @@ export function useComponentEdit(componentId: string) { handleFilesAdded, refreshDocuments, submitEdition, + fetchComponent, setSlotQuantity, setPieceSlotSelection, setProductSlotSelection, diff --git a/app/composables/usePieceEdit.ts b/app/composables/usePieceEdit.ts index 99226c4..8053dc0 100644 --- a/app/composables/usePieceEdit.ts +++ b/app/composables/usePieceEdit.ts @@ -467,6 +467,7 @@ export function usePieceEdit(pieceId: string) { handleFilesAdded, setProductSelection, submitEdition, + fetchPiece, formatPieceStructurePreview, } } diff --git a/app/pages/comments.vue b/app/pages/comments.vue index a6ca3fc..05f31e7 100644 --- a/app/pages/comments.vue +++ b/app/pages/comments.vue @@ -243,9 +243,9 @@ const handleResolve = async (commentId: string) => { const ENTITY_ROUTE_MAP: Record string> = { machine: (id: string) => `/machine/${id}`, - piece: (id: string) => `/pieces/${id}/edit`, - composant: (id: string) => `/component/${id}/edit`, - product: (id: string) => `/product/${id}/edit`, + piece: (id: string) => `/piece/${id}`, + composant: (id: string) => `/component/${id}`, + product: (id: string) => `/product/${id}`, piece_category: (id: string) => `/piece-category/${id}/edit`, component_category: (id: string) => `/component-category/${id}/edit`, product_category: (id: string) => `/product-category/${id}/edit`, diff --git a/app/pages/component-catalog.vue b/app/pages/component-catalog.vue index 4920fd0..a6ef97b 100644 --- a/app/pages/component-catalog.vue +++ b/app/pages/component-catalog.vue @@ -96,12 +96,14 @@ diff --git a/app/pages/component/[id]/index.vue b/app/pages/component/[id]/index.vue new file mode 100644 index 0000000..819f4b3 --- /dev/null +++ b/app/pages/component/[id]/index.vue @@ -0,0 +1,517 @@ +