260320:1131 Refactor Overrall #01
Build and Deploy / deploy (push) Has been cancelled

This commit is contained in:
admin
2026-03-20 11:31:27 +07:00
parent f1b81a7d0d
commit 1d3479770b
147 changed files with 1745 additions and 1567 deletions
@@ -397,10 +397,10 @@ Unified Workflow Engine (Core Architecture)
- **สถานะ:** Shared Service สำหรับจัดการ details fields
- **หน้าที่:** Centralized service สำหรับ JSON details operations
- **Methods:**
- validateDetails(type: string, data: any): ValidationResult
- transformDetails(input: any, targetVersion: string): any
- sanitizeDetails(data: any): any
- getDefaultDetails(type: string): any
- validateDetails(type: string, data: Record<string, unknown>): ValidationResult
- transformDetails(input: Record<string, unknown>, targetVersion: string): Record<string, unknown>
- sanitizeDetails(data: Record<string, unknown>): Record<string, unknown>
- getDefaultDetails(type: string): Record<string, unknown>
### **3.10 สถาปัตยกรรมระบบ (System Architecture)**
@@ -579,7 +579,7 @@ Backend (NestJS) ควรเป็น **Stateless** (ไม่เก็บส
```typescript
// hooks/useAutoSaveForm.ts
export const useAutoSaveForm = (formKey: string, defaultValues: any) => {
export const useAutoSaveForm = <T extends Record<string, unknown>>(formKey: string, defaultValues: T) => {
const { register, watch, setValue } = useForm({ defaultValues });
// Auto-save เมื่อ form เปลี่ยนแปลง