260322:1648 Correct Coresspondence / Doing RFA / Correct CI
CI Pipeline / build (push) Failing after 12m41s
Build and Deploy / deploy (push) Failing after 2m44s

This commit is contained in:
admin
2026-03-22 16:48:12 +07:00
parent e5deedb42e
commit 11984bfa29
683 changed files with 105251 additions and 29068 deletions
@@ -6,6 +6,7 @@
---
## Objective
Refactor Drawing module (backend & frontend) to align with `lcbp3-v1.7.0-schema.sql`, specifically for AS Built Drawings.
---
@@ -15,12 +16,14 @@ Refactor Drawing module (backend & frontend) to align with `lcbp3-v1.7.0-schema.
### Backend
#### Entities Updated
| File | Changes |
| ------------------------------------ | --------------------------------------------------- |
| `asbuilt-drawing.entity.ts` | Added `mainCategoryId`, `subCategoryId` + relations |
| `asbuilt-drawing-revision.entity.ts` | Added `legacyDrawingNumber` |
#### New Files Created
| File | Description |
| -------------------------------------------- | ----------------------------------- |
| `dto/create-asbuilt-drawing.dto.ts` | Create AS Built with first revision |
@@ -30,9 +33,11 @@ Refactor Drawing module (backend & frontend) to align with `lcbp3-v1.7.0-schema.
| `asbuilt-drawing.controller.ts` | REST controller |
#### Module Updated
- `drawing.module.ts` - Registered new entities, service, controller
#### New API Endpoints
| Method | Path | Description |
| ------ | --------------------------------- | ------------ |
| POST | `/drawings/asbuilt` | Create |
@@ -46,12 +51,14 @@ Refactor Drawing module (backend & frontend) to align with `lcbp3-v1.7.0-schema.
### Frontend
#### Types Updated
| File | Changes |
| ------------------------------------------ | ------------------------------------------------------------------- |
| `types/drawing.ts` | `AsBuiltDrawing` interface: added `mainCategoryId`, `subCategoryId` |
| `types/dto/drawing/asbuilt-drawing.dto.ts` | Added category IDs |
#### Components Updated
| File | Changes |
| ------------------------------------- | ------------------------------------------------------- |
| `components/drawings/upload-form.tsx` | AS_BUILT form: added category selectors, title required |
@@ -59,6 +66,7 @@ Refactor Drawing module (backend & frontend) to align with `lcbp3-v1.7.0-schema.
| `app/(dashboard)/drawings/page.tsx` | Added project selector dropdown |
#### Hooks Updated
| File | Changes |
| ---------------------- | -------------------------------- |
| `hooks/use-drawing.ts` | Fixed toast message for AS_BUILT |
@@ -67,14 +75,15 @@ Refactor Drawing module (backend & frontend) to align with `lcbp3-v1.7.0-schema.
## Verification Results
| Component | Command | Result |
| --------- | ------------ | --------- |
| Component | Command | Result |
| --------- | ------------ | ---------- |
| Backend | `pnpm build` | ✅ Success |
| Frontend | `pnpm build` | ✅ Success |
---
## Notes
- AS Built Drawings use same category structure as Shop Drawings (`shop_drawing_main_categories`, `shop_drawing_sub_categories`)
- No existing data in `asbuilt_drawings` table, no migration needed
- Pre-existing lint warnings (`any` types) in `upload-form.tsx` not addressed in this session