Files
lcbp3/specs/06-tasks/TASK-FE-019-v170-refactor.md
admin 7db6a003db
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled
251223:1649 On going update to 1.7.0: Refoctory drawing Module & document number Module
2025-12-23 16:49:16 +07:00

2.2 KiB

title, status, owner, created_at, related
title status owner created_at related
Task: Frontend Refactoring for Schema v1.7.0 IN_PROGRESS Frontend Team 2025-12-23
specs/06-tasks/TASK-BE-018-v170-refactor.md
specs/07-database/data-dictionary-v1.7.0.md

Objective

Update frontend application to align with the refactored backend (v1.7.0 schema). This includes supporting new field mappings, new As Built drawing type, and updated document numbering logic.

Scope of Work

1. Type Definitions & API Client

  • Types: Update Drawing, ContractDrawing, ShopDrawing interfaces to match new backend entities (e.g. mapCatId, projectId in categories).
  • API: Update drawing.service.ts to support new filter parameters (mapCatId) and new endpoints for As Built drawings.

2. Drawing Upload Form (DrawingUploadForm)

  • General: Refactor to support dynamic fields based on Drawing Type.
  • Contract Drawings:
    • Replace subCategoryId with mapCatId (fetch from contract-drawing-categories?).
    • Add volumePage input.
  • Shop Drawings:
    • Remove sheetNumber (if not applicable) or map to legacyDrawingNumber.
    • Add legacyDrawingNumber input.
    • Handle title input (sent as revision title).
    • Use Project-specific categories.
  • As Built Drawings (New):
    • Add "AS_BUILT" option.
    • Implement form fields similar to Shop Drawings (or Contract depending on spec).

3. Drawing List & Views (DrawingList)

  • Contract Drawings: Show volumePage.
  • Shop Drawings:
    • Display legacyDrawingNumber.
    • Display Title from Current Revision.
    • Remove direct title column from sort/filter if backend doesn't support it anymore on master.
  • As Built Drawings:
    • Add new Tab/Page for As Built.
    • Implement List View.

4. Logic & Hooks

  • Update useDrawings, useCreateDrawing hooks to handle new types.
  • Ensure validation schemas (zod) match backend constraints.

Definition of Done

  • Contract Drawing Upload works with mapCatId and volumePage
  • Shop Drawing Upload works with legacyDrawingNumber and Revision Title
  • As Built Drawing Upload and List implemented
  • Drawing List displays correct columns for all types
  • No TypeScript errors