Service Report #016 Done
Date: 2026-02-17
This report covers 2 enhancements requested by testers via GitHub Issues. These include approve buttons on the document list view and inline reviewer comments for Work Owner / Safety Officer.
Feature Overview
| # | Feature | PR/Issue | Type | Status |
|---|---|---|---|---|
| 1 | JSA Co-Review: Approve buttons on document list view | #429 | Enhancement | ✅ Done |
| 2 | JSA Review Comments for WO/SO | #430 | Enhancement | ✅ Done |
1. JSA Co-Review: Approve buttons on document list view
Issue: #429 Thai Name: เจ้าของงาน/จป: ปุ่ม "อนุมัติ JSA" เเละ "ส่งกลับแก้ไข" ควรอยู่ที่หน้าแรกเมื่อกดในใบงาน จัดเตรียม JSA
Description: During the Co-Review state (ตรวจสอบร่วม), Work Owner and Safety Officer now see "อนุมัติ JSA" and "ส่งกลับแก้ไข" buttons on the document list view. The buttons are hidden when opening an individual JSA document form. The validation message when clicking Approve now shows each JSA document name with its approval status instead of just a count.
Location: Tasks > จัดเตรียม JSA > สถานะตรวจสอบร่วม
Changes
| Change | Description |
|---|---|
| Approve buttons on list view | "อนุมัติ JSA" and "ส่งกลับแก้ไข" visible on document list for WO/SO |
| Buttons hidden on form view | During Co-Review, approve buttons only appear on the list view, not inside individual documents |
| Improved validation message | Validation dialog now shows each JSA name with approval status (e.g., ✅ Ladder Work, ❌ Elevated Platform) |
| Configurable via workflow definition | The ListViewOnly option is set in the backend workflow definition — no code change needed to adjust behavior |
Behavior
| View | Co-Review (WO/SO) | Preparation (Contractor) |
|---|---|---|
| Document list | "อนุมัติ JSA" + "ส่งกลับแก้ไข" visible | "ส่ง JSA" + "ยกเลิก" visible |
| Document form | Buttons hidden | "ส่ง JSA" + "ยกเลิก" visible |
The preparation state (Contractor) shows commands on both views. This behavior is configurable in the workflow definition if testers prefer list-only for the preparation state as well.
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Login as WO → Open JSA in Co-Review → Document list shows "อนุมัติ JSA" and "ส่งกลับแก้ไข" | ✅ Done |
| 2 | Login as WO → Open a JSA document → Buttons are hidden | ✅ Done |
| 3 | Login as SO → Same behavior as WO | ✅ Done |
| 4 | Click "อนุมัติ JSA" without approving all docs → Dialog shows each JSA name with ✅/❌ status | ✅ Done |
| 5 | Approve all JSA docs individually → "อนุมัติ JSA" executes successfully | ✅ Done |
| 6 | Login as Contractor in preparation → "ส่ง JSA" visible on both list and form view | ✅ Done |
2. JSA Review Comments for WO/SO
Issue: #430 Thai Name: เจ้าของงาน / จป : JSA ให้เพิ่มพื้นที่คอมเม้นด้านล่าง คล้ายระบบ Note
Description: Inline review comment area at the bottom of each JSA document form. Work Owner and Safety Officer can add, edit, and delete review comments during Co-Review. When JSA is sent back to Contractor via "Request Change", the Contractor sees those comments but cannot add or edit them.
Location: Tasks > จัดเตรียม JSA > เปิดเอกสาร JSA > ด้านล่างของฟอร์ม
Behavior
| Role | View Comments | Add/Edit/Delete |
|---|---|---|
| Work Owner | Yes | Yes (when task is active) |
| Safety Officer | Yes | Yes (when task is active) |
| Contractor | Yes | No (read-only) |
| Any role (task completed) | Yes | No (read-only) |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Login as WO → Open JSA in Co-Review → Scroll to bottom → See review comments section with amber header | ✅ Done |
| 2 | Add a review comment → Comment appears with name and timestamp → Saves immediately | ✅ Done |
| 3 | Edit own comment → Click pencil icon → Modify text → Save → Shows "(แก้ไขแล้ว)" | ✅ Done |
| 4 | Delete own comment → Click delete icon → Comment removed | ✅ Done |
| 5 | Login as SO → Same add/edit/delete behavior as WO | ✅ Done |
| 6 | Login as Contractor → Open JSA in Preparation → See WO/SO comments read-only, no textarea or add button | ✅ Done |
| 7 | Task completed → Open JSA → Review comments visible but no add/edit/delete for any role | ✅ Done |
Summary
| # | Issue | Status |
|---|---|---|
| 1 | #429 — JSA Co-Review approve buttons | ✅ Done |
| 2 | #430 — JSA Review Comments for WO/SO | ✅ Done |
Version: Preview35