Feature #26191
[OEE] Availability : Availability Timeline ปรับการแสดงผล status #kiro
Start date:
03/24/2026
Due date:
% Done:
100%
Estimated time:
Description
ปรับการแสดงผล Availability Timeline โดยเปลี่ยนการอ้างอิง status จากเดิม มาใช้ข้อมูลจาก code table (ms_code_table) แทน
- กราฟใช้ค่า api field: reason_status (เหมือนเดิม) โดย map กับ ms_code_table.value (ที่ ms_code_table."type" = 'availability_status')
- สีของแต่ละ status ให้ดึง color จาก ms_code_table.value_2 (สามารถปรับสีได้เหมือนกับ Gauge Chart)
- แสดงแต่ละ status ให้ดึง ms_code_table."label"
- Timeline แสดง status ตาม code table
- สีของแต่ละ segment ต้องตรงกับค่าที่ config ใน code table
- หากมีการเปลี่ยน config ใน code table → UI ต้องเปลี่ยนตามทันที (dynamic)
ปล. ปรับ filter status ของ filter Order & Color list ตามด้วย
Files
History
Updated by Supparoek Sariphan 10 days ago
- Status changed from New to In Progress
- % Done changed from 0 to 100
Implemented dynamic availability status from ms_code_table:
- AvailabilityDashboard.js: Timeline series, colors, CSV export, and ReasonList now built dynamically from code table (type='availability_status')
- ReportAvailability.js: Same dynamic timeline/CSV logic
- MGTTimelineDynamic.js: Accepts dynamic colors prop, tooltip uses inline color from series
- ReasonFilter.js: Status filter dropdown populated from code table
- ReasonCard.js: Uses color from data instead of hardcoded switch
- Fallback to original hardcoded values when code table entries are not available
Updated by Supparoek Sariphan 10 days ago
- Status changed from In Progress to Resolved
- Assignee changed from Supparoek Sariphan to Suphawan Phiwngam
Updated by Supparoek Sariphan 10 days ago
- Subject changed from [OEE] Availability : Availability Timeline ปรับการแสดงผล status to [OEE] Availability : Availability Timeline ปรับการแสดงผล status #kiro