Project

General

Profile

Feature #26191

[OEE] Availability : Availability Timeline ปรับการแสดงผล status #kiro

Added by Suphawan Phiwngam 23 days ago. Updated 8 days ago.

Status:
Closed
Priority:
Normal
Start date:
03/24/2026
Due date:
% Done:

100%

Estimated time:

Description

ปรับการแสดงผล Availability Timeline โดยเปลี่ยนการอ้างอิง status จากเดิม มาใช้ข้อมูลจาก code table (ms_code_table) แทน
  1. กราฟใช้ค่า api field: reason_status (เหมือนเดิม) โดย map กับ ms_code_table.value (ที่ ms_code_table."type" = 'availability_status')
  2. สีของแต่ละ status ให้ดึง color จาก ms_code_table.value_2 (สามารถปรับสีได้เหมือนกับ Gauge Chart)
  3. แสดงแต่ละ status ให้ดึง ms_code_table."label"
Result ที่ต้องได้
  • Timeline แสดง status ตาม code table
  • สีของแต่ละ segment ต้องตรงกับค่าที่ config ใน code table
  • หากมีการเปลี่ยน config ใน code table → UI ต้องเปลี่ยนตามทันที (dynamic)

ปล. ปรับ filter status ของ filter Order & Color list ตามด้วย


Files

History

#1

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

#2

Updated by Supparoek Sariphan 10 days ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Supparoek Sariphan to Suphawan Phiwngam
#3

Updated by Supparoek Sariphan 10 days ago

#kiro 10min

#4

Updated by Supparoek Sariphan 10 days ago

  • Subject changed from [OEE] Availability : Availability Timeline ปรับการแสดงผล status to [OEE] Availability : Availability Timeline ปรับการแสดงผล status #kiro
#5

Updated by Suphawan Phiwngam 8 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF