Skip to main content

Service Report #011 In Review

Date: 2026-02-05


MoM 2026-01-27 - PR# Search UX Improvement

Simplify the Project Registration task creation flow and allow Work Owner to optionally enter PR No. when creating new projects.

Feature Overview

#FeaturePR/IssueTypeStatus
1PR# Search UX Simplification#331, #332Enhancement Done
2My Tasks & Project Settings Bug FixesInternalBug Fix🔍 In Review
3Validate Purchasing Info Before Submit to Contractor#333Bug Fix Done
4Signature Visibility & Missing Job Title#334Bug Fix Done
5JSA from Template#335Enhancement Done
6Save as Template for JSA#336Enhancement Done
7JSA Preparation Workflow - Internal ImprovementsInternalEnhancement🔍 In Review
8Shared Project Info SectionInternalEnhancement🔍 In Review
9Remove JSA "In Development" NoteInternalEnhancement🔍 In Review
10Allow Multiple Tool List Submissions#337Enhancement Done
11Co-Review / Co-Approve UX ImprovementInternalImprovement Pending
12System Isolate Completed Checkbox for WP Approval#338Enhancement Pending
13Training Schedule Blank Page#339Bug Fix Awaiting Info
14Company and Date Filters for Training#340Enhancement Already Implemented
15Block Approval Before Training Date#341Bug Fix🔍 In Review

1. PR# Search UX Simplification

Issues:

  • #331 - Work Owner: Start new task from PR# search page
  • #332 - Work Owner: Cannot enter non-existing PR# when creating new task

Thai Name: ปรับปรุง UX การค้นหา PR# สำหรับเจ้าของงาน

MoM Quote:

"เจ้าของงาน: จะทราบ PR# อยู่แล้ว การสร้างงานใหม่ ให้เริ่มจากหน้านี้เลย หากไม่พบ ให้มีสร้างจากหน้านี้เลย"

"ใส่ PR# ที่ยังไม่มีไม่ได้ จะไปค้นหาตลอด"


Requirement Analysis

Key PhraseInterpretation
"จะทราบ PR# อยู่แล้ว"Work Owner usually knows PR# → Start with search
"ให้เริ่มจากหน้านี้เลย"Start from PR# search page → Search is the first step
"หากไม่พบ ให้มีสร้างจากหน้านี้เลย"If not found, create from same page → Show create form inline
"ใส่ PR# ที่ยังไม่มีไม่ได้"Cannot enter non-existing PR# → Allow saving PR# even if not in system

Current Flow vs Proposed Flow

Current Flow (2-step wizard):

Proposed Flow (single flow):


UI Mockup

State 1: Initial (Search)

┌─────────────────────────────────────────┐
│ สร้างงานขึ้นทะเบียนโครงการ │
├─────────────────────────────────────────┤
│ │
│ PR No. │
│ ┌─────────────────────────┬──────┐ │
│ │ Enter PR#... │ ค้นหา │ │
│ └─────────────────────────┴──────┘ │
│ │
│ (Search results appear here) │
│ │
├─────────────────────────────────────────┤
│ [ยกเลิก] │
└─────────────────────────────────────────┘

State 2: Found (Select Project)

┌─────────────────────────────────────────┐
│ สร้างงานขึ้นทะเบียนโครงการ │
├─────────────────────────────────────────┤
│ │
│ PR No. │
│ ┌─────────────────────────┬──────┐ │
│ │ PR-2026-001 │ ค้นหา │ │
│ └─────────────────────────┴──────┘ │
│ │
│ ✅ พบโครงการ: │
│ ┌─────────────────────────────────┐ │
│ │ 📋 งานติดตั้งระบบไฟฟ้า │ │
│ │ PR-2026-001 | PO-2026-001 │ │
│ │ Valid: 01/02/2569-28/02/2569│ │
│ └─────────────────────────────────┘ │
│ │
├─────────────────────────────────────────┤
│ [ยกเลิก] [เลือก] │
└─────────────────────────────────────────┘

State 3: Not Found (Show Create Form)

┌─────────────────────────────────────────┐
│ สร้างงานขึ้นทะเบียนโครงการ │
├─────────────────────────────────────────┤
│ │
│ PR No. │
│ ┌─────────────────────────┬──────┐ │
│ │ PR-2026-999 │ ค้นหา │ │
│ └─────────────────────────┴──────┘ │
│ │
│ ⚠️ ไม่พบ PR# นี้ในระบบ │
│ กรุณากรอกข้อมูลเพื่อสร้างโครงการใหม่ │
│ │
│ ───────────────────────────────────── │
│ │
│ ชื่อโครงการ * │
│ ┌─────────────────────────────────┐ │
│ │ │ │
│ └─────────────────────────────────┘ │
│ │
│ รายละเอียด │
│ ┌─────────────────────────────────┐ │
│ │ │ │
│ └─────────────────────────────────┘ │
│ │
│ PR No. (ถ้ามี) │
│ ┌─────────────────────────────────┐ │
│ │ PR-2026-999 │← pre-filled from search
│ └─────────────────────────────────┘ │
│ │
├─────────────────────────────────────────┤
│ [ยกเลิก] [สร้างงาน] │
└─────────────────────────────────────────┘

Changes to Full Form (Project Registration)

In addition to the pre-create dialog, the full Project Registration form should also allow Work Owner to edit PR No. directly:

FieldCurrentProposed
PR No.Read-only for WO (Purchasing only)Editable by WO + type-to-search
PO No.Read-only for WORead-only for WO (unchanged)
Validity PeriodRead-only for WORead-only for WO (unchanged)

PR No. field behavior:

  • Work Owner can type PR No. directly
  • Autocomplete/search suggests existing PR# as they type
  • Can enter new PR# that doesn't exist yet

Data Ownership (Updated)

Data FieldWho Can EnterVerification
Project NameWork Owner-
DescriptionWork Owner-
PR No.Work Owner (optional)Purchasing verifies
PO No.Purchasing-
Validity PeriodPurchasing-

Key Change: PR No. is now optionally entered by Work Owner, but Purchasing is still the verification layer.


Verification Flow

Purchasing responsibilities:

  • Verify PR# is correct (if WO entered one)
  • Correct typos if needed
  • Fill in PO#, validity dates
  • Final authority on accounting values

Implementation Plan

#TaskLayerFiles
1Remove step 1 options selectionFrontendselect-project-for-pr-dialog.component.ts
2Make PR# search the initial viewFrontendSame
3Add "not found" state with create formFrontendSame
4Add Project Name, Description, PR No. fieldsFrontendSame
5Pre-fill PR No. from search inputFrontendSame
6Handle create submission with optional PR#FrontendSame
7Allow WO to edit PR No. in full formFrontendproject-registration-form.component.ts
8Add type-to-search for PR No. fieldFrontendSame
9Update i18n messagesFrontendmessages.json, messages.en.json

What to Test

Pre-create Dialog:

#Test CaseStatus
1Open "Create Project Registration" → See PR# search field (no options step) Pending
2Enter existing PR# → Search → Project found → Select button appears Pending
3Select found project → Task created with that project Pending
4Enter non-existing PR# → Search → "Not found" + create form appears Pending
5Create form: PR No. field is pre-filled from search Pending
6Create form: PR No. field is optional (can be cleared) Pending
7Create form: Project Name is required Pending
8Submit create form → Task created with entered data Pending

Full Form (Project Registration):

#Test CaseStatus
9WO opens form → PR No. field is editable Pending
10Type in PR No. field → Autocomplete suggests existing PR# Pending
11Enter new PR# (not in system) → Saves successfully Pending
12Purchasing reviews → Can see/edit PR# entered by WO Pending

2. My Tasks & Project Settings Bug Fixes

Thai Name: แก้ไขบั๊กหน้า My Tasks และ Project Settings

Description: Fixed several bugs discovered during testing of the PR# Search UX improvements.


2.1 Task Duplicate Display in My Tasks

