commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# Prompt: Fix Employee Create Form Organization Reference
|
||||
|
||||
## Objective
|
||||
|
||||
ปรับปรุง Module User / Employee Directory หน้า “สร้างรายชื่อพนักงาน” ให้พนักงานใหม่ถูกสร้างภายใต้ Organizer / บริษัท ที่ถูกต้อง
|
||||
|
||||
ปัจจุบันฟอร์มมีช่อง “บริษัท” เป็น input text ธรรมดา ซึ่งเสี่ยงต่อข้อมูลไม่ตรงกับ Organizer จริงในระบบ
|
||||
|
||||
ต้องแก้ให้ระบบใช้ Organizer จริงแทนการกรอกข้อความเอง
|
||||
|
||||
---
|
||||
|
||||
## Requirement
|
||||
|
||||
### 1. Organization / Company Field
|
||||
|
||||
ปรับช่อง “บริษัท” ให้เป็นหนึ่งในแนวทางต่อไปนี้ตาม context ของระบบจริง
|
||||
|
||||
#### Case A: ผู้ใช้กำลังอยู่ใน Organizer Context แล้ว
|
||||
|
||||
ถ้ามี current organizer อยู่แล้ว เช่น จาก org switcher / session / route context
|
||||
|
||||
ให้ระบบอ้างอิง Organizer ปัจจุบันอัตโนมัติ
|
||||
|
||||
- ไม่ต้องให้ผู้ใช้พิมพ์ชื่อบริษัทเอง
|
||||
- แสดงชื่อบริษัทแบบ read-only
|
||||
- ส่ง `organizerId` หรือ `organizationId` ไปกับ payload
|
||||
- ห้ามส่ง company เป็น text ธรรมดา
|
||||
|
||||
ตัวอย่าง UI:
|
||||
|
||||
```txt
|
||||
บริษัท
|
||||
O Company Site
|
||||
```
|
||||
Reference in New Issue
Block a user