Skip to main content

Service Report #016 Done

Date: 2026-02-17


Enhancement — JSA Co-Review Improvements

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

#FeaturePR/IssueTypeStatus
1JSA Co-Review: Approve buttons on document list view#429Enhancement Done
2JSA Review Comments for WO/SO#430Enhancement 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

ChangeDescription
Approve buttons on list view"อนุมัติ JSA" and "ส่งกลับแก้ไข" visible on document list for WO/SO
Buttons hidden on form viewDuring Co-Review, approve buttons only appear on the list view, not inside individual documents
Improved validation messageValidation dialog now shows each JSA name with approval status (e.g., ✅ Ladder Work, ❌ Elevated Platform)
Configurable via workflow definitionThe ListViewOnly option is set in the backend workflow definition — no code change needed to adjust behavior

Behavior

ViewCo-Review (WO/SO)Preparation (Contractor)
Document list"อนุมัติ JSA" + "ส่งกลับแก้ไข" visible"ส่ง JSA" + "ยกเลิก" visible
Document formButtons hidden"ส่ง JSA" + "ยกเลิก" visible
note

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 CaseStatus
1Login as WO → Open JSA in Co-Review → Document list shows "อนุมัติ JSA" and "ส่งกลับแก้ไข" Done
2Login as WO → Open a JSA document → Buttons are hidden Done
3Login as SO → Same behavior as WO Done
4Click "อนุมัติ JSA" without approving all docs → Dialog shows each JSA name with ✅/❌ status Done
5Approve all JSA docs individually → "อนุมัติ JSA" executes successfully Done
6Login 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

RoleView CommentsAdd/Edit/Delete
Work OwnerYesYes (when task is active)
Safety OfficerYesYes (when task is active)
ContractorYesNo (read-only)
Any role (task completed)YesNo (read-only)

What to Test

#Test CaseStatus
1Login as WO → Open JSA in Co-Review → Scroll to bottom → See review comments section with amber header Done
2Add a review comment → Comment appears with name and timestamp → Saves immediately Done
3Edit own comment → Click pencil icon → Modify text → Save → Shows "(แก้ไขแล้ว)" Done
4Delete own comment → Click delete icon → Comment removed Done
5Login as SO → Same add/edit/delete behavior as WO Done
6Login as Contractor → Open JSA in Preparation → See WO/SO comments read-only, no textarea or add button Done
7Task completed → Open JSA → Review comments visible but no add/edit/delete for any role Done

Summary

#IssueStatus
1#429 — JSA Co-Review approve buttons Done
2#430 — JSA Review Comments for WO/SO Done

Version: Preview35