Problem: After Work Owner creates a new task, the same task appeared in both "ต้องดำเนินการ" (To do) and "รอผู้อื่นดำเนินการ" (Wait for others) sections.

Root Cause: When creating a task, the user is set as both assigner and assignee. The backend queries returned the task in both categories.

Fix: Modified SearchWaitingForApprovalTasksAsync to exclude tasks where the current user is also the current assignee.

LayerFileChange
BackendTaskQueryService.csAdded x.AssigneeUserId != userId filter

2.2 PR# Search Dialog Stale Results

Problem: Search results sometimes showed stale data after clearing the search field, or search didn't trigger on re-typing the same keyword.

Root Cause:

  1. rxResource async behavior didn't immediately clear cached results on reset
  2. distinctUntilChanged blocked re-search when user typed the same keyword twice

Fix:

  1. Added explicit results signal for immediate clearing
  2. Removed distinctUntilChanged from search pipe
LayerFileChange
Frontendproject-search.service.tsAdded _explicitResults signal for immediate clearing
Frontendselect-project-for-pr-dialog.component.tsRemoved distinctUntilChanged operator

2.3 Project Settings Save Button Not Disabled

Problem: Save button was clickable even when required fields (บริษัทผู้รับเหมา, ผู้ควบคุมงาน) were empty.

Fix: Added form validity tracking and disabled save button when form is invalid.

LayerFileChange
Frontendproject-setting-form.component.tsAdded formValid model output with NgForm status tracking
Frontendproject-setting.component.tsAdded [disabled]="!formValid()" to save button

2.4 Project Settings Save Error (FK Constraint)

Problem: Creating a new project failed with "violates foreign key constraint fk_projects_employers_employer_id" error.

Root Cause: Frontend sent empty GUID for employerId, but database has NOT NULL constraint with FK to employers table.

Fix: Auto-assign tenant's employer when creating a project (each tenant has exactly one employer).

LayerFileChange
BackendProjectService.csAuto-fetch and assign tenant's employer in CreateProjectAsync and SaveProjectAsync

What to Test

#Test CaseStatus
1WO creates new task → Task appears in "ต้องดำเนินการ" only (not both sections) Pending
2PR# search dialog: Type "P" → Clear → Type "P" again → Search triggers correctly Pending
3PR# search dialog: Clear search field → Results list clears immediately Pending
4Project Settings: Leave required fields empty → Save button is disabled Pending
5Project Settings: Fill all required fields → Save button is enabled Pending
6Project Settings: Create new project → Saves successfully (no FK error) Pending

3. Validate Purchasing Info Before Submit to Contractor

Issue: #333

Thai Name: เจ้าของงาน: สร้างงานจากโครงการใหม่ที่ยังไม่มีข้อมูล จัดซื้อ ซึ่งยังกรอกข้อมูลผู้รับเหมาไม่ได้ แต่กดส่งไปยังผู้เรับเหมาได้

Description: Work Owner could submit task to Contractor even when contractor info was missing (บริษัทผู้รับเหมา, ผู้ประสานงานหลัก).


3-Layer Validation Architecture

This fix establishes a defense-in-depth validation pattern that is now the standard for all workflow commands.

LayerTimingBehaviorUI Feedback
Pre-ValidationBefore button clickControls button state (disabled/enabled)Button grayed out, orange warning banner
Post-Frontend-ValidationAfter button click, before dialogValidates before showing confirmation dialogDialogValidationErrorComponent
Backend ValidationAfter dialog confirmedFinal safety netHTTP 4xx response

Layer 1: Pre-Validation (Button State)

Purpose: Disable command button when form is incomplete.

Implementation:

  • formValid computed signal checks required fields
  • [disabled] binding on command button
  • Orange warning banner shows missing fields

Example: If purchasing fields are empty, the "Submit" button is disabled.


Layer 2: Post-Frontend-Validation (Dialog Pattern)

Purpose: Catch validation errors that button state doesn't cover, but BEFORE showing confirmation dialog.

UX Principle:

"If the confirmation dialog shows up, that means it's ready to execute."

