Skip to main content

Report #021

Date: 2026-02-27

Source: MoM 2026-02-27 (#501)

Version: Preview40

PR: #512


info

Items from MoM 2026-02-27 (non-Work Permit items) and standalone bug report #500.

Feature Overview

#IssueThai NameStatus
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

SettingMeaning
ไม่กำหนด (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 CaseStatus
1Login as Admin → System Settings → see "การอบรม" tab Pending
2Select "7 วัน" → Save → Refresh → verify value persists Pending
3Select "30 วัน" → Save → verify training sessions older than 30 days show as expired Pending
4Select "ไม่กำหนด" → 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

RoleBeforeAfter
AdminCan accessCan access
PurchasingRedirected to loginCan access

What to Test

#Test CaseStatus
1Login as Purchasing → Settings → Contractor → page loads (no redirect) Pending
2Login as Purchasing → Add new contractor → verify can save Pending
3Login 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

RoleApprove/Return Buttons
Work OwnerVisible
Safety OfficerVisible
Contractor (submitter)Hidden

What to Test

#Test CaseStatus
1Login as Contractor → submit JSA for co-review → open waiting task → confirm Approve/Return buttons are NOT visible Pending
2Login as Work Owner → open same JSA → confirm Approve/Return buttons ARE visible Pending
3Login as Safety Officer → open same JSA → confirm Approve/Return buttons ARE visible Pending

Summary

#IssueDescriptionStatus
1#502Training expiry days setting🔍 In Review
2#504Purchasing contractor access🔍 In Review
3#500JSA co-review read-only for contractor🔍 In Review