From be859e57dbd49f6c4859806c33cdea8cf4e34bcb Mon Sep 17 00:00:00 2001 From: Matthieu Date: Wed, 1 Apr 2026 14:20:19 +0200 Subject: [PATCH] refactor : rename Inventory_frontend to frontend in docs Co-Authored-By: Claude Opus 4.6 (1M context) --- DEPLOY.md | 12 ++-- RELEASE.md | 6 +- docs/REVIEW_ARCHITECTURE.md | 16 ++--- ...2026-03-12-json-to-tables-normalization.md | 8 +-- .../plans/2026-03-12-piece-quantity.md | 50 +++++++------- .../plans/2026-03-13-modeltype-sync.md | 60 ++++++++-------- .../plans/2026-03-23-comment-documents.md | 14 ++-- .../plans/2026-03-23-document-types.md | 68 +++++++++---------- .../plans/2026-03-23-fix-data-loss-bugs.md | 14 ++-- .../plans/2026-03-23-parc-machines-ux.md | 20 +++--- .../plans/2026-03-24-detail-views.md | 4 +- .../plans/2026-03-25-entity-versioning.md | 56 +++++++-------- .../plans/2026-03-26-machine-single-save.md | 42 ++++++------ ...2026-03-31-supplier-references-frontend.md | 58 ++++++++-------- .../2026-03-23-parc-machines-ux-design.md | 18 ++--- ...-03-31-reference-formula-builder-design.md | 2 +- ...2026-03-08-reduce-files-under-500-lines.md | 6 +- 17 files changed, 227 insertions(+), 227 deletions(-) diff --git a/DEPLOY.md b/DEPLOY.md index 464fcae..d61362b 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -12,7 +12,7 @@ inventory.malio-dev.fr/api → Backend Symfony (PHP-FPM derrière Nginx) | Composant | Technologie | Emplacement serveur | |-----------|-------------|---------------------| | Backend | Symfony 8 + API Platform | `/var/www/Inventory/` | -| Frontend | Nuxt 4 (site statique) | `/var/www/Inventory/Inventory_frontend/.output/public/` | +| Frontend | Nuxt 4 (site statique) | `/var/www/Inventory/frontend/.output/public/` | | Base de données | PostgreSQL 16 | Base `inventory` | ### Schéma simplifié @@ -117,7 +117,7 @@ php bin/console doctrine:migrations:migrate --no-interaction ### 4. Configurer le frontend Nuxt ```bash -cd /var/www/Inventory/Inventory_frontend +cd /var/www/Inventory/frontend # Permissions sudo chown -R malio:malio . @@ -173,7 +173,7 @@ server { # Frontend statique — tout le reste location / { - root /var/www/Inventory/Inventory_frontend/.output/public; + root /var/www/Inventory/frontend/.output/public; index index.html; try_files $uri $uri/ /index.html; # SPA fallback } @@ -214,7 +214,7 @@ php bin/console cache:clear --env=prod sudo chown -R www-data:www-data var/ # Frontend -cd Inventory_frontend +cd frontend npm install npx nuxi generate ``` @@ -268,7 +268,7 @@ php /var/www/Inventory/bin/console cache:clear --env=prod Les fichiers statiques sont en cache. Rebuilder : ```bash -cd /var/www/Inventory/Inventory_frontend +cd /var/www/Inventory/frontend rm -rf .output npx nuxi generate ``` @@ -299,7 +299,7 @@ tail -f /var/www/Inventory/var/log/prod.log php /var/www/Inventory/bin/console cache:clear --env=prod # Rebuild frontend -cd /var/www/Inventory/Inventory_frontend && npx nuxi generate +cd /var/www/Inventory/frontend && npx nuxi generate # Status des services systemctl status php8.4-fpm diff --git a/RELEASE.md b/RELEASE.md index 11e19d0..e58d2dc 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -59,7 +59,7 @@ Après avoir exécuté le script : ```bash # Pousser le frontend d'abord (si modifié) -cd Inventory_frontend && git push && git push --tags && cd .. +cd frontend && git push && git push --tags && cd .. # Pousser le backend git push && git push --tags @@ -79,7 +79,7 @@ git push && git push --tags |---------|------| | `VERSION` | Source unique de vérité | | `config/packages/api_platform.yaml` | Version affichée dans la doc API (Swagger) | -| `Inventory_frontend/nuxt.config.ts` | Lit `VERSION` au build pour l'afficher dans le footer | +| `frontend/nuxt.config.ts` | Lit `VERSION` au build pour l'afficher dans le footer | | Footer de l'app | Affiche `v{{ appVersion }}` | ## Notes de release @@ -118,5 +118,5 @@ git submodule update --init --recursive composer install --no-dev --optimize-autoloader php bin/console doctrine:migrations:migrate --no-interaction php bin/console cache:clear --env=prod -cd Inventory_frontend && npm install && npx nuxi generate +cd frontend && npm install && npx nuxi generate ``` diff --git a/docs/REVIEW_ARCHITECTURE.md b/docs/REVIEW_ARCHITECTURE.md index 5440a1e..bf64911 100644 --- a/docs/REVIEW_ARCHITECTURE.md +++ b/docs/REVIEW_ARCHITECTURE.md @@ -103,10 +103,10 @@ Cela securise l'integrite sans changer l'architecture. Le `resolveTarget` et les ### 3. Composables frontend geants (400-550 LOC) **Fichiers concernes :** -- `/Inventory_frontend/app/composables/useComponentEdit.ts` (550 LOC) -- `/Inventory_frontend/app/composables/usePieceEdit.ts` (472 LOC) -- `/Inventory_frontend/app/composables/useMachineDetailData.ts` (468 LOC) -- `/Inventory_frontend/app/composables/useComponentCreate.ts` (417 LOC) +- `/frontend/app/composables/useComponentEdit.ts` (550 LOC) +- `/frontend/app/composables/usePieceEdit.ts` (472 LOC) +- `/frontend/app/composables/useMachineDetailData.ts` (468 LOC) +- `/frontend/app/composables/useComponentCreate.ts` (417 LOC) **Probleme :** Ces composables orchestrent en un seul fichier : le chargement de donnees, la gestion de formulaire, la persistence des custom fields, la gestion des documents, l'historique, la resolution de labels, et la soumission. Chacun instancie 8-12 sous-composables. @@ -134,9 +134,9 @@ Appliquer le meme pattern a `usePieceEdit` et `useComponentCreate`. Les blocs co ### 4. Triple duplication de la logique custom fields frontend **Fichiers concernes :** -- `/Inventory_frontend/app/shared/utils/customFieldFormUtils.ts` (404 LOC) - pour les pages create/edit -- `/Inventory_frontend/app/shared/utils/customFieldUtils.ts` (440 LOC) - pour la page machine detail -- `/Inventory_frontend/app/shared/utils/entityCustomFieldLogic.ts` (335 LOC) - pour les composants item +- `/frontend/app/shared/utils/customFieldFormUtils.ts` (404 LOC) - pour les pages create/edit +- `/frontend/app/shared/utils/customFieldUtils.ts` (440 LOC) - pour la page machine detail +- `/frontend/app/shared/utils/entityCustomFieldLogic.ts` (335 LOC) - pour les composants item **Probleme :** Ces 3 fichiers resolvent le meme probleme (normaliser des definitions de custom fields + merger avec des valeurs existantes) avec des implementations differentes : - `customFieldFormUtils.ts` : `resolveFieldName()`, `resolveFieldType()`, `buildCustomFieldInputs()` @@ -273,7 +273,7 @@ public function process(mixed $data, Operation $operation, ...): mixed ### 9. Dependance circulaire dans `useMachineDetailData` **Fichier concerne :** -- `/Inventory_frontend/app/composables/useMachineDetailData.ts` (lignes 119-187) +- `/frontend/app/composables/useMachineDetailData.ts` (lignes 119-187) **Probleme :** `useMachineDetailProducts` a besoin de `machineProductLinks` (venant de hierarchy), et `useMachineDetailHierarchy` a besoin de `findProductById` (venant de products). La solution actuelle utilise un `_machineProductLinksProxy` ref avec un watcher pour synchroniser. diff --git a/docs/superpowers/plans/2026-03-12-json-to-tables-normalization.md b/docs/superpowers/plans/2026-03-12-json-to-tables-normalization.md index 47f703b..de5b4d3 100644 --- a/docs/superpowers/plans/2026-03-12-json-to-tables-normalization.md +++ b/docs/superpowers/plans/2026-03-12-json-to-tables-normalization.md @@ -811,9 +811,9 @@ private function resolvePieceQuantity(MachinePieceLink $pieceLink): int ### Task 2.5: Update Frontend to Handle New Structure Format **Files:** -- Modify: `Inventory_frontend/app/composables/useMachineHierarchy.ts` — `buildMachineHierarchyFromLinks()` -- Modify: `Inventory_frontend/app/shared/utils/structureDisplayUtils.ts` -- Modify: `Inventory_frontend/app/shared/utils/structureSelectionUtils.ts` +- Modify: `frontend/app/composables/useMachineHierarchy.ts` — `buildMachineHierarchyFromLinks()` +- Modify: `frontend/app/shared/utils/structureDisplayUtils.ts` +- Modify: `frontend/app/shared/utils/structureSelectionUtils.ts` **Note:** The API response shape for `structure` stays the same (pieces/subcomponents/products arrays), so frontend changes should be minimal. The main change is that `path` fields are removed and `resolvedPiece` is now always populated inline. @@ -950,7 +950,7 @@ ALTER TABLE pieces DROP COLUMN IF EXISTS productids; ### Task 4.1: Update Frontend Types **Files:** -- Modify: `Inventory_frontend/app/shared/types/` (if type definitions reference structure/skeleton JSON shapes) +- Modify: `frontend/app/shared/types/` (if type definitions reference structure/skeleton JSON shapes) - [ ] **Step 1: Search frontend for all references to `structure.pieces`, `structure.subcomponents`, `structure.products`, `skeleton`, `productIds`** diff --git a/docs/superpowers/plans/2026-03-12-piece-quantity.md b/docs/superpowers/plans/2026-03-12-piece-quantity.md index 6d69b09..f11e5bf 100644 --- a/docs/superpowers/plans/2026-03-12-piece-quantity.md +++ b/docs/superpowers/plans/2026-03-12-piece-quantity.md @@ -274,15 +274,15 @@ git commit -m "test(piece) : add quantity tests for MachinePieceLink" ### Task 4: TypeScript Types + Sanitization + Hydration Functions **Files:** -- Modify: `Inventory_frontend/app/shared/types/inventory.ts` -- Modify: `Inventory_frontend/app/shared/model/componentStructure.ts` -- Modify: `Inventory_frontend/app/shared/model/componentStructureSanitize.ts` -- Modify: `Inventory_frontend/app/shared/model/componentStructureHydrate.ts` -- Modify: `Inventory_frontend/app/shared/utils/structureAssignmentHelpers.ts` +- Modify: `frontend/app/shared/types/inventory.ts` +- Modify: `frontend/app/shared/model/componentStructure.ts` +- Modify: `frontend/app/shared/model/componentStructureSanitize.ts` +- Modify: `frontend/app/shared/model/componentStructureHydrate.ts` +- Modify: `frontend/app/shared/utils/structureAssignmentHelpers.ts` - [ ] **Step 1: Add `quantity` to `ComponentModelPiece` type** -In `Inventory_frontend/app/shared/types/inventory.ts`, add `quantity` to the `ComponentModelPiece` interface (after `role`, line ~23): +In `frontend/app/shared/types/inventory.ts`, add `quantity` to the `ComponentModelPiece` interface (after `role`, line ~23): ```typescript quantity?: number @@ -290,7 +290,7 @@ quantity?: number - [ ] **Step 2: Add `quantity` to `validatePiece()` in same file** -In `Inventory_frontend/app/shared/types/inventory.ts`, in `validatePiece()` (line ~144-172): +In `frontend/app/shared/types/inventory.ts`, in `validatePiece()` (line ~144-172): After `const role = ensureString(value.role)` (line ~161), add: @@ -306,7 +306,7 @@ And in the return object, add after the `role` spread: - [ ] **Step 3: Update `sanitizePieces()` to preserve quantity** -In `Inventory_frontend/app/shared/model/componentStructureSanitize.ts`, in `sanitizePieces()` (~line 130-188). +In `frontend/app/shared/model/componentStructureSanitize.ts`, in `sanitizePieces()` (~line 130-188). After the existing field extractions, add: @@ -324,7 +324,7 @@ if (quantity !== undefined) { - [ ] **Step 4: Update `normalizeStructureForSave()` to include quantity** -In `Inventory_frontend/app/shared/model/componentStructure.ts`, in `normalizeStructureForSave()` (~lines 164-179), add in the piece payload mapping after the `reference` check: +In `frontend/app/shared/model/componentStructure.ts`, in `normalizeStructureForSave()` (~lines 164-179), add in the piece payload mapping after the `reference` check: ```typescript if ((piece as any).quantity !== undefined && (piece as any).quantity >= 1) { @@ -336,7 +336,7 @@ if ((piece as any).quantity !== undefined && (piece as any).quantity >= 1) { - [ ] **Step 5: Update `hydratePieces()` and `mapComponentPieces()` to preserve quantity** -In `Inventory_frontend/app/shared/model/componentStructureHydrate.ts`: +In `frontend/app/shared/model/componentStructureHydrate.ts`: In `hydratePieces()` (line ~95-107), add to the mapped object: @@ -352,7 +352,7 @@ In `mapComponentPieces()` (line ~168-179), add to the mapped object: - [ ] **Step 6: Update `sanitizePieceDefinition()` to preserve quantity** -In `Inventory_frontend/app/shared/utils/structureAssignmentHelpers.ts`, in `sanitizePieceDefinition()` (~lines 172-180), add to the `stripNullish()` object: +In `frontend/app/shared/utils/structureAssignmentHelpers.ts`, in `sanitizePieceDefinition()` (~lines 172-180), add to the `stripNullish()` object: ```typescript quantity: typeof (definition as any).quantity === 'number' ? (definition as any).quantity : null, @@ -361,14 +361,14 @@ quantity: typeof (definition as any).quantity === 'number' ? (definition as any) - [ ] **Step 7: Run lint + typecheck** ```bash -cd Inventory_frontend && npm run lint:fix && npx nuxi typecheck +cd frontend && npm run lint:fix && npx nuxi typecheck ``` Expected: 0 errors - [ ] **Step 8: Commit** ```bash -cd Inventory_frontend +cd frontend git add app/shared/types/inventory.ts app/shared/model/componentStructure.ts app/shared/model/componentStructureSanitize.ts app/shared/model/componentStructureHydrate.ts app/shared/utils/structureAssignmentHelpers.ts git commit -m "feat(piece) : add quantity field to piece types, sanitization and hydration" ``` @@ -378,14 +378,14 @@ git commit -m "feat(piece) : add quantity field to piece types, sanitization and ### Task 5: Composant Structure Editor — Quantity Input **Files:** -- Modify: `Inventory_frontend/app/components/StructureNodeEditor.vue` (piece section, lines ~229-299) -- Modify: `Inventory_frontend/app/composables/useStructureNodeCrud.ts` (`addPiece()`, lines ~110-118) +- Modify: `frontend/app/components/StructureNodeEditor.vue` (piece section, lines ~229-299) +- Modify: `frontend/app/composables/useStructureNodeCrud.ts` (`addPiece()`, lines ~110-118) **Context:** `StructureNodeEditor.vue` renders the composant structure editor. The piece section (lines ~236-293) currently shows only a `select` for `typePieceId` and a delete button. The `addPiece()` function in `useStructureNodeCrud.ts` creates new piece entries with default fields. - [ ] **Step 1: Add default quantity to `addPiece()`** -In `Inventory_frontend/app/composables/useStructureNodeCrud.ts`, in `addPiece()` (line ~110-118), add `quantity: 1` to the pushed object: +In `frontend/app/composables/useStructureNodeCrud.ts`, in `addPiece()` (line ~110-118), add `quantity: 1` to the pushed object: ```typescript const addPiece = () => { @@ -403,7 +403,7 @@ const addPiece = () => { - [ ] **Step 2: Add quantity input in `StructureNodeEditor.vue`** -In `Inventory_frontend/app/components/StructureNodeEditor.vue`, in the piece item rendering section (inside the `v-for` loop for pieces, line ~256-292), add a quantity input next to the existing piece type `select`. Place it after the select and before the delete button: +In `frontend/app/components/StructureNodeEditor.vue`, in the piece item rendering section (inside the `v-for` loop for pieces, line ~256-292), add a quantity input next to the existing piece type `select`. Place it after the select and before the delete button: ```vue ` tag. Quantity should appear as "×N" after the name, in secondary text. For direct pieces (no parent component), it should be editable. For composant pieces, read-only. - [ ] **Step 1: Add quantity display to PieceItem** -In `Inventory_frontend/app/components/PieceItem.vue`, after the piece name in the `