Implementation:

  • Check in onExecuteCommand() before opening dialog
  • Show DialogValidationErrorComponent with formatted list of missing fields
  • Return early if validation fails (don't open confirmation dialog)

When to use Dialog vs Toast:

ScenarioUseReason
Missing required fields (list)DialogShows formatted list of what's missing
Duplicate workflow existsDialogOffers action (navigate to existing)
Simple status messageToastQuick feedback, no action needed

Layer 3: Backend Validation

Purpose: Safety net when frontend validation is bypassed.

Implementation:

  • Backend checks contractor info before executing command
  • Returns HTTP 400/409 with error code if validation fails

Files Changed

LayerFileChange
Frontendreview-task.component.tsAdded pre-dialog validation for contractor fields
Frontenddialog-validation-error.component.tsNew reusable validation error dialog
Frontendmessages.jsonAdded i18n keys for validation messages
Frontendmessages.en.jsonAdded English translations
Docsworkflow-implementation.mdAdded Command Pre-Validation pattern as standard

What to Test

#Test CaseStatus
1WO at ReviewPurchasingInfo: No contractor selected → Click "ส่งไปผู้รับเหมา" → See validation dialog Pending
2Validation dialog shows both missing fields (บริษัทผู้รับเหมา, ผู้ประสานงานหลัก) Pending
3Click "ตกลง" in dialog → Dialog closes → Can fix the data Pending
4Fill contractor + supervisor → Click "ส่งไปผู้รับเหมา" → Confirmation dialog opens Pending
5Complete flow → Task successfully sent to contractor Pending

4. Signature Visibility & Missing Job Title

Issue: #334

Thai Name: เจ้าของงาน: เมื่องานผ่านผู้รับเหมามาแล้ว จะกดดูลายมือชื่อได้หรือไม่ และ ตำแหน่งงานที่ส่งมาหายไป

MoM Quote:

"เจ้าของงาน: เมื่องานผ่านผู้รับเหมามาแล้ว จะกดดูลายมือชื่อได้หรือไม่: ควรได้ และ มี bug: ตำแหน่งงานที่ส่งมาหายไป"

Description: Two bugs in the Pre-Work Procedures form:

  1. Contractor's drawn signature (canvas) was not saved to database - it appeared after signing but disappeared on page reload
  2. Contractor's job title (ตำแหน่ง) was lost after save - editing the position field after signing did not trigger a save

Location: My Tasks → Open task → ระเบียบการปฏิบัติก่อนเข้างาน → Contractor Signature section


Bug 1: Signature Drawing Not Persisted

ScenarioBeforeAfter
Contractor signs with canvas drawingDrawing visible until page reload, then goneDrawing saved and visible on all reloads
Work Owner views signed formOnly sees "✓ ลงนามแล้ว" textSees drawn signature image + "✓ ลงนามแล้ว"
Print previewNo signature imageShows signature image
PDF exportNo signature imageShows signature image

Bug 2: Position Field Not Saved

ScenarioBeforeAfter
Type position BEFORE signingSaved (signing triggers full write)Saved
Type position AFTER signingLost (no save trigger)Saved (field change triggers auto-save)
Edit name after signingLostSaved

What to Test

#Test CaseStatus
1Contractor: Sign with canvas drawing → Reload page → Signature image still visible Pending
2Contractor: Type position after signing → Navigate away → Come back → Position is saved Pending
3Contractor: Edit name after signing → Navigate away → Come back → Name is saved Pending
4Work Owner: View contractor-signed form → See signature image + position + name Pending
5Print preview → Signature image appears in contractor signature section Pending
6PDF export → Signature image rendered in contractor signature section Pending
7Backward compatibility: Old forms without signature image → Still show "✓ ลงนามแล้ว" text Pending

5. JSA from Template

Issue: #335

Thai Name: ผู้รับเหมา: จะสร้าง JSA จาก Template ได้อย่างไร ไม่เห็นปุ่มสร้างจาก Template

MoM Quote:

"ผู้รับเหมา: จะสร้าง JSA จาก Template ได้อย่างไร ไม่เห็นปุ่มสร้างจาก Template มีเพียงปุ่มสร้างใหม่ทั้งหมด"

Description: Contractor can now create JSA from existing templates. When creating a new JSA in the JSA Preparation workflow, the "Create from Template" option is available alongside the "Create New" option.

Location: My Tasks → Open JSA Preparation task → JSA section → Create JSA

Behavior

ActionBeforeAfter
Create new JSAOnly "สร้างใหม่" (Create New) buttonBoth "สร้างใหม่" and "สร้างจาก Template" options
Select templateNot availableOpens template selection dialog
Create from templateNot availablePre-fills JSA with template data (hazards, controls, general practices)

What to Test

#Test CaseStatus
1Open JSA Preparation task → See "Create from Template" option Pending
2Click "Create from Template" → Template list appears Pending
3Select template → JSA created with template data pre-filled Pending
4Verify template data (hazards, controls, general practices) copied correctly Pending
5Edit pre-filled JSA → Changes saved correctly Pending

6. Save as Template for JSA

Issue: #336

Thai Name: ผู้รับเหมา: หากสร้าง JSA ใหม่ทั้งหมด ตอนเตรียม ให้มีปุ่ม บันทึกไปเป็น Template ได้ด้วย

MoM Quote:

"ผู้รับเหมา: NFR, หากสร้าง JSA ใหม่ทั้งหมด ตอนเตรียม ให้มีปุ่ม บันทึกไปเป็น Template ได้ด้วย"

Description: When creating a new JSA (not from template), the contractor can save it as a template for future reuse. A "Save as Template" button is available in the JSA form toolbar.

Location: My Tasks → Open JSA Preparation task → JSA form → Toolbar

Behavior

ActionBeforeAfter
JSA form toolbarNo template save option"บันทึกเป็น Template" button available
Save as templateNot availableSaves current JSA data as a new JSA template
Saved template-Available in "Create from Template" for future JSAs

What to Test

#Test CaseStatus
1Open JSA form → See "Save as Template" button in toolbar Pending
2Click "Save as Template" → Template saved successfully Pending
3Create new JSA → "Create from Template" → Verify saved template appears in list Pending
4Verify template contains all JSA data (work steps, hazards, controls, general practices) Pending

7. JSA Preparation Workflow - Internal Improvements

Thai Name: ปรับปรุงภายใน JSA Preparation Workflow

Description: Various internal improvements to the JSA Preparation workflow discovered during testing. These improvements enhance usability and fix UX issues across the task review system.


7.1 Active Document Detection (Command Button Visibility)

Problem: When viewing documents from other workflows (e.g., Project Registration form while in JSA Preparation workflow), command buttons ("ส่ง JSA", "ยกเลิก") were still visible. Users could accidentally execute workflow commands while viewing an unrelated document.

Fix: Added workflow-owned form ID mapping. When a document from a different workflow is viewed, command buttons are automatically hidden.

ViewCommand Buttons
Document listHidden
Active workflow document (e.g., JSA form)Visible
Other workflow document (e.g., Project Registration)Hidden
Reference documentHidden

7.2 JSA Form Layout Improvements

Changes:

  • Improved project info display with unified data from Project entity
  • Added Work Type as editable field (JSA-specific)
  • Improved read-only field styling (gray background, dashed border)
  • Simplified form header (conditional company name display)

7.3 Signature Dialog Simplification

Problem: The signature approval dialog included a canvas drawing section that was rarely used and added visual complexity.

Fix: Removed the optional canvas drawing section. Signature verification is now password-only, which is simpler and matches the actual usage pattern.


7.4 Read-Only Field Styling

Problem: Inline-edit and inline-datepicker fields in read-only mode looked the same as empty editable fields, causing confusion.

Fix: Read-only fields with values now display with:

  • Gray background (bg-gray-50)
  • Dashed border (border-dashed)
  • Gray text (text-gray-600)
  • Distinct from editable fields

7.5 JSA Template Display Improvements

Change: General practices items in JSA Template settings now display with green check icons instead of checkboxes, better representing their "always included" nature.


7.6 Backend Entity Loading

Change: Added eager loading for Project's Contractor, Employer, and WorkspaceArea entities in task queries, ensuring all project-related data is available in the task review form.


7.7 Code Cleanup

Removed: Legacy components that were replaced by the new document container architecture:

  • risk-assessment-form.component.ts (556 lines) - replaced by jsa-form.component.ts
  • review-task-document.component.ts (909 lines) - replaced by document-container.component.ts

What to Test

#Test CaseStatus
1JSA Preparation: Click Project Registration (locked) → Command buttons hidden Pending
2JSA Preparation: Click JSA form → Command buttons visible Pending
3Tool List Preparation: Click Project Registration (locked) → Command buttons hidden Pending
4Read-only fields show gray background + dashed border Pending
5Signature dialog: Simple password-only flow, no canvas section Pending
6JSA Template: General practices show green check icons Pending
7JSA form: Project info displays correctly (company, location, dates) Pending

8. Shared Project Info Section

Thai Name: รวม Project Info เป็น Component เดียวที่ใช้ร่วมกัน

Description: All downstream workflow forms (JSA, Tool List, Manpower Name List) now display the same 9-field project info section using a shared component. Previously, Tool List and Manpower showed only 4 fields; they now show all 9 fields matching JSA.

Location: My Tasks → Open task → Any document form → Project Info section at top

Behavior

FormBeforeAfter
JSA9 fields (inline HTML)9 fields (shared component)
Tool List4 fields9 fields (shared component)
Manpower Name List4 fields9 fields (shared component)

Project Info Fields

#FieldDescription
1บริษัทผู้รับเหมาContractor name
2ชื่อโครงการProject name
3สถานที่ปฏิบัติงานWork location (area code + name)
4หน่วยงานเจ้าของพื้นที่Area owner department
5ระยะเวลาทำงานWork duration (days)
6เลขที่ POPurchase Order number
7เลขที่ PRPurchase Requisition number
8วันเริ่มงานStart date
9วันสิ้นสุดงานEnd date

What to Test

#Test CaseStatus
1New Tool List task → Open form → All 9 project fields displayed Pending
2New Manpower Name List (Work Permit) → Open form → All 9 project fields displayed Pending
3JSA form → Project info looks the same as before Pending
4Existing tasks (before update) → New fields show "-" gracefully Pending

9. Remove JSA "In Development" Note

Thai Name: นำข้อความ "อยู่ระหว่างพัฒนา" ออกจากเมนูสร้างงาน JSA

Description: Removed the orange "(อยู่ระหว่างพัฒนา อาจพบข้อผิดพลาด)" warning text from the JSA Preparation option in the task type selection dialog. The Work Permit option retains the note.

Location: My Tasks → + สร้างงาน → Task type selection dialog

Behavior

Task TypeBeforeAfter
จัดเตรียม JSAShows "(อยู่ระหว่างพัฒนา อาจพบข้อผิดพลาด)"No warning note
การขอใบอนุญาตทำงานShows "(อยู่ระหว่างพัฒนา อาจพบข้อผิดพลาด)"Still shows warning (unchanged)

What to Test

#Test CaseStatus
1Open create task dialog → JSA option has no orange warning text Pending
2Open create task dialog → Work Permit still shows orange warning Pending

10. Allow Multiple Tool List Submissions

Issue: #337

Thai Name: เจ้าของงาน: ต้องส่งเครื่องมือได้เรื่อย ๆ

MoM Quote:

"เจ้าของงาน: ต้องส่งเครื่องมือได้เรื่อย ๆ (JSA ส่งครั้งเดียวมีเตือนถูกต้องแล้ว)"

Description: Contractors can now create multiple Tool List tasks for the same project. Previously, the system blocked creating a second Tool List if one was already active. JSA remains restricted to one per project (as confirmed in the MoM).

Location: My Tasks → + สร้างงาน → รายการเครื่องมือ → Select project

Behavior

WorkflowBeforeAfter
Tool List (รายการเครื่องมือ)Blocked if one active task exists for the projectMultiple active tasks allowed
JSA (จัดเตรียม JSA)Blocked if one active task existsUnchanged — still one per project

What to Test

#Test CaseStatus
1Create Tool List for project that already has an active Tool List → Task created successfully (no blocking dialog) Pending
2Create JSA for project that already has an active JSA → Blocking dialog still appears Pending
3Create Tool List for project with no active Tool List → Task created normally Pending

11. Co-Review / Co-Approve UX Improvement

Thai Name: ปรับปรุง UX ระบบตรวจสอบร่วม (Co-Review / Co-Approve)

Description: The co-review (ตรวจสอบร่วม) feature currently works but lacks visibility into approval progress. When multiple reviewers (e.g., Work Owner + Safety Officer) must approve, there is no way to see who has already approved and who hasn't.

Affected Workflows:

  • JSA Preparation — Co-review by WO + SO
  • Work Permit Request — Co-review/co-approve by multiple roles (WO, SO, Workspace Owner)

Current State: Functional but minimal UX. A Dev Note banner is shown on all JSA Preparation tasks requesting feedback.

Location: My Tasks → Open any JSA Preparation or Work Permit Request task in review state

What Needs Improvement

AreaCurrentExpected
Approval statusNo indicationShow who approved, who hasn't
Progress visibilityUsers don't know others' statusBadge or indicator per reviewer
NotificationEmail sent on completionConsider partial approval notification

What to Test / Feedback Requested

#QuestionStatus
1Should approval badges show per-reviewer status (like Work Permit prototype)? Pending feedback
2Should the first approver see a confirmation message showing their approval was recorded? Pending feedback
3Should partial approval send notification to the remaining reviewer? Pending feedback
4Any other UX suggestions for co-review workflow? Pending feedback

12. System Isolate Completed Checkbox for WP Approval

Issue: #338

Thai Name: เจ้าของพื้นที่: เพิ่ม checkbox "System Isolate Completed" ตอนอนุมัติ Work Permit

MoM Quote:

"เจ้าของพื้นที่: ที่จะอนุมัติ WP ในแต่ละวัน ตอน อนุมัติ จะมี check box [ ] System Isolate Completed"

Description: When the Workspace Owner approves a Work Permit for each day, there should be a "System Isolate Completed" checkbox that must be checked before approval can proceed.

Location: My Tasks → Open Work Permit Request task → Workspace Owner approval

Status: Pending — Will be implemented as part of the Work Permit workflow (final workflow to be developed).

What to Test

#Test CaseStatus
1Workspace Owner opens WP approval → See "System Isolate Completed" checkbox Pending
2Checkbox unchecked → Approve button disabled Pending
3Check the checkbox → Approve button enabled Pending

13. Training Schedule Blank Page

Issue: #339

Thai Name: จป.: เพิ่มแผนการอบรมไม่ได้ แสดงเป็นหน้าขาว ไม่มี control เป็นบ่อยครั้งมาก

MoM Quote:

"จป.: เพิ่มแผนการอบรบไม่ได้ แสดงเป็นหน้าขาว ไม่มี control เป็นบ่อยครั้งมาก"

Description: Safety Officer reports that the training schedule page sometimes shows a blank page with no controls. The issue occurs frequently but cannot be reproduced in the development environment.

Location: Tools → Training Schedule

Status: Awaiting Info — Cannot reproduce. Requested reporter to clear browser cache and provide console error screenshots.

Investigation

  • Tested in development environment — page loads correctly every time
  • Possible cause: stale browser cache after deployment
  • Requested additional info from reporter (see comment)

What to Test

#Test CaseStatus
1Clear browser cache → Open training schedule → Page loads correctly Pending
2If still blank → Check Console (F12) for red errors → Share screenshot Pending

15. Block Approval Before Training Date

Issue: #341

Thai Name: จป.: หากยังไม่ถึงวันอบรม ยังให้อนุมัติไม่ได้

MoM Quote:

"จป.: หากยังไม่ถึงวันอบรม ยังให้อนุมัติไม่ได้"

Description: Safety Officer could approve training results before the training session date. The system now blocks approval if the session date is in the future.

Location: Tools → Training → อนุมัติผลอบรม (Approve Training Results)

Behavior

ScenarioBeforeAfter
Approve before session dateAllowedBlocked with error message
Approve on or after session dateAllowedAllowed

What to Test

#Test CaseStatus
1Select attendees from a future training session → Click approve → Error message shown Pending
2Select attendees from a past/today training session → Click approve → Approval succeeds Pending
3Bulk approve mixed sessions (future + past) → Blocked if any session is future Pending

14. Company and Date Filters for Training

Issue: #340

Thai Name: จป.: ขอตัวคัดกรองตามบริษัท หรือ ทั้งหมด และ คัดกรองตามวันที่อบรมด้วย

MoM Quote:

"จป.: ขอตัวคัดกรองตามบริษัท หรือ ทั้งหมด และ คัดกรองตามวันที่อบรมด้วย"

Description: These filters already exist in the current version. No changes needed.

Status: Already Implemented

Existing Filters

FilterLocationTab
Company (บริษัท)Tools → Trainingอนุมัติผลอบรม (Approve Training Results)
Date range (From/To)Tools → Trainingรอบอบรม (Training Sessions)
StatusTools → Trainingรอบอบรม (Training Sessions)
Training ScheduleTools → Trainingรอบอบรม (Training Sessions)

What to Test

#Test CaseStatus
1Open Training → Approve Training Results tab → Company filter works Already working
2Open Training → Training Sessions tab → Date filters work Already working

Summary

#FeatureTypeStatus
1PR# Search UX SimplificationEnhancement Done
2My Tasks & Project Settings Bug FixesBug Fix🔍 In Review
3Validate Purchasing Info Before Submit to ContractorBug Fix Done
4Signature Visibility & Missing Job TitleBug Fix Done
5JSA from TemplateEnhancement Done
6Save as Template for JSAEnhancement Done
7JSA Preparation Workflow - Internal ImprovementsEnhancement🔍 In Review
8Shared Project Info SectionEnhancement🔍 In Review
9Remove JSA "In Development" NoteEnhancement🔍 In Review
10Allow Multiple Tool List SubmissionsEnhancement Done
11Co-Review / Co-Approve UX ImprovementImprovement Pending
12System Isolate Completed Checkbox for WP ApprovalEnhancement Pending
13Training Schedule Blank PageBug Fix Awaiting Info
14Company and Date Filters for TrainingEnhancement Already Implemented
15Block Approval Before Training DateBug Fix🔍 In Review

Key Changes:

  1. Simplified pre-create dialog (search first, create inline if not found)
  2. Work Owner can optionally enter PR No. (pre-filled from search)
  3. Full form allows WO to edit PR No. with type-to-search
  4. Purchasing remains the verification layer for all accounting values
  5. Fixed task duplicate display, search dialog stale results, and project settings save issues
  6. Added 3-layer validation architecture for workflow commands (pre-validation, post-frontend, backend)
  7. Fixed signature drawing persistence and position field save triggers
  8. Contractor can create JSA from existing templates
  9. Contractor can save new JSA as template for future reuse
  10. Command buttons hidden when viewing documents from other workflows
  11. Improved read-only field styling, signature dialog simplification, and JSA form layout
  12. Shared project info component: all downstream forms show 9 fields (was 4 for Tool List & Manpower)
  13. Removed "In development" warning from JSA Preparation task type
  14. Allow multiple Tool List tasks per project (JSA keeps one-per-project restriction)
  15. Co-review/co-approve works but needs UX improvement — pending feedback on approval status visibility
  16. System Isolate Completed checkbox for WP approval — pending (part of Work Permit workflow)
  17. Training schedule blank page — cannot reproduce, awaiting reporter info (cache/console errors)
  18. Company and date filters for training — already implemented, no changes needed
  19. Block training approval before session date — backend validation added