Report #022
Date: 2026-03-02
Source: MoM 2026-02-27 (#501) — Work Permit Items
Version: Preview40
PR: #516
Work Permit items from MoM 2026-02-27. Includes code fixes (#505, #507, #510), verification (#503), and a layout comparison report for discussion.
Feature Overview
| # | Issue | Thai Name | Status |
|---|---|---|---|
| 1 | #510 | PTW ที่อนุมัติแล้ว ยกเลิกไม่ได้ | 🔍 In Review |
| 2 | #505 | ตัดส่วนผู้ตรวจสอบออกจาก Part 2 | 🔍 In Review |
| 3 | #503 | popup รายชื่อคนผ่านอบรม | 🔍 In Review |
| 4 | #507 | ตรวจสอบข้อมูลก่อนส่งขอขยาย/ปิดงาน | 🔍 In Review |
1. Disable Cancel on Approved Permits
Issue: #510 Thai Name: PTW ที่อนุมัติแล้ว ผู้รับเหมาจะไม่สามารถกด ยกเลิก ได้
MoM Quote: ผู้รับเหมา: PWT ที่อนุมัติเเล้ว ผู้รับเหมาจะไม่สามารถกด ยกเลิก ได้
Description: Removed the cancel button from the Work In Progress state. Contractors can only cancel a permit before it is submitted for review (during the Fill In stage).
Location: Work Permit task > Work In Progress state
Behavior
| State | Cancel Button |
|---|---|
| Fill In Permit Request | Visible |
| Work In Progress (after approval) | Hidden |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Create WP → Fill in → verify Cancel is available | ⌛ Pending |
| 2 | Advance WP to Work In Progress → verify Cancel is gone | ⌛ Pending |
2. Remove Inspector from Part 2 Checklist
Issue: #505 Thai Name: ใบขออนุญาต PTW Part2: ตัดส่วนผู้ตรวจสอบ วันที่ตรวจสอบออก
MoM Quote: ผู้รับเหมา:ใบขออนุญาต PWT Part2: Client (Check) ตัดส่วนผู้ตรวจสอบ วันที่ตรวจสอบออก
Description: Removed the reviewer name and review date fields from the Part 2 Client Check section. The checklist now only contains the preparation checklist items with pass/fail and remarks.
Location: Work Permit form > Part 2: Client (Check)
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Open WP form → Part 2 → verify reviewer name field is gone | ⌛ Pending |
| 2 | Open WP form → Part 2 → verify review date field is gone | ⌛ Pending |
| 3 | Checklist items still work (pass/fail + remarks) | ⌛ Pending |
3. Trained Workers Popup (Verified)
Issue: #503 Thai Name: กดเพิ่มรายชื่อขึ้น popup รายชื่อคนที่ผ่านการอบรมแล้ว
MoM Quote: ผู้รับเหมา: PTW กดเพิ่มรายชื่อขึ้น pop-up รายชื่อคนที่ผ่านการอบรมเเล้วในบริษัท
Description: Verified that this feature already works correctly. When adding workers to a permit, the popup shows only workers who have passed training. Non-passed and blacklisted workers are disabled in the selection list.
Location: Work Permit form > Part 1 > Worker table > Add Worker button
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Open WP → Part 1 → Add Worker → verify only trained workers are selectable | ⌛ Pending |
| 2 | Verify non-passed workers appear grayed out / disabled | ⌛ Pending |
4. Validate Extension & Closure Data
Issue: #507 Thai Name: ตรวจสอบข้อมูลก่อนส่งขอขยายเวลา / ปิดงาน
MoM Quote:
- กรณีขอขยายเวลา ต้องกรอกข้อมูลส่วนขยายเวลาให้ครบถ้วนก่อนส่งได้
- กรณีขอปิด work ต้องกรอกข้อมูลส่วนปิด work ให้ครบถ้วนก่อนส่งได้
Description: Added form validation before submitting extension requests or closure requests. If required fields are missing, a validation error dialog appears listing what needs to be filled in.
Location: Work Permit task > Work In Progress state > Extension / Close commands
Behavior
| Command | Validation |
|---|---|
| Request Extension | Must have a pending extension with new end time filled |
| Request Close | All inspection categories must have pass/fail, work acceptance must be selected |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | WP in Work In Progress → click "Request Extension" without adding extension → error dialog | ⌛ Pending |
| 2 | Add extension but leave new end time empty → click "Request Extension" → error dialog | ⌛ Pending |
| 3 | Fill extension completely → click "Request Extension" → proceeds normally | ⌛ Pending |
| 4 | Click "Request Close" without filling inspection → error dialog | ⌛ Pending |
| 5 | Fill all inspection but skip work acceptance → error dialog | ⌛ Pending |
| 6 | Fill everything → click "Request Close" → proceeds normally | ⌛ Pending |
Summary
| # | Issue | Description | Status |
|---|---|---|---|
| 1 | #510 | Cancel removed from Work In Progress | 🔍 In Review |
| 2 | #505 | Reviewer removed from Part 2 | 🔍 In Review |
| 3 | #503 | Trained workers popup (verified working) | 🔍 In Review |
| 4 | #507 | Extension/closure validation added | 🔍 In Review |
A comprehensive WP Form Layout Comparison Report has been published on the docs site under Features. This report maps every section of the paper PTW forms against the digital implementation and identifies structural gaps that need discussion before further changes (e.g., #506 authorization simplification, #508 extension co-review, #509 close job).