Skip to main content

Service Report #013 In Review

Date: 2026-02-11


MoM 2026-02-11 — JSA, Tool List & Signature Improvements

This report covers 18 issues from MoM 2026-02-11 (#374). Improvements span JSA Preparation, Tool List Preparation, digital signatures, and notification workflows.

Feature Overview

#FeaturePR/IssueTypeStatus
1Prevent backdating start date and inspection date#376Enhancement Done
2Contractor: Allow editing digital signatures#377Enhancement Done
3Email notification mismatch on project approval#378Bug Fix Done
4JSA submission must be from main page#379Enhancement Done
5Must approve all JSA documents before approving task#380Enhancement Done
6Remove JSA rejection button#381Enhancement Done
7JSA read-only view with comment area for WO/SO#382Enhancement Done
8Auto-fill signature from personal settings#383Enhancement Done
9Remove Workspace Owner from JSA workflow#384Enhancement Done
10Co-approval status via signature fields#385Enhancement Done
11Save completed JSA as personal template#386Enhancement Done
12Admin: Configure work hours setting#387Enhancement Done
13Default tool inspection time to work start time#388Enhancement Done
14Lock issue date and change trash icon to black#389Enhancement Done
15Tool inspection: Auto-fill date on Pass, remark on Fail#390Enhancement Done
16Remove reject button from tool list#391Enhancement Done
17WO: Signature auto-fill follows personal settings#392Enhancement Done
18Remove tool list requirement from WP#393Enhancement🔍 In Review
19Force read-only on completed tasksBug Fix🔍 In Review
20Digital signature behavior by roleEnhancement🔍 In Review
21Workflow status labels consistencyEnhancement🔍 In Review
22Work Permit requires approved JSAEnhancement🔍 In Review
23Project selection shows related task statusEnhancement🔍 In Review
24My Tasks: collapsible sub-categories and icon fixBug Fix🔍 In Review
25System Settings: tab layout and timepickerEnhancement🔍 In Review
26Document-Level Approval for JSA reviewEnhancement🔍 In Review

1. Prevent backdating start date and inspection date

Issue: #376 Thai Name: ไม่ควรย้อนหลังวันที่เริ่มงานและวันที่นัดตรวจเครื่องมือ

MoM Quote: Item 1

"ไม่ควรย้อนหลังได้ — จัดซื้อ: วันที่เริ่มไม่ควรย้อนหลังได้ / ผู้รับเหมา: วันที่นัดตรวจเครื่องมือ ไม่ควรย้อนหลังได้"

Description: Two date fields should not allow past dates:

  1. Purchasing role: Project start date cannot be set in the past
  2. Contractor role: Tool inspection appointment date cannot be set in the past

Location:

  • My Tasks → Project Registration → Purchasing info → Start date
  • My Tasks → Tool List Preparation → Tool inspection appointment date

What to Test

#Test CaseStatus
1Purchasing edits project start date → Cannot select past dates Pending
2Contractor sets tool inspection date → Cannot select past dates Pending
3Future dates can still be selected normally Pending

2. Contractor: Allow editing digital signatures

Issue: #377 Thai Name: ผู้รับเหมา ให้แก้ไขลายเซ็นได้

MoM Quote: Item 2

"ผู้รับเหมา ให้แก้ไขลายเซ็นได้"

Description: Previously, once a signature was placed, it could not be changed even if the form was still editable. Now, clicking on an already-signed signature field while the form is editable opens the signature dialog to allow re-signing. This applies to both single signature fields and signature grids (4-signature layouts).

Location: My Tasks → Any form with signature fields (Tool List, Work Permit, etc.)

What to Test

#Test CaseStatus
1Contractor signs a field → Signature appears with name and date Pending
2Click on already-signed field (while form editable) → Dialog opens to re-sign Pending
3Re-sign with new signature → Old signature replaced Pending
4After form submission → Signature is locked (no editing) Pending
5Signature grid (4 signatures) → Same re-sign behavior works Pending

3. Email notification mismatch on project approval

Issue: #378 Thai Name: ความแตกต่างของข้อความแจ้งเตือนผ่านอีเมลกับแจ้งเตือนในแอป

MoM Quote: Item 3

"SR: เจ้าของงาน: ความแตกต่างของข้อความ แจ้งเตือนผ่านอีเมล กับ แจ้งเตือนผู้รับเหมาเมื่ออนุมัติโครงการ"

Description: Email notifications were using the wrong templates for different workflow types. JSA approval was using the project-approved template, Work Permit had no email template at all, and Training Enrollment was also using the wrong template. Each workflow type now has its own dedicated email template with correct messaging.

Location: Email inbox + In-app notifications (bell icon)

Behavior

WorkflowEmail TemplateSubject
Project Registrationproject-approvedProject Approved
Tool Listtool-list-approvedTool List Approved
JSAjsa-approvedJSA Approved
Work Permitwork-permit-approved (new)Work Permit Approved
Trainingtraining-approvedTraining Enrollment Approved

What to Test

#Test CaseStatus
1Approve JSA → Email says "JSA Approved" (not "Project Approved") Pending
2Approve Work Permit → Email notification received with correct template Pending
3Approve Training → Email says "Training Enrollment Approved" Pending
4In-app notification matches email content for each workflow type Pending

4. JSA submission must be from main page

Issue: #379 Thai Name: ผู้รับเหมา: การส่ง JSA ต้องส่งจากหน้าหลัก

MoM Quote: Item 4

"ผู้รับเหมา: การส่ง JSA ต้องส่งจากหน้าหลัก เนื่องจาก 1 งานจะมี JSA ชุดเดียวแต่มีหลายแบบได้"

Description: All workflow commands (Submit, Approve, Request Change, Cancel) are available on the document list page (main page). Since one task has one JSA set with multiple forms, managing the workflow from the main page makes more sense. During the review state, individual JSA documents must be approved before executing the workflow-level Approve command (see item 26).

Location: My Tasks → JSA Preparation task → Document list (main page)

What to Test

#Test CaseStatus
1Open JSA task as contractor → See Submit button on document list page Pending
2Click Submit from document list → JSA is submitted for review Pending
3Open JSA task as WO/SO reviewer → See Approve / Request Change buttons on document list page Pending

5. Must approve all JSA documents before approving task

Issue: #380 Thai Name: เจ้าของงาน/จป: ต้องอนุมัติเอกสาร JSA ทุกรายการก่อนอนุมัติงาน

MoM Quote: Item 5

"เจ้าของงาน/จป: 6.1 ต้องเข้าไปดู JSA ทุกอันถึงจะอนุมัติได้ / 6.2 ถ้าจะปฏิเสธหรือแก้ไข ไม่จำเป็นต้องดูทั้งหมด"

Description: Upgraded from view-tracking to formal document-level approval (see item 26):

  1. WO/SO must individually approve each JSA document using the approve button on each document's toolbar
  2. Clicking the workflow-level "Approve JSA" button without approving all documents shows an error dialog with a count (e.g., "อนุมัติแล้ว 1 จาก 3 รายการ")
  3. Request Change and Cancel commands do NOT require approving all documents
  4. JSA forms are read-only during the review state — reviewers can only view and approve
  5. WO and SO each approve independently (co-review)

Location: My Tasks → JSA Preparation task → Review state (WO/SO)

What to Test

#Test CaseStatus
1Open JSA form as WO → Form is read-only, approve button visible on toolbar Pending
2Click approve button → Document approved, button changes to green "อนุมัติแล้ว" Pending
3Document list → Approved JSA has green background/border Pending
4Click "Approve JSA" without approving all → Error dialog shows count Pending
5Approve all JSA documents → Click "Approve JSA" → Proceeds to confirmation Pending
6Request Change button → Available without approving all documents Pending
7SO opens same task → Must approve independently from WO Pending
8After Request Change → All approvals cleared, reviewer must re-approve Pending

6. Remove JSA rejection button

Issue: #381 Thai Name: เอาปฏิเสธ JSA ออก

MoM Quote: Item 6

"เอาปฏิเสธ JSA ออก"

Description: Remove the JSA rejection button from the Safety Officer review state. Only Approve and Request Change should remain.

Location: My Tasks → JSA Preparation task → SO review state

What to Test

#Test CaseStatus
1Open JSA as SO reviewer → No "Reject" button visible Pending
2Approve and Request Change buttons still work normally Pending

7. JSA read-only view with comment area for WO/SO

Issue: #382 Thai Name: เจ้าของงาน/จป: JSA เป็น read-only ให้เพิ่มพื้นที่คอมเม้น

MoM Quote: Item 7

"เจ้าของงาน / จป : JSA จะเป็นเห็นแบบ read only ให้เพิ่มพื้นที่คอมเม้นด้านล่าง คล้ายระบบ Note"

Description: When WO/SO views a JSA in review state, the form is read-only. A comment area should be visible at the bottom for adding review notes.

Location: My Tasks → JSA Preparation task → Review state → JSA form (WO/SO view)

What to Test

#Test CaseStatus
1Open JSA as WO/SO reviewer → Form fields are read-only Pending
2Comment section visible at bottom of JSA form Pending
3Can add a comment → Comment saved and visible Pending

8. Auto-fill signature from personal settings

Issue: #383 Thai Name: บุคคลภายใน: ตั้งลายเซ็นในข้อมูลส่วนบุคคลและนำมาเติมอัตโนมัติ

MoM Quote: Item 8

"เจ้าของงาน/จป/พท: ถือว่าเป็นบุคคลภายในหน่วยงาน ให้มีระบบตั้งลายเซ็นในข้อมูลส่วนบุคคล เเละนำมาเติมในฟอร์มต่างๆอัตโนมัติ ไม่ต้องกรอกรหัสผ่านทุกครั้ง"

Description: Internal staff (WO, SO, WAO) can save their personal signature in Profile Settings. When signing any document, the saved signature auto-loads onto the canvas and password verification is skipped. Contractors must always verify with password. The "Use saved signature" button is also available for manual loading.

Location:

  • Profile Settings → ลายมือชื่อส่วนตัว (save signature)
  • Any form with signature fields → Signature dialog (auto-fill)

Behavior

User TypeSaved SignaturePasswordAuto-fill
Internal staff (WO, SO, WAO)Yes → skip passwordNot requiredSignature auto-loads on dialog open
Internal staff (no saved)Draw manuallyRequiredNo auto-fill
ContractorDraw manuallyAlways requiredNo auto-fill

What to Test

#Test CaseStatus
1Save signature in Profile Settings → Signature appears with saved date Pending
2WO/SO/WAO opens signature dialog → Saved signature auto-loads, password hidden, green banner shown Pending
3Check confirmation checkbox → Click Sign → Signed without password Pending
4Clear canvas → Draw new signature → Password field reappears Pending
5Contractor opens signature dialog → No auto-fill, password required Pending
6First-time dialog open (fresh login) → Signature still auto-loads (no timing issue) Pending

9. Remove Workspace Owner from JSA workflow

Issue: #384 Thai Name: เจ้าของพื้นที่: ยังไม่เกี่ยวข้องกับ JSA ให้ตัดออก

MoM Quote: Item 9

"เจ้าของพื้นที่: ยังไม่เกี่ยวข้องกับ JSA ให้ตัดออก"

Description: Workspace Owner (WAO) role is removed from the JSA workflow entirely — both workflow commands and signature field.

Location: My Tasks → JSA task → JSA document → Signatures section

Changes

AreaBeforeAfter
Workflow commandsWAO had no commandsNo change (already correct)
Signature section4 fields: ผู้จัดทำ, ผู้อนุมัติ, เจ้าของพื้นที่, ผู้ควบคุมงาน3 fields: ผู้จัดทำ (ผู้รับเหมา), ผู้อนุมัติ (เจ้าหน้าที่ความปลอดภัย), ผู้อนุมัติ (เจ้าของงาน)
Layout4 equal columns4 columns: Contractor (col 1), empty (col 2), SO (col 3), WO (col 4)

What to Test

#Test CaseStatus
1JSA workflow does not assign any tasks to Workspace Owner🔍 In Review
2JSA signature section shows 3 signatures (no WAO) Pending
3Contractor signature on the left, SO and WO on the right Pending
4Labels show role names: ผู้อนุมัติ (เจ้าหน้าที่ความปลอดภัย), ผู้อนุมัติ (เจ้าของงาน) Pending

10. Co-approval status via signature fields

Issue: #385 Thai Name: อนุมัติร่วม: ดูสถานะการอนุมัติแต่ละตำแหน่งจากช่องลายเซ็น

MoM Quote: Item 10

"เจ้าของงาน/จป : กรณีอนุมัติร่วมทุกครั้ง จะมีวิธีการใดทราบว่าแต่ละส่วนตำแหน่งอื่นอนุมัติเเล้ว ถ้าทำตามข้อ 9 ดูที่ช่องลายเซ็นได้หรือไม่"

Description: During co-approval, each role's approval status should be visible via the signature fields. Once a role approves (and their signature is filled), other approvers can see who has already signed.

Location: My Tasks → Any task with co-approval → Signature section

What to Test

#Test CaseStatus
1WO approves → Signature appears in WO field Pending
2SO opens same task → Can see WO's signature already filled Pending
3SO approves → Both signatures visible Pending

11. Save completed JSA as personal template

Issue: #386 Thai Name: เจ้าของงาน: JSA ที่เสร็จแล้วให้มีปุ่มบันทึกต้นแบบของฉัน

MoM Quote: Item 11

"เจ้าของงาน: JSA ในงานที่เสร็จสิ้นเเล้ว ต้องแก้ไขไม่ได้ แต่ ให้มีปุ่มบันทึกต้นแบบของฉัน"

Description: When viewing a completed JSA task, the form is read-only but a "Save as Template" button is available for Contractor, Work Owner, and Safety Officer to save the JSA as a reusable template. Contractor saves as a Contractor template; WO and SO save as System templates. Additionally, Work Owner now has access to the JSA Template settings page (เครื่องมือ → ต้นแบบ JSA) for full template management.

Location:

  • My Tasks → Completed JSA task → JSA form → "บันทึกเป็นต้นแบบ" button
  • เครื่องมือ → ต้นแบบ JSA (now available for WO)

Behavior

RoleSave as TemplateTemplate TypeJSA Template Settings
ContractorYesContractor templateYes (own templates)
Work OwnerYesSystem templateYes (system templates)
Safety OfficerYesSystem templateYes (system templates)

What to Test

#Test CaseStatus
1Open completed JSA as WO → Form is read-only, "Save as Template" button visible Pending
2Open completed JSA as Contractor → "Save as Template" button visible Pending
3Open completed JSA as SO → "Save as Template" button visible Pending
4WO clicks "Save as Template" → Template saved successfully Pending
5Contractor clicks "Save as Template" → Template saved successfully Pending
6WO opens เครื่องมือ → ต้นแบบ JSA → Page loads (no redirect) Pending
7WO can edit, create, and remove system templates Pending
8New JSA task → Can select saved template Pending

12. Admin: Configure work hours setting

Issue: #387 Thai Name: System Admin: ตั้งค่าเวลางาน

MoM Quote: Item 12

"system admin ให้ตั้งค่าเวลางานได้ เช่นเริ่ม 8.00-17.00"

Description: System administrators can configure work hours (start time and end time) in system settings. The settings page uses a tab layout for scalability: "ทั่วไป" (General) tab for regional settings and "เวลาทำงาน" (Work Hours) tab for work hours. Time inputs use Angular Material Timepicker with 30-minute intervals.

Location: เครื่องมือ → ตั้งค่าระบบ → แท็บ "เวลาทำงาน"

What to Test

#Test CaseStatus
1Admin opens system settings → Two tabs visible: "ทั่วไป" and "เวลาทำงาน" Pending
2Click "เวลาทำงาน" tab → Work hours section visible with time pickers Pending
3Set start time to 08:00 and end time to 17:00 → Click Save → Saved Pending
4Refresh page → Values persist Pending
5Click time picker → Options list opens → Click outside → List closes Pending

13. Default tool inspection time to work start time

Issue: #388 Thai Name: ผู้รับเหมา: เวลานัดตรวจเครื่องมือให้เป็นเวลาเริ่มงานเป็นค่าเริ่มต้น

MoM Quote: Item 13

"ผู้รับเหมา: เวลานัดตรวจเครื่องมือให้เป็นเวลาเริ่มงานเป็นค่าเริ่มต้น"

Description: When contractor opens the tool list form, the time picker shows the configured work start time as the default. When picking an appointment date for the first time, the time is automatically set to the work start time. Contractor can still override the time.

Location: My Tasks → Tool List Preparation → วัน/เวลานัดตรวจ

What to Test

#Test CaseStatus
1Admin sets work hours to 09:00-18:00 → Open tool list as contractor → Time picker shows 09:00 Pending
2Pick appointment date → Time auto-fills with work start time Pending
3Contractor changes the time to a different value → Saved Pending
4Change date after time is set → Existing time preserved (not reset) Pending

14. Lock issue date and change trash icon to black

Issue: #389 Thai Name: ผู้รับเหมา: ออกวันที่ต้องแก้ไขไม่ได้ และไอคอนถังขยะเปลี่ยนเป็นสีดำ

MoM Quote: Item 14

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

Description: In the tool list:

  1. Issue date (ออกวันที่) field should be read-only for contractors
  2. Trash/delete icon should be black instead of gray

Location: My Tasks → Tool List Preparation → Tool items table

What to Test

#Test CaseStatus
1Open tool list as contractor → Issue date field is read-only Pending
2Trash icon is black (not gray) Pending
3Trash icon still works to delete the item Pending

15. Tool inspection: Auto-fill date on Pass, remark on Fail

Issue: #390 Thai Name: เจ้าของงาน: ตรวจเครื่องมือ Pass จะออกวันที่ ณ ตอนนั้น / Fail ให้แก้ไข remark ได้

MoM Quote: Item 15

"เจ้าของงาน: ตรวจเครื่องมือถ้ากด Pass จะออกวันที่ ที่ ณ ตอนนั้น (แต่ยังสามารถแก้ไขเปลี่ยนได้) ถ้ากด Fail ไม่ขึ้นวันที่ในช่อง ออกวันที่ เเลให้แก้ไข remark ได้"

Description: When Work Owner inspects tools:

  • Pass: Auto-fill issue date with current date (still editable)
  • Fail: Clear issue date, show remark field for comments

Location: My Tasks → Tool List Preparation → Review state (WO) → Tool inspection

What to Test

#Test CaseStatus
1Mark tool as Pass → Issue date auto-fills with today's date Pending
2Pass date is still editable (can change to different date) Pending
3Mark tool as Fail → Issue date is cleared Pending
4Fail → Remark field becomes editable Pending
5Change from Pass to Fail → Date cleared, remark shown Pending

16. Remove reject button from tool list

Issue: #391 Thai Name: เจ้าของงาน: รายการเครื่องมือปุ่มปฏิเสธนำออก

MoM Quote: Item 16

"เจ้าของงาน: รายการเครื่องมือปุ่ม ปฏิเสธ นำออก"

Description: Remove the Reject button from the Tool List review state. Only Approve and Request Change should remain.

Location: My Tasks → Tool List Preparation → WO review state

What to Test

#Test CaseStatus
1Open tool list as WO reviewer → No "Reject" button visible Pending
2Approve and Request Change buttons still work normally Pending

17. WO: Signature auto-fill follows personal settings

Issue: #392 Thai Name: เจ้าของงาน: ลายเซ็นยึดตามข้อ 9 (ตั้งค่าส่วนบุคคล)

MoM Quote: Item 17

"เจ้าของงาน : ลายเซ็นยืดตามข้อ 9"

Description: Same behavior as #383 — applies to Work Owner specifically. When WO signs any approval form (Tool List inspection, JSA approval, etc.), the saved personal signature auto-loads and password is skipped. WO only needs to check the confirmation checkbox and click Sign.

Location: My Tasks → Tool List / JSA approval → Signature fields → Signature dialog

What to Test

#Test CaseStatus
1WO has saved signature → "Use saved signature" appears in dialog Pending
2Click "Use saved signature" → Signature loaded → Verify with password → Signed Pending

18. Remove tool list requirement from WP

Issue: #393 Thai Name: ผู้รับเหมา: ตอนขอ WP ไม่ต้องมีรายการเครื่องมือ

MoM Quote: Item 18

"ผู้รับเหมา: ตอนขอ WP ไม่ต้องมีรายการเครื่องมือ (จะเป็นการตรวจสติ๊กเกอร์หมดอายุที่ตัวเครื่องมือ โดยสติ๊กเกอร์นี้ติดไว้ตอนตรวจเครื่องมือ)"

Description: Work Permit request does not require a completed tool list. The tool sticker check is done physically on the equipment itself. Already verified: no tool list prerequisite check exists in TaskLifecycleService.cs.

Location: My Tasks → Create Work Permit task

What to Test

#Test CaseStatus
1Create WP without completed tool list → Allowed🔍 In Review

Internal Improvements

19. Completed tasks: Force read-only mode on all document forms

Description: When a task is completed, cancelled, or not assigned to the current user, all document forms must be fully read-only. Previously, forms in generic-mode workflows (JSA, Tool List, Project Registration, Training Enrollment) remained editable even after task completion.

Location: All workflows except Work Permit (which already had correct behavior)

Root Cause: generic-task-document.component.ts always returned { canEdit: true, isLocked: false } regardless of task status.

Fix: Form permissions now respect the task's editability state (checks task status, assignee, and workflow terminal state).

Affected Workflows

WorkflowFormsBeforeAfter
JSA PreparationJSA FormEditable on completed tasksRead-only
Tool List PreparationTool List, Manpower Name ListEditable on completed tasksRead-only
Project RegistrationProject Registration, Pre-Work ProceduresEditable on completed tasksRead-only
Training EnrollmentTraining Enrollment FormEditable on completed tasksRead-only
Work Permit RequestAll permit formsAlready correctNo change

What to Test

#Test CaseStatus
1Open completed JSA task → All fields read-only Pending
2Open completed Tool List task → All fields read-only Pending
3Open completed Project Registration → All fields read-only Pending
4Open active task as non-assignee → Forms read-only Pending

20. Digital signature behavior by role

Description: Summary of digital signature behavior across all user types. Internal staff (WO, SO, WAO) get auto-populated signatures with no password required. Contractors can save signatures but must click to insert and always verify with password.

Location: All forms with signature fields → Signature dialog

Behavior by Role

Internal Staff (WO, SO, WAO)Contractor
Save signature in ProfileYesYes
Auto-populate on dialog openYes (automatic)No
"ใช้ลายมือชื่อที่บันทึกไว้" buttonYes (but not needed — already auto-loaded)Yes — must click manually to insert
PasswordSkipped (when using saved signature)Always required
"บันทึกเป็นลายมือชื่อส่วนตัว" checkboxYes (when drawing new)Yes (when drawing new)

What to Test

#Test CaseStatus
1WO opens signature dialog → Saved signature auto-loads, no password field Pending
2SO opens signature dialog → Same auto-load behavior as WO Pending
3Contractor opens signature dialog → No auto-load, password required Pending
4Contractor clicks "ใช้ลายมือชื่อที่บันทึกไว้" → Signature inserted, password still required Pending
5Internal staff clears canvas → Draws new signature → Password field reappears Pending

21. Workflow status labels consistency

Description: Standardized workflow status labels across JSA and Tool List workflows for consistency.

Location: My Tasks → Task cards → Status labels

Changes

WorkflowStateBeforeAfter
JSA PreparationSO Reviewจป. ตรวจสอบตรวจสอบร่วม (Co-Review)
JSA PreparationApprovedเสร็จสิ้นอนุมัติแล้ว (Approved)
JSA PreparationCompletedเสร็จสิ้นอนุมัติแล้ว (Approved)
Tool List PreparationApprovedอนุมัติอนุมัติแล้ว (Approved)
Tool List PreparationCompletedเสร็จสิ้นอนุมัติแล้ว (Approved)

What to Test

#Test CaseStatus
1JSA task in SO review state → Shows "ตรวจสอบร่วม" Pending
2Completed JSA task → Shows "อนุมัติแล้ว" (not "เสร็จสิ้น") Pending
3Completed Tool List task → Shows "อนุมัติแล้ว" (not "เสร็จสิ้น") Pending

22. Work Permit requires approved JSA

Description: Work Permit creation now requires an approved JSA for the same project. If JSA is not approved or still in progress, the system blocks WP creation with a specific error message.

Location: My Tasks → Create Task → Work Permit (สร้างงาน → การขอใบอนุญาตทำงาน)

Behavior

JSA StatusWP CreationError Message
No JSA existsBlockedJSA ยังไม่ได้รับการอนุมัติ กรุณาอนุมัติ JSA ก่อนสร้าง Work Permit
JSA in progressBlockedJSA กำลังดำเนินการ กรุณารออนุมัติก่อนสร้าง Work Permit
JSA approved (Closed)Allowed

What to Test

#Test CaseStatus
1Create WP for project with no JSA → Error message shown Pending
2Create WP for project with active JSA → Error message shown Pending
3Create WP for project with approved JSA → Task created successfully Pending

Description: The project selection dialog (used when creating Tool List, JSA, or Work Permit) now shows related task status badges for each project. For Work Permit creation, projects without an approved JSA are visually greyed out and show a warning.

Location: My Tasks → Create Task → Select Project dialog

Behavior

BadgeMeaning
Green badge (e.g., "JSA: อนุมัติแล้ว")Related task is approved
Yellow badge (e.g., "JSA: ตรวจสอบร่วม")Related task is in progress
Red warning textJSA not approved — WP creation blocked

What to Test

#Test CaseStatus
1Open project selection for WP → Projects show JSA/TL status badges Pending
2Project with approved JSA → Selectable, green badge Pending
3Project without approved JSA → Greyed out, shows warning Pending

24. My Tasks: collapsible sub-categories and icon fix

Description: Two improvements to the My Tasks page:

  1. Finished tasks section now has individually collapsible sub-sections (อนุมัติแล้ว, งานที่ถูกปฏิเสธ, งานที่ยกเลิก) with chevron toggle icons
  2. Fixed expansion panel chevron icon not rotating to match expanded/collapsed state (was always pointing down)

Location: My Tasks page → Section headers

Behavior

SectionDefault StateChevron
ต้องดำเนินการAlways expandedNo toggle
รอผู้อื่นดำเนินการCollapsedDown (collapsed) / Up (expanded)
งานที่เสร็จสิ้นแล้วCollapsedDown (collapsed) / Up (expanded)
— อนุมัติแล้วExpanded (when parent open)Down / Up
— งานที่ถูกปฏิเสธCollapsedDown / Up
— งานที่ยกเลิกCollapsedDown / Up

What to Test

#Test CaseStatus
1Expand "รอผู้อื่นดำเนินการ" → Chevron rotates to point UP Pending
2Collapse section → Chevron rotates back to DOWN Pending
3Expand "งานที่เสร็จสิ้นแล้ว" → Sub-sections visible with their own toggles Pending
4Collapse/expand individual sub-sections → Works independently Pending

25. System Settings: tab layout and timepicker

Description: System Settings page reorganized from stacked cards to a tabbed layout. Work hours now use Angular Material Timepicker with 30-minute interval dropdown instead of plain HTML time inputs.

Location: เครื่องมือ → ตั้งค่าระบบ

Changes

AreaBeforeAfter
LayoutTwo stacked cardsTwo tabs: "ทั่วไป" and "เวลาทำงาน"
Time inputPlain HTML <input type="time">Angular Material Timepicker with 30-min intervals
Time selectionManual typingDropdown list (00:00, 00:30, 01:00, ...)

What to Test

#Test CaseStatus
1Open system settings → Two tabs visible Pending
2"ทั่วไป" tab → Regional settings (first day of week) Pending
3"เวลาทำงาน" tab → Time pickers with 30-min intervals Pending
4Select time from dropdown → Value saved correctly Pending

26. Document-Level Approval for JSA review

Description: Replaced the simple view-tracking mechanism (items 4 and 5) with a formal document-level approval system. During the JSA review state, WO/SO must individually approve each JSA document before executing the workflow-level "Approve JSA" command. Approvals are stored in Temporal workflow state and cleared automatically on Request Change.

Location: My Tasks → JSA Preparation task → Review state → Each JSA document

Key Changes

AreaBeforeAfter
Approval mechanismView tracking (open each JSA)Per-document approve button on toolbar
Approve button behaviorDisabled until all viewedAlways clickable, hard validation on click
Visual feedbackNoneGreen background/border on approved documents in list
Form editabilityEditable during reviewRead-only during review (view + approve only)
Approval stateFrontend-only (lost on refresh)Stored in Temporal workflow (persistent)
Co-review (WO + SO)Shared view trackingIndependent approvals per reviewer
On Request ChangeView state clearedAll document approvals cleared

Approve Button States

StateButtonIconStyle
Not approved"อนุมัติเอกสาร"check_circle_outlineGray border
Approved"อนุมัติแล้ว"verifiedGreen border, green background

Hard Validation Dialog

When clicking "Approve JSA" without approving all documents:

  • Title: "ไม่สามารถอนุมัติได้"
  • Message: "กรุณาอนุมัติเอกสาร JSA ทุกรายการก่อนอนุมัติงาน"
  • Count: "อนุมัติแล้ว N จาก M รายการ"

What to Test

#Test CaseStatus
1Open JSA as WO reviewer → Form is read-only (no editing, no add row, no delete) Pending
2Approve button visible on JSA form toolbar (left side) Pending
3Click approve → Button changes to green "อนุมัติแล้ว" Pending
4Click "อนุมัติแล้ว" again → Revokes approval (back to gray) Pending
5Document list → Approved JSA shows green background and bold green left border Pending
6Click "Approve JSA" without all approved → Error dialog with count Pending
7Approve all JSA documents → Click "Approve JSA" → Confirmation dialog opens Pending
8WO approves all + executes Approve → SO opens task → SO must approve independently Pending
9SO sends Request Change → Contractor resubmits → All approvals cleared Pending
10Non-JSA workflows (Project Registration, Tool List) → No approve button on documents Pending

Summary

#FeatureIssueTypeStatus
1Prevent backdating dates#376Enhancement Done
2Contractor edit signatures#377Enhancement Done
3Email notification mismatch#378Bug Fix Done
4JSA submit from main page#379Enhancement Done
5Approve all JSA docs before approve#380Enhancement Done
6Remove JSA rejection#381Enhancement Done
7JSA comments for WO/SO#382Enhancement Done
8Auto-fill signature#383Enhancement Done
9Remove WAO from JSA#384Enhancement Done
10Co-approval status#385Enhancement Done
11Save JSA as template#386Enhancement Done
12Work hours setting#387Enhancement Done
13Default inspection time#388Enhancement Done
14Lock issue date + icon#389Enhancement Done
15Pass/Fail auto-date#390Enhancement Done
16Remove tool list rejection#391Enhancement Done
17WO signature auto-fill#392Enhancement Done
18Remove TL from WP#393Enhancement🔍 In Review
19Force read-only on completed tasksBug Fix🔍 In Review
20Digital signature behavior by roleEnhancement🔍 In Review
21Workflow status labels consistencyEnhancement🔍 In Review
22Work Permit requires approved JSAEnhancement🔍 In Review
23Project selection related task statusEnhancement🔍 In Review
24My Tasks collapsible sub-categories + icon fixBug Fix🔍 In Review
25System Settings tabs + timepickerEnhancement🔍 In Review
26Document-Level Approval for JSA reviewEnhancement🔍 In Review