Service Report #011 In Review
Date: 2026-02-05
Simplify the Project Registration task creation flow and allow Work Owner to optionally enter PR No. when creating new projects.
Feature Overview
| # | Feature | PR/Issue | Type | Status |
|---|---|---|---|---|
| 1 | PR# Search UX Simplification | #331, #332 | Enhancement | ✅ Done |
| 2 | My Tasks & Project Settings Bug Fixes | Internal | Bug Fix | 🔍 In Review |
| 3 | Validate Purchasing Info Before Submit to Contractor | #333 | Bug Fix | ✅ Done |
| 4 | Signature Visibility & Missing Job Title | #334 | Bug Fix | ✅ Done |
| 5 | JSA from Template | #335 | Enhancement | ✅ Done |
| 6 | Save as Template for JSA | #336 | Enhancement | ✅ Done |
| 7 | JSA Preparation Workflow - Internal Improvements | Internal | Enhancement | 🔍 In Review |
| 8 | Shared Project Info Section | Internal | Enhancement | 🔍 In Review |
| 9 | Remove JSA "In Development" Note | Internal | Enhancement | 🔍 In Review |
| 10 | Allow Multiple Tool List Submissions | #337 | Enhancement | ✅ Done |
| 11 | Co-Review / Co-Approve UX Improvement | Internal | Improvement | ⌛ Pending |
| 12 | System Isolate Completed Checkbox for WP Approval | #338 | Enhancement | ⌛ Pending |
| 13 | Training Schedule Blank Page | #339 | Bug Fix | ⌛ Awaiting Info |
| 14 | Company and Date Filters for Training | #340 | Enhancement | ✅ Already Implemented |
| 15 | Block Approval Before Training Date | #341 | Bug 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 Phrase | Interpretation |
|---|---|
| "จะทราบ 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:
| Field | Current | Proposed |
|---|---|---|
| PR No. | Read-only for WO (Purchasing only) | Editable by WO + type-to-search |
| PO No. | Read-only for WO | Read-only for WO (unchanged) |
| Validity Period | Read-only for WO | Read-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 Field | Who Can Enter | Verification |
|---|---|---|
| Project Name | Work Owner | - |
| Description | Work Owner | - |
| PR No. | Work Owner (optional) | Purchasing verifies |
| PO No. | Purchasing | - |
| Validity Period | Purchasing | - |
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
| # | Task | Layer | Files |
|---|---|---|---|
| 1 | Remove step 1 options selection | Frontend | select-project-for-pr-dialog.component.ts |
| 2 | Make PR# search the initial view | Frontend | Same |
| 3 | Add "not found" state with create form | Frontend | Same |
| 4 | Add Project Name, Description, PR No. fields | Frontend | Same |
| 5 | Pre-fill PR No. from search input | Frontend | Same |
| 6 | Handle create submission with optional PR# | Frontend | Same |
| 7 | Allow WO to edit PR No. in full form | Frontend | project-registration-form.component.ts |
| 8 | Add type-to-search for PR No. field | Frontend | Same |
| 9 | Update i18n messages | Frontend | messages.json, messages.en.json |
What to Test
Pre-create Dialog:
| # | Test Case | Status |
|---|---|---|
| 1 | Open "Create Project Registration" → See PR# search field (no options step) | ⌛ Pending |
| 2 | Enter existing PR# → Search → Project found → Select button appears | ⌛ Pending |
| 3 | Select found project → Task created with that project | ⌛ Pending |
| 4 | Enter non-existing PR# → Search → "Not found" + create form appears | ⌛ Pending |
| 5 | Create form: PR No. field is pre-filled from search | ⌛ Pending |
| 6 | Create form: PR No. field is optional (can be cleared) | ⌛ Pending |
| 7 | Create form: Project Name is required | ⌛ Pending |
| 8 | Submit create form → Task created with entered data | ⌛ Pending |
Full Form (Project Registration):
| # | Test Case | Status |
|---|---|---|
| 9 | WO opens form → PR No. field is editable | ⌛ Pending |
| 10 | Type in PR No. field → Autocomplete suggests existing PR# | ⌛ Pending |
| 11 | Enter new PR# (not in system) → Saves successfully | ⌛ Pending |
| 12 | Purchasing 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.
| Layer | File | Change |
|---|---|---|
| Backend | TaskQueryService.cs | Added 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:
rxResourceasync behavior didn't immediately clear cached results on resetdistinctUntilChangedblocked re-search when user typed the same keyword twice
Fix:
- Added explicit results signal for immediate clearing
- Removed
distinctUntilChangedfrom search pipe
| Layer | File | Change |
|---|---|---|
| Frontend | project-search.service.ts | Added _explicitResults signal for immediate clearing |
| Frontend | select-project-for-pr-dialog.component.ts | Removed 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.
| Layer | File | Change |
|---|---|---|
| Frontend | project-setting-form.component.ts | Added formValid model output with NgForm status tracking |
| Frontend | project-setting.component.ts | Added [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).
| Layer | File | Change |
|---|---|---|
| Backend | ProjectService.cs | Auto-fetch and assign tenant's employer in CreateProjectAsync and SaveProjectAsync |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | WO creates new task → Task appears in "ต้องดำเนินการ" only (not both sections) | ⌛ Pending |
| 2 | PR# search dialog: Type "P" → Clear → Type "P" again → Search triggers correctly | ⌛ Pending |
| 3 | PR# search dialog: Clear search field → Results list clears immediately | ⌛ Pending |
| 4 | Project Settings: Leave required fields empty → Save button is disabled | ⌛ Pending |
| 5 | Project Settings: Fill all required fields → Save button is enabled | ⌛ Pending |
| 6 | Project 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.
| Layer | Timing | Behavior | UI Feedback |
|---|---|---|---|
| Pre-Validation | Before button click | Controls button state (disabled/enabled) | Button grayed out, orange warning banner |
| Post-Frontend-Validation | After button click, before dialog | Validates before showing confirmation dialog | DialogValidationErrorComponent |
| Backend Validation | After dialog confirmed | Final safety net | HTTP 4xx response |
Layer 1: Pre-Validation (Button State)
Purpose: Disable command button when form is incomplete.
Implementation:
formValidcomputed 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
DialogValidationErrorComponentwith formatted list of missing fields - Return early if validation fails (don't open confirmation dialog)
When to use Dialog vs Toast:
| Scenario | Use | Reason |
|---|---|---|
| Missing required fields (list) | Dialog | Shows formatted list of what's missing |
| Duplicate workflow exists | Dialog | Offers action (navigate to existing) |
| Simple status message | Toast | Quick 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
| Layer | File | Change |
|---|---|---|
| Frontend | review-task.component.ts | Added pre-dialog validation for contractor fields |
| Frontend | dialog-validation-error.component.ts | New reusable validation error dialog |
| Frontend | messages.json | Added i18n keys for validation messages |
| Frontend | messages.en.json | Added English translations |
| Docs | workflow-implementation.md | Added Command Pre-Validation pattern as standard |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | WO at ReviewPurchasingInfo: No contractor selected → Click "ส่งไปผู้รับเหมา" → See validation dialog | ⌛ Pending |
| 2 | Validation dialog shows both missing fields (บริษัทผู้รับเหมา, ผู้ประสานงานหลัก) | ⌛ Pending |
| 3 | Click "ตกลง" in dialog → Dialog closes → Can fix the data | ⌛ Pending |
| 4 | Fill contractor + supervisor → Click "ส่งไปผู้รับเหมา" → Confirmation dialog opens | ⌛ Pending |
| 5 | Complete 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:
- Contractor's drawn signature (canvas) was not saved to database - it appeared after signing but disappeared on page reload
- 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
| Scenario | Before | After |
|---|---|---|
| Contractor signs with canvas drawing | Drawing visible until page reload, then gone | Drawing saved and visible on all reloads |
| Work Owner views signed form | Only sees "✓ ลงนามแล้ว" text | Sees drawn signature image + "✓ ลงนามแล้ว" |
| Print preview | No signature image | Shows signature image |
| PDF export | No signature image | Shows signature image |
Bug 2: Position Field Not Saved
| Scenario | Before | After |
|---|---|---|
| Type position BEFORE signing | Saved (signing triggers full write) | Saved |
| Type position AFTER signing | Lost (no save trigger) | Saved (field change triggers auto-save) |
| Edit name after signing | Lost | Saved |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Contractor: Sign with canvas drawing → Reload page → Signature image still visible | ⌛ Pending |
| 2 | Contractor: Type position after signing → Navigate away → Come back → Position is saved | ⌛ Pending |
| 3 | Contractor: Edit name after signing → Navigate away → Come back → Name is saved | ⌛ Pending |
| 4 | Work Owner: View contractor-signed form → See signature image + position + name | ⌛ Pending |
| 5 | Print preview → Signature image appears in contractor signature section | ⌛ Pending |
| 6 | PDF export → Signature image rendered in contractor signature section | ⌛ Pending |
| 7 | Backward 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
| Action | Before | After |
|---|---|---|
| Create new JSA | Only "สร้างใหม่" (Create New) button | Both "สร้างใหม่" and "สร้างจาก Template" options |
| Select template | Not available | Opens template selection dialog |
| Create from template | Not available | Pre-fills JSA with template data (hazards, controls, general practices) |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Open JSA Preparation task → See "Create from Template" option | ⌛ Pending |
| 2 | Click "Create from Template" → Template list appears | ⌛ Pending |
| 3 | Select template → JSA created with template data pre-filled | ⌛ Pending |
| 4 | Verify template data (hazards, controls, general practices) copied correctly | ⌛ Pending |
| 5 | Edit 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
| Action | Before | After |
|---|---|---|
| JSA form toolbar | No template save option | "บันทึกเป็น Template" button available |
| Save as template | Not available | Saves current JSA data as a new JSA template |
| Saved template | - | Available in "Create from Template" for future JSAs |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Open JSA form → See "Save as Template" button in toolbar | ⌛ Pending |
| 2 | Click "Save as Template" → Template saved successfully | ⌛ Pending |
| 3 | Create new JSA → "Create from Template" → Verify saved template appears in list | ⌛ Pending |
| 4 | Verify 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.
| View | Command Buttons |
|---|---|
| Document list | Hidden |
| Active workflow document (e.g., JSA form) | Visible |
| Other workflow document (e.g., Project Registration) | Hidden |
| Reference document | Hidden |
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 byjsa-form.component.tsreview-task-document.component.ts(909 lines) - replaced bydocument-container.component.ts
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | JSA Preparation: Click Project Registration (locked) → Command buttons hidden | ⌛ Pending |
| 2 | JSA Preparation: Click JSA form → Command buttons visible | ⌛ Pending |
| 3 | Tool List Preparation: Click Project Registration (locked) → Command buttons hidden | ⌛ Pending |
| 4 | Read-only fields show gray background + dashed border | ⌛ Pending |
| 5 | Signature dialog: Simple password-only flow, no canvas section | ⌛ Pending |
| 6 | JSA Template: General practices show green check icons | ⌛ Pending |
| 7 | JSA 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
| Form | Before | After |
|---|---|---|
| JSA | 9 fields (inline HTML) | 9 fields (shared component) |
| Tool List | 4 fields | 9 fields (shared component) |
| Manpower Name List | 4 fields | 9 fields (shared component) |
Project Info Fields
| # | Field | Description |
|---|---|---|
| 1 | บริษัทผู้รับเหมา | Contractor name |
| 2 | ชื่อโครงการ | Project name |
| 3 | สถานที่ปฏิบัติงาน | Work location (area code + name) |
| 4 | หน่วยงานเจ้าของพื้นที่ | Area owner department |
| 5 | ระยะเวลาทำงาน | Work duration (days) |
| 6 | เลขที่ PO | Purchase Order number |
| 7 | เลขที่ PR | Purchase Requisition number |
| 8 | วันเริ่มงาน | Start date |
| 9 | วันสิ้นสุดงาน | End date |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | New Tool List task → Open form → All 9 project fields displayed | ⌛ Pending |
| 2 | New Manpower Name List (Work Permit) → Open form → All 9 project fields displayed | ⌛ Pending |
| 3 | JSA form → Project info looks the same as before | ⌛ Pending |
| 4 | Existing 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 Type | Before | After |
|---|---|---|
| จัดเตรียม JSA | Shows "(อยู่ระหว่างพัฒนา อาจพบข้อผิดพลาด)" | No warning note |
| การขอใบอนุญาตทำงาน | Shows "(อยู่ระหว่างพัฒนา อาจพบข้อผิดพลาด)" | Still shows warning (unchanged) |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Open create task dialog → JSA option has no orange warning text | ⌛ Pending |
| 2 | Open 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
| Workflow | Before | After |
|---|---|---|
| Tool List (รายการเครื่องมือ) | Blocked if one active task exists for the project | Multiple active tasks allowed |
| JSA (จัดเตรียม JSA) | Blocked if one active task exists | Unchanged — still one per project |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Create Tool List for project that already has an active Tool List → Task created successfully (no blocking dialog) | ⌛ Pending |
| 2 | Create JSA for project that already has an active JSA → Blocking dialog still appears | ⌛ Pending |
| 3 | Create 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
| Area | Current | Expected |
|---|---|---|
| Approval status | No indication | Show who approved, who hasn't |
| Progress visibility | Users don't know others' status | Badge or indicator per reviewer |
| Notification | Email sent on completion | Consider partial approval notification |
What to Test / Feedback Requested
| # | Question | Status |
|---|---|---|
| 1 | Should approval badges show per-reviewer status (like Work Permit prototype)? | ⌛ Pending feedback |
| 2 | Should the first approver see a confirmation message showing their approval was recorded? | ⌛ Pending feedback |
| 3 | Should partial approval send notification to the remaining reviewer? | ⌛ Pending feedback |
| 4 | Any 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 Case | Status |
|---|---|---|
| 1 | Workspace Owner opens WP approval → See "System Isolate Completed" checkbox | ⌛ Pending |
| 2 | Checkbox unchecked → Approve button disabled | ⌛ Pending |
| 3 | Check 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 Case | Status |
|---|---|---|
| 1 | Clear browser cache → Open training schedule → Page loads correctly | ⌛ Pending |
| 2 | If 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
| Scenario | Before | After |
|---|---|---|
| Approve before session date | Allowed | Blocked with error message |
| Approve on or after session date | Allowed | Allowed |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Select attendees from a future training session → Click approve → Error message shown | ⌛ Pending |
| 2 | Select attendees from a past/today training session → Click approve → Approval succeeds | ⌛ Pending |
| 3 | Bulk 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
| Filter | Location | Tab |
|---|---|---|
| Company (บริษัท) | Tools → Training | อนุมัติผลอบรม (Approve Training Results) |
| Date range (From/To) | Tools → Training | รอบอบรม (Training Sessions) |
| Status | Tools → Training | รอบอบรม (Training Sessions) |
| Training Schedule | Tools → Training | รอบอบรม (Training Sessions) |
What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Open Training → Approve Training Results tab → Company filter works | ✅ Already working |
| 2 | Open Training → Training Sessions tab → Date filters work | ✅ Already working |
Summary
| # | Feature | Type | Status |
|---|---|---|---|
| 1 | PR# Search UX Simplification | Enhancement | ✅ Done |
| 2 | My Tasks & Project Settings Bug Fixes | Bug Fix | 🔍 In Review |
| 3 | Validate Purchasing Info Before Submit to Contractor | Bug Fix | ✅ Done |
| 4 | Signature Visibility & Missing Job Title | Bug Fix | ✅ Done |
| 5 | JSA from Template | Enhancement | ✅ Done |
| 6 | Save as Template for JSA | Enhancement | ✅ Done |
| 7 | JSA Preparation Workflow - Internal Improvements | Enhancement | 🔍 In Review |
| 8 | Shared Project Info Section | Enhancement | 🔍 In Review |
| 9 | Remove JSA "In Development" Note | Enhancement | 🔍 In Review |
| 10 | Allow Multiple Tool List Submissions | Enhancement | ✅ Done |
| 11 | Co-Review / Co-Approve UX Improvement | Improvement | ⌛ Pending |
| 12 | System Isolate Completed Checkbox for WP Approval | Enhancement | ⌛ Pending |
| 13 | Training Schedule Blank Page | Bug Fix | ⌛ Awaiting Info |
| 14 | Company and Date Filters for Training | Enhancement | ✅ Already Implemented |
| 15 | Block Approval Before Training Date | Bug Fix | 🔍 In Review |
Key Changes:
- Simplified pre-create dialog (search first, create inline if not found)
- Work Owner can optionally enter PR No. (pre-filled from search)
- Full form allows WO to edit PR No. with type-to-search
- Purchasing remains the verification layer for all accounting values
- Fixed task duplicate display, search dialog stale results, and project settings save issues
- Added 3-layer validation architecture for workflow commands (pre-validation, post-frontend, backend)
- Fixed signature drawing persistence and position field save triggers
- Contractor can create JSA from existing templates
- Contractor can save new JSA as template for future reuse
- Command buttons hidden when viewing documents from other workflows
- Improved read-only field styling, signature dialog simplification, and JSA form layout
- Shared project info component: all downstream forms show 9 fields (was 4 for Tool List & Manpower)
- Removed "In development" warning from JSA Preparation task type
- Allow multiple Tool List tasks per project (JSA keeps one-per-project restriction)
- Co-review/co-approve works but needs UX improvement — pending feedback on approval status visibility
- System Isolate Completed checkbox for WP approval — pending (part of Work Permit workflow)
- Training schedule blank page — cannot reproduce, awaiting reporter info (cache/console errors)
- Company and date filters for training — already implemented, no changes needed
- Block training approval before session date — backend validation added