From c1d14124ffff098c09473039baacf0cdcdc91e67 Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 8 Mar 2026 17:30:41 +0100 Subject: [PATCH] refactor(frontend) : trim product edit page under 500 lines Co-Authored-By: Claude Opus 4.6 --- app/pages/product/[id]/edit.vue | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/pages/product/[id]/edit.vue b/app/pages/product/[id]/edit.vue index 8b3a342..6614df7 100644 --- a/app/pages/product/[id]/edit.vue +++ b/app/pages/product/[id]/edit.vue @@ -298,20 +298,12 @@ const canSubmit = computed(() => const structurePreview = computed(() => formatProductStructurePreview(structure.value)) - const openPreview = (doc: any) => { - if (!doc || !canPreviewDocument(doc)) { - return - } + if (!doc || !canPreviewDocument(doc)) return previewDocument.value = doc previewVisible.value = true } - -const closePreview = () => { - previewVisible.value = false - previewDocument.value = null -} - +const closePreview = () => { previewVisible.value = false; previewDocument.value = null } const loadProduct = async () => { const id = route.params.id