Report #021
Date: 2026-02-27
Source: MoM 2026-02-27 (#501)
Version: Preview40
PR: #512
Items from MoM 2026-02-27 (non-Work Permit items) and standalone bug report #500.
Feature Overview
| # | Issue | Thai Name | Status |
|---|---|---|---|
| 1 | #502 | ตั้งค่าวันหมดอายุรอบการอบรม | 🔍 In Review |
| 2 | #504 | จัดซื้อเพิ่มผู้รับเหมาไม่ได้ | 🔍 In Review |
| 3 | #500 | ผู้รับเหมารอผู้อื่นดำเนินการ JSA ไม่ควรเห็นปุ่มอนุมัติ | 🔍 In Review |
1. Configure Training Session Expiry Days
Issue: #502 Thai Name: ตั้งค่าวันหมดอายุรอบการอบรม (7/30/0 วัน)
MoM Quote: จป.:สามารถตั้งค่าวันหมดอายุอบรมได้ 7 วัน 30วัน หรือ 0 วัน(ไม่กำหนด)
Description: Added a configurable training session expiry days setting. Safety Officers can now choose how many days after a training session date the session remains active for recording attendance and approval results.
Location: Settings > System Settings > Training tab (การอบรม)
Behavior
| Setting | Meaning |
|---|---|
| ไม่กำหนด (0) | Training sessions never expire |
| 7 วัน | Session expires 7 days after session date |
| 30 วัน | Session expires 30 days after session date |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Login as Admin → System Settings → see "การอบรม" tab | ⌛ Pending |
| 2 | Select "7 วัน" → Save → Refresh → verify value persists | ⌛ Pending |
| 3 | Select "30 วัน" → Save → verify training sessions older than 30 days show as expired | ⌛ Pending |
| 4 | Select "ไม่กำหนด" → Save → verify no training sessions show as expired | ⌛ Pending |
2. Purchasing Cannot Add Contractor
Issue: #504 Thai Name: จัดซื้อเพิ่มผู้รับเหมาไม่ได้ เด้งกลับไปที่หน้าล็อคอิน
MoM Quote: จัดซื้อ:Error เพิ่มผู้รับเหมาไม่ได้ เด้งกลับไปที่หน้าล็อคอิน
Description: Purchasing users were being redirected to the login page when trying to access the contractor management page. Both the frontend route guard and backend authorization have been updated to allow Purchasing role access.
Location: Settings > Contractor Management (ผู้รับเหมา)
Behavior
| Role | Before | After |
|---|---|---|
| Admin | Can access | Can access |
| Purchasing | Redirected to login | Can access |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Login as Purchasing → Settings → Contractor → page loads (no redirect) | ⌛ Pending |
| 2 | Login as Purchasing → Add new contractor → verify can save | ⌛ Pending |
| 3 | Login as Admin → Contractor → verify still works | ⌛ Pending |
3. JSA Co-Review Waiting View Should Be Read-Only for Contractor
Issue: #500 Thai Name: ผู้รับเหมารอผู้อื่นดำเนินการ JSA ไม่ควรเห็นปุ่มอนุมัติ/ส่งกลับ
Description: When a contractor submits a JSA for co-review, they could previously see the Approve/Return buttons in the waiting section. These buttons are now hidden because only Work Owner and Safety Officer can approve.
Location: My Tasks > Waiting (รอผู้อื่นดำเนินการ) > JSA task
Behavior
| Role | Approve/Return Buttons |
|---|---|
| Work Owner | Visible |
| Safety Officer | Visible |
| Contractor (submitter) | Hidden |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Login as Contractor → submit JSA for co-review → open waiting task → confirm Approve/Return buttons are NOT visible | ⌛ Pending |
| 2 | Login as Work Owner → open same JSA → confirm Approve/Return buttons ARE visible | ⌛ Pending |
| 3 | Login as Safety Officer → open same JSA → confirm Approve/Return buttons ARE visible | ⌛ Pending |
Summary
| # | Issue | Description | Status |
|---|---|---|---|
| 1 | #502 | Training expiry days setting | 🔍 In Review |
| 2 | #504 | Purchasing contractor access | 🔍 In Review |
| 3 | #500 | JSA co-review read-only for contractor | 🔍 In Review |