JSA Template Management
Last Updated: 2026-01-06 Status: Complete* Issue: #189
Feature Summary
- Manage JSA (Job Safety Analysis) templates
- System templates (managed by Admin/Safety Officer)
- Contractor templates (managed by Contractors)
- Export to PDF/XLSX matching official form FP-BZ-034
- Import system templates as contractor templates
Role Matrix
| Action | Admin | Safety Officer | Contractor |
|---|---|---|---|
| View all system templates | ✅ | ✅ | ✅ |
| View own templates | N/A | N/A | ✅ |
| Create system template | ✅ | ✅ | ❌ |
| Create own template | ❌ | ❌ | ✅ |
| Edit system template | ✅ | ✅ | ❌ |
| Edit own template | ❌ | ❌ | ✅ |
| Delete system template | ✅ | ✅ | ❌ |
| Delete own template | ❌ | ❌ | ✅ |
| Import system template | ❌ | ❌ | ✅ |
| Export (PDF/XLSX) | ✅ | ✅ | ✅ |
Location
Tools > กำหนดค่า > ต้นแบบ JSA
Template Structure
Each JSA template contains:
| Section | Description |
|---|---|
| Basic Info | Name, work type, description, active status |
| General Practices | Checklist of standard safety practices (ข้อปฏิบัติทั่วไป) |
| Assessment Items | Risk assessment rows with 6 columns |
Assessment Table Columns
| Column | Thai Label |
|---|---|
| Work Area | พื้นที่ทำงาน |
| Work Activity | งานที่จะดำเนินการ |
| Who/What at Risk | ใคร/อะไรที่จะได้รับอันตราย |
| Hazard Type/Source | ลักษณะอันตราย / แหล่งอันตราย |
| Environmental Impact | ผลกระทบสิ่งแวดล้อม |
| Control Measures | วิธีควบคุม/แนวทาง/วิธีการป้องกัน (อุปกรณ์ PPE) |
Export Layout
Exports match official form FP-BZ-034 with:
- Company header + Thai/English titles
- Info section (บริษัทรับเหมา, โครงการ, สถานที่, etc.)
- คำอธิบาย section (3 fixed explanation texts)
- ข้อปฏิบัติทั่วไป (2-column layout with reference numbers)
- Assessment table (6 columns)
- Signature section (4 areas: ผู้จัดทำ, ผู้อนุมัติ, เจ้าของพื้นที่, ผู้ควบคุมงาน)
What to Test
Admin / Safety Officer
- View system templates list
- Create new system template
- Add general practices to template
- Add assessment items to template
- Edit existing system template
- Delete system template
- Export template to PDF
- Export template to XLSX
Contractor
- View all templates (system + own)
- Create own template
- Import system template as own template
- Edit own template
- Delete own template
- Cannot edit/delete system templates
- Export template to PDF
- Export template to XLSX
Export Verification
- PDF uses A4 Landscape
- PDF shows company header placeholder
- PDF shows Thai/English titles
- PDF shows info section with placeholders
- PDF shows คำอธิบาย section (3 items)
- PDF shows ข้อปฏิบัติทั่วไป in 2-column layout
- PDF shows assessment table with 6 columns
- PDF shows signature section (4 areas)
- XLSX has same layout as PDF