Service Report #015 Done
Date: 2026-02-16
This report covers feature enhancements requested in the Minutes of Meeting on 2026-02-16.
Feature Overview
| # | Feature | PR/Issue | Type | Status |
|---|---|---|---|---|
| 1 | Contractor: Add last action timestamp to task list | #417 | Enhancement | ✅ Done |
| 2 | WO: Always notify contractor on tool list approval | #418 | Enhancement | ✅ Done |
| 3 | WO: Always notify contractor on project approval | #420 | Enhancement | ✅ Done |
| 4 | Task status color coding | #419 | Enhancement | ✅ Done |
| 5 | Sort tasks by time (newest first) | #421 | Enhancement | ✅ Done |
1. Contractor: Add last action timestamp to task list
Issue: #417 Thai Name: ผู้รับเหมา: เพิ่มรายละเอียดเวลาที่ดำเนินการล่าสุดในรายการ Tasks
MoM Quote:
ผู้รับเหมา: เพิ่มรายละเอียด Tasks ในส่วนผู้รับเหมา ไม่มีรายละเอียดเวลาที่ดำเนินการล่าสุดนี้ ให้เหมือน User อื่นๆเช่น เจ้าของงาน
Description: The contractor's task list was missing timestamp details. Now all task cards show both relative time and actual Thai Buddhist date/time.
Location: Tasks > งานของฉัน (My Tasks)
Changes
| Change | Description |
|---|---|
| Relative time | Displayed on the right side of the second line (e.g., "15 นาทีที่แล้ว") |
| Actual timestamp | Displayed on the right side of the third line in Thai Buddhist format (e.g., "16 กุมภาพันธ์ 2569 19:27") |
| Fallback for new tasks | Tasks without action history now show their creation timestamp |
| Context menu removed | Redundant three-dot menu removed (Review = card click, Cancel = inside Task Review) |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Login as Contractor — task cards show relative time (right of line 2) | ⌛ Pending |
| 2 | Login as Contractor — task cards show actual Thai date/time (right of line 3) | ⌛ Pending |
| 3 | Login as Work Owner — same timestamp display as Contractor | ⌛ Pending |
| 4 | Login as Safety Officer — same timestamp display | ⌛ Pending |
| 5 | Newly created task (no action history) — still shows timestamp | ⌛ Pending |
| 6 | Three-dot context menu is removed from all task cards | ⌛ Pending |
| 7 | Clicking the task card still navigates to review page | ⌛ Pending |
2. WO: Always notify contractor on tool list approval
Issue: #418 Thai Name: เจ้าของงาน: อนุมัติเเล้วควรเเจ้งเตือนไปที่ผู้รับเหมาทุกครั้ง ตัด Check box ออก
MoM Quote:
เจ้าของงาน: อนุมัติเเล้วควรเเจ้งเตือนไปที่ผู้รับเหมาทุกครั้ง ตัด Check box "เเจ้งเตือนผู้รับเหมาเมื่ออนุมัติรายการเครื่องมือ" ออก
Description: Contractor email notifications are now mandatory for all approval and cancellation actions across all workflows. The checkbox is replaced by a disabled sub-checkbox that follows the main "Email Notification" toggle.
Location: Tasks > Task Review > Command Dialog (Approve/Cancel)
Behavior
| Action | Before | After |
|---|---|---|
| Approve with email ON | Optional checkbox to notify contractor | Contractor notification follows automatically (shown as disabled sub-checkbox) |
| Approve with email OFF | Contractor not notified | Contractor not notified (main toggle off = all off) |
| Cancel with email ON | No contractor notification | Contractor notification follows automatically |
| Self-cancel (Contractor) | N/A | Sub-checkbox hidden (no self-notification) |
Workflows Covered
| Workflow | Approve | Cancel |
|---|---|---|
| Project Registration | Mandatory notify | Mandatory notify |
| Tool List Preparation | Mandatory notify | Mandatory notify |
| JSA Preparation | Mandatory notify | Mandatory notify |
| Work Permit Request | Mandatory notify | Mandatory notify |
| Training Enrollment | Mandatory notify (approve + reject) | Mandatory notify |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | WO approves Tool List — disabled sub-checkbox shown below main toggle | ⌛ Pending |
| 2 | WO cancels Tool List — disabled sub-checkbox shown | ⌛ Pending |
| 3 | Contractor cancels own task — sub-checkbox NOT shown (self-notification hidden) | ⌛ Pending |
| 4 | SO approves JSA — disabled sub-checkbox shown | ⌛ Pending |
| 5 | WO approves Project Registration — disabled sub-checkbox shown | ⌛ Pending |
| 6 | Main email toggle OFF — sub-checkbox also disabled/unchecked | ⌛ Pending |
3. WO: Always notify contractor on project approval
Issue: #420 Thai Name: เจ้าของงาน: ตัด Check box เเจ้งเตือนผู้รับเหมาเมื่ออนุมัติโครงการ
MoM Quote:
เจ้าของงาน: ตัด Check box เเจ้งเตือนผู้รับเหมาเมื่ออนุมัติโครงการ ตามหลักควรจะมีการเเจ้งเตือนไปที่ผู้รับเหมาตลอด
Description: Same as item 2 above — this is the Project Registration workflow specifically. Contractor is always notified on project approval and cancellation.
Location: Tasks > Task Review > Command Dialog (Approve/Cancel for Project Registration)
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | WO approves Project Registration — disabled sub-checkbox "แจ้งเตือนผู้รับเหมาเมื่ออนุมัติโครงการ" shown | ⌛ Pending |
| 2 | WO cancels Project Registration — disabled sub-checkbox "แจ้งเตือนผู้รับเหมาเมื่อยกเลิกโครงการ" shown | ⌛ Pending |
| 3 | Login, create PR, logout, login again — lands on My Tasks (not redirected to old task) | ⌛ Pending |
| 4 | Clear all tasks → create PR → approve → create JSA — only the approved project shows in list | ⌛ Pending |
4. Task status color coding
Issue: #419 Thai Name: ทุก User: สีสเตตัสของ Tasks — งานใหม่: สีแดง, งานที่ดำเนินการอยู่: สีส้ม, งานที่เสร็จสิ้น: สีเทา
MoM Quote:
ทุก User ในส่วนสีสเตตัส ถ้าเป็น อ้างอิงจากส่วนใบงาน Github #283 — งานใหม่: สีแดง, งานที่ดำเนินการอยู่: สีส้ม, งานที่เสร็จสิ้นเเล้ว: สีเทา
Description: Task cards in My Tasks now show color-coded status. Colors are defined per workflow state in the backend, not hardcoded in the frontend.
Location: Tasks > งานของฉัน (My Tasks)
Color Mapping
| Status | Dot Color | Badge Color | States |
|---|---|---|---|
| New | Red | Red background | Fill in project info, Prepare JSA, Prepare Tool List, etc. |
| In Progress | Orange | Orange background | WO Review, SO Review, Co-Review, etc. |
| Completed | Gray | Gray background | Approved, Rejected, Cancelled |
Workflows Covered
| Workflow | New States | In Progress States | Completed States |
|---|---|---|---|
| Project Registration | Fill In Project Info, Fill In Purchasing Info, Acknowledge Work Procedures | Review Purchasing Info, Review Work Procedures | Approved, Canceled |
| Tool List Preparation | Prepare Tool List | Work Owner Review | Approved, Rejected, Cancelled |
| JSA Preparation | Prepare JSA | Co-Review | Approved, Rejected, Cancelled |
| Work Permit Request | Fill In Permit Request | SO Review | Approved, Rejected, Cancelled |
| Training Enrollment | Fill In Training List | SO Review | Approved, Rejected, Cancelled |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Create new PR task — dot and badge show RED | ⌛ Pending |
| 2 | Advance task to review state — dot and badge show ORANGE | ⌛ Pending |
| 3 | Approve task — dot and badge show GRAY | ⌛ Pending |
| 4 | Cancel task — dot and badge show GRAY | ⌛ Pending |
| 5 | Login as any role — all task cards show correct colors | ⌛ Pending |
| 6 | Existing tasks (before update) — show gray (default fallback) | ⌛ Pending |
5. Sort tasks by time (newest first)
Issue: #421 Thai Name: ทุก User: Tasks ควรเรียกตามลำดับเวลา โครงการใบงานที่ใหม่กว่าควรอยู่บน
MoM Quote:
ทุก User: Tasks ควรเรียกตามลำดับเวลา โครงการใบงานที่ใหม่กว่าควรอยู่บน
Description: All task lists in My Tasks are now sorted by most recent activity (newest first). Tasks that were recently acted upon appear at the top.
Location: Tasks > งานของฉัน (My Tasks) — all tabs
Behavior
| Tab | Sort Order |
|---|---|
| ต้องดำเนินการ (Action Required) | Most recently updated first |
| รอผู้อื่นดำเนินการ (Waiting) | Most recently updated first |
| งานที่เสร็จสิ้นแล้ว (Completed) | Most recently completed first |
| งานที่ถูกปฏิเสธ (Rejected) | Most recently rejected first |
| งานที่ถูกยกเลิก (Cancelled) | Most recently cancelled first |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Login as any role — tasks sorted newest first in "Action Required" tab | ⌛ Pending |
| 2 | Take an action on a task — task moves to top of list | ⌛ Pending |
| 3 | Login as Contractor — same sorting behavior | ⌛ Pending |
| 4 | Check "Completed" tab — most recently completed tasks on top | ⌛ Pending |
| 5 | Check "Cancelled" tab — most recently cancelled tasks on top | ⌛ Pending |