This commit is contained in:
2026-07-16 09:53:14 +07:00
parent 0fc112a2e8
commit 29cec708a3
1236 changed files with 212848 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
Investigate the "ประเภทการอบรม" dropdown validation.
Current issue:
The form displays:
"Invalid input: expected string, received undefined"
instead of a friendly Thai validation message.
Tasks:
1. Review the React Hook Form configuration.
2. Review the Zod schema.
3. Review the Select component.
4. Ensure the field is correctly registered.
5. Ensure the Select binds:
- value
- onValueChange
6. Ensure defaultValues contains a valid default or empty string.
7. Replace raw Zod error messages with Thai validation messages.
Training Type options should be:
- INTERNAL
Label: อบรมภายใน (Internal Training)
- EXTERNAL
Label: อบรมภายนอก (Public Training)
- ONLINE
Label: e-Learning / Online Course
- OJT
Label: On the Job Training (OJT)
Validation message:
กรุณาเลือกประเภทการอบรม
Verify:
- Create mode
- Edit mode
- Reset form
- Validation after submit
Return:
- Root cause
- Files changed
- Fixed code
- Regression checklist