From 8dacad7a5948f4788a643e1a4cf92d7b1038c945 Mon Sep 17 00:00:00 2001
From: Matthieu
Date: Fri, 13 Mar 2026 13:49:24 +0100
Subject: [PATCH] refactor(sync) : remove restrictedMode and add sync service +
confirmation modal
---
.../ComponentModelStructureEditor.vue | 5 -
app/components/PieceModelStructureEditor.vue | 32 +--
app/components/StructureNodeEditor.vue | 50 +---
app/components/SyncConfirmationModal.vue | 112 ++++++++
app/components/model-types/ModelTypeForm.vue | 50 +---
app/composables/useCategoryEditGuard.ts | 114 --------
.../usePieceStructureEditorLogic.ts | 20 --
app/composables/useStructureNodeCrud.ts | 45 ---
app/composables/useStructureNodeLogic.ts | 9 -
app/pages/component-category/[id]/edit.vue | 26 --
app/pages/piece-category/[id]/edit.vue | 26 --
app/pages/product-category/[id]/edit.vue | 26 --
app/services/modelTypes.ts | 42 +++
tests/components/ModelTypeForm.test.ts | 50 ----
.../PieceModelStructureEditor.test.ts | 92 ------
.../composables/useCategoryEditGuard.test.ts | 269 ------------------
16 files changed, 168 insertions(+), 800 deletions(-)
create mode 100644 app/components/SyncConfirmationModal.vue
delete mode 100644 app/composables/useCategoryEditGuard.ts
delete mode 100644 tests/composables/useCategoryEditGuard.test.ts
diff --git a/app/components/ComponentModelStructureEditor.vue b/app/components/ComponentModelStructureEditor.vue
index 40b6905..e65193f 100644
--- a/app/components/ComponentModelStructureEditor.vue
+++ b/app/components/ComponentModelStructureEditor.vue
@@ -10,7 +10,6 @@
:locked-type-label="displayedRootTypeLabel"
:allow-subcomponents="allowSubcomponents"
:max-subcomponent-depth="maxSubcomponentDepth"
- :restricted-mode="restrictedMode"
is-root
/>
@@ -56,10 +55,6 @@ const props = defineProps({
type: Number,
default: Infinity,
},
- restrictedMode: {
- type: Boolean,
- default: false,
- },
})
const emit = defineEmits(['update:modelValue'])
diff --git a/app/components/PieceModelStructureEditor.vue b/app/components/PieceModelStructureEditor.vue
index c58b25c..c26a7fc 100644
--- a/app/components/PieceModelStructureEditor.vue
+++ b/app/components/PieceModelStructureEditor.vue
@@ -29,7 +29,6 @@
-
+
{{ productStructurePreview }}
-
+
-
-
-
{{ restrictedModeMessage }}
-
-
-
- {{ disableSubmitMessage }}
-
-