` tag (line ~26), add the quantity display: +In `frontend/app/components/PieceItem.vue`, after the piece name in the `

` tag (line ~26), add the quantity display: ```vue ` -- Modify: `Inventory_frontend/app/pages/piece-category/[id]/edit.vue` — same -- Modify: `Inventory_frontend/app/pages/product-category/[id]/edit.vue` — same -- Modify: `Inventory_frontend/tests/components/PieceModelStructureEditor.test.ts` — remove `restrictedMode: true` test cases +- Modify: `frontend/app/components/model-types/ModelTypeForm.vue` — remove `restrictedMode`, `disableSubmit`, `disableSubmitMessage`, `restrictedModeMessage` props and warning banner +- Modify: `frontend/app/pages/component-category/[id]/edit.vue` — remove `useCategoryEditGuard` import/usage, guard props from `` +- Modify: `frontend/app/pages/piece-category/[id]/edit.vue` — same +- Modify: `frontend/app/pages/product-category/[id]/edit.vue` — same +- Modify: `frontend/tests/components/PieceModelStructureEditor.test.ts` — remove `restrictedMode: true` test cases - [ ] **Step 1: Clean each file** (read first, then edit) - [ ] **Step 2: Run lint + typecheck** ```bash -cd Inventory_frontend && npm run lint:fix && npx nuxi typecheck +cd frontend && npm run lint:fix && npx nuxi typecheck ``` - [ ] **Step 3: Commit** ```bash -cd Inventory_frontend && git add -A && git commit -m "refactor(sync) : remove restrictedMode from ModelTypeForm and category edit pages" +cd frontend && git add -A && git commit -m "refactor(sync) : remove restrictedMode from ModelTypeForm and category edit pages" ``` --- @@ -1415,11 +1415,11 @@ cd Inventory_frontend && git add -A && git commit -m "refactor(sync) : remove re ### Task 15: Add sync service functions **Files:** -- Modify: `Inventory_frontend/app/services/modelTypes.ts` +- Modify: `frontend/app/services/modelTypes.ts` - [ ] **Step 1: Add `syncPreview` and `syncExecute`** -Add to the end of `Inventory_frontend/app/services/modelTypes.ts`: +Add to the end of `frontend/app/services/modelTypes.ts`: ```typescript export function syncPreview(id: string, structure: unknown, opts: { signal?: AbortSignal } = {}) { @@ -1466,7 +1466,7 @@ export function syncExecute(id: string, confirmation: { confirmDeletions: boolea - [ ] **Step 2: Run lint + typecheck + commit** ```bash -cd Inventory_frontend && npm run lint:fix && npx nuxi typecheck +cd frontend && npm run lint:fix && npx nuxi typecheck git add -A && git commit -m "feat(sync) : add syncPreview and syncExecute service functions" ``` @@ -1475,7 +1475,7 @@ git add -A && git commit -m "feat(sync) : add syncPreview and syncExecute servic ### Task 16: Create SyncConfirmationModal component **Files:** -- Create: `Inventory_frontend/app/components/SyncConfirmationModal.vue` +- Create: `frontend/app/components/SyncConfirmationModal.vue` - [ ] **Step 1: Create the modal** @@ -1487,7 +1487,7 @@ Emits: `confirm`, `cancel` - [ ] **Step 2: Run lint + typecheck + commit** ```bash -cd Inventory_frontend && npm run lint:fix && npx nuxi typecheck +cd frontend && npm run lint:fix && npx nuxi typecheck git add -A && git commit -m "feat(sync) : add SyncConfirmationModal component" ``` @@ -1496,9 +1496,9 @@ git add -A && git commit -m "feat(sync) : add SyncConfirmationModal component" ### Task 17: Wire sync flow into category edit pages **Files:** -- Modify: `Inventory_frontend/app/pages/component-category/[id]/edit.vue` -- Modify: `Inventory_frontend/app/pages/piece-category/[id]/edit.vue` -- Modify: `Inventory_frontend/app/pages/product-category/[id]/edit.vue` +- Modify: `frontend/app/pages/component-category/[id]/edit.vue` +- Modify: `frontend/app/pages/piece-category/[id]/edit.vue` +- Modify: `frontend/app/pages/product-category/[id]/edit.vue` - [ ] **Step 1: Update `component-category/[id]/edit.vue`** @@ -1524,13 +1524,13 @@ Same flow, adapt imports and routes. - [ ] **Step 4: Run lint + typecheck + build** ```bash -cd Inventory_frontend && npm run lint:fix && npx nuxi typecheck && npm run build +cd frontend && npm run lint:fix && npx nuxi typecheck && npm run build ``` - [ ] **Step 5: Commit** ```bash -cd Inventory_frontend && git add -A && git commit -m "feat(sync) : wire sync flow into category edit pages with confirmation modal" +cd frontend && git add -A && git commit -m "feat(sync) : wire sync flow into category edit pages with confirmation modal" ``` --- @@ -1547,7 +1547,7 @@ Expected: All tests pass. - [ ] **Step 2: Run frontend checks** ```bash -cd Inventory_frontend && npm run lint:fix && npx nuxi typecheck && npm run build +cd frontend && npm run lint:fix && npx nuxi typecheck && npm run build ``` - [ ] **Step 3: Run php-cs-fixer** @@ -1561,7 +1561,7 @@ Run: `make php-cs-fixer-allow-risky` - [ ] **Step 1: Update frontend submodule** ```bash -git add Inventory_frontend +git add frontend git commit -m "chore(submodule) : update frontend pointer for sync feature" ``` diff --git a/docs/superpowers/plans/2026-03-23-comment-documents.md b/docs/superpowers/plans/2026-03-23-comment-documents.md index cb716a4..3b728b5 100644 --- a/docs/superpowers/plans/2026-03-23-comment-documents.md +++ b/docs/superpowers/plans/2026-03-23-comment-documents.md @@ -574,7 +574,7 @@ git commit -m "test(comments) : add tests for comment creation with file attachm ### Task 6: Frontend — update useComments composable **Files:** -- Modify: `Inventory_frontend/app/composables/useComments.ts` +- Modify: `frontend/app/composables/useComments.ts` - [ ] **Step 1: Add document type to Comment interface** @@ -661,12 +661,12 @@ const createComment = async ( - [ ] **Step 3: Run lint + typecheck** -Run: `cd Inventory_frontend && npm run lint:fix && npx nuxi typecheck` +Run: `cd frontend && npm run lint:fix && npx nuxi typecheck` - [ ] **Step 4: Commit (in frontend submodule)** ```bash -cd Inventory_frontend +cd frontend git add app/composables/useComments.ts git commit -m "feat(comments) : support file attachments in createComment" ``` @@ -676,7 +676,7 @@ git commit -m "feat(comments) : support file attachments in createComment" ### Task 7: Frontend — update CommentSection.vue **Files:** -- Modify: `Inventory_frontend/app/components/CommentSection.vue` +- Modify: `frontend/app/components/CommentSection.vue` - [ ] **Step 1: Add file input and file list display to the template** @@ -810,12 +810,12 @@ const handleSubmit = async () => { - [ ] **Step 3: Run lint + typecheck** -Run: `cd Inventory_frontend && npm run lint:fix && npx nuxi typecheck` +Run: `cd frontend && npm run lint:fix && npx nuxi typecheck` - [ ] **Step 4: Commit (in frontend submodule)** ```bash -cd Inventory_frontend +cd frontend git add app/components/CommentSection.vue git commit -m "feat(comments) : add file attachment UI to CommentSection" ``` @@ -848,7 +848,7 @@ git commit -m "feat(documents) : add comment ExistsFilter" - [ ] **Step 4: Update submodule pointer** ```bash -git add Inventory_frontend +git add frontend git commit -m "chore(submodule) : update frontend pointer (comment documents feature)" ``` diff --git a/docs/superpowers/plans/2026-03-23-document-types.md b/docs/superpowers/plans/2026-03-23-document-types.md index d5e9b13..0ede2e2 100644 --- a/docs/superpowers/plans/2026-03-23-document-types.md +++ b/docs/superpowers/plans/2026-03-23-document-types.md @@ -22,15 +22,15 @@ - `src/Controller/DocumentQueryController.php` — add `type` to `normalizeDocuments()` ### Frontend (create) -- `Inventory_frontend/app/shared/documentTypes.ts` — type constants + labels -- `Inventory_frontend/app/components/DocumentEditModal.vue` — mini-modal for editing name+type +- `frontend/app/shared/documentTypes.ts` — type constants + labels +- `frontend/app/components/DocumentEditModal.vue` — mini-modal for editing name+type ### Frontend (modify) -- `Inventory_frontend/app/composables/useDocuments.ts` — add `type` to interface + `updateDocument()` method -- `Inventory_frontend/app/components/DocumentUpload.vue` — add type select -- `Inventory_frontend/app/components/common/DocumentListInline.vue` — add type badge + edit button -- `Inventory_frontend/app/composables/useEntityDocuments.ts` — add `updateDocument` delegation -- `Inventory_frontend/app/pages/documents.vue` — add type column + edit button +- `frontend/app/composables/useDocuments.ts` — add `type` to interface + `updateDocument()` method +- `frontend/app/components/DocumentUpload.vue` — add type select +- `frontend/app/components/common/DocumentListInline.vue` — add type badge + edit button +- `frontend/app/composables/useEntityDocuments.ts` — add `updateDocument` delegation +- `frontend/app/pages/documents.vue` — add type column + edit button --- @@ -266,13 +266,13 @@ git commit -m "feat(documents) : accept type on upload + expose in query control ### Task 4: Frontend — Type Constants + Document Interface **Files:** -- Create: `Inventory_frontend/app/shared/documentTypes.ts` -- Modify: `Inventory_frontend/app/composables/useDocuments.ts:6-27` (Document interface), `useDocuments.ts:205-253` (upload) +- Create: `frontend/app/shared/documentTypes.ts` +- Modify: `frontend/app/composables/useDocuments.ts:6-27` (Document interface), `useDocuments.ts:205-253` (upload) - [ ] **Step 1: Create documentTypes.ts** ```typescript -// Inventory_frontend/app/shared/documentTypes.ts +// frontend/app/shared/documentTypes.ts export const DOCUMENT_TYPES = [ { value: 'documentation', label: 'Documentation' }, { value: 'devis', label: 'Devis' }, @@ -355,12 +355,12 @@ Add `updateDocument` to the return object. - [ ] **Step 5: Run lint** -Run: `cd Inventory_frontend && npm run lint:fix` +Run: `cd frontend && npm run lint:fix` - [ ] **Step 6: Commit frontend** ```bash -cd Inventory_frontend +cd frontend git add app/shared/documentTypes.ts app/composables/useDocuments.ts git commit -m "feat(documents) : add document type constants and updateDocument method" ``` @@ -370,7 +370,7 @@ git commit -m "feat(documents) : add document type constants and updateDocument ### Task 5: Frontend — DocumentUpload Type Select **Files:** -- Modify: `Inventory_frontend/app/components/DocumentUpload.vue` +- Modify: `frontend/app/components/DocumentUpload.vue` - [ ] **Step 1: Add type prop and select to DocumentUpload** @@ -419,12 +419,12 @@ Note: since DocumentUpload uses `