Incident Management — Góc nhìn end-user
Trang này nhìn domain theo thao tác người dùng, không đi vào code trước.
Staff tạo incident
Staff mở Incident Management (từ admin hoặc Onsite App) và bấm New Incident:
- Chọn loại: Incident / Accident / Illness.
- Nhập ngày giờ, site, course nếu có, severity, title, description, action taken.
- Description tự prefill từ template của loại đã chọn (text editable, không hiện token); sửa tay sẽ không bị ghi đè khi đổi field khác.
- Chọn incident subtype phù hợp với loại đã chọn.
- Cấu hình có cần thông báo customer, acknowledge, signature hay không.
- Thêm attendee bị ảnh hưởng, mô tả riêng, customer-visible note, body marker nếu cần.
- Lưu draft để tiếp tục chỉnh sửa hoặc submit khi đã sẵn sàng.
Form gắn nhãn customer-visible vs internal-only cho từng field:
- Customer-visible: Title, Description, Action Taken; attendee Role, Customer Visible Notes; body marker Body Part, Injury Type, Note, Diagram.
- Internal-only: Created By, Internal Notes (ngay dưới Action Taken), attendee Description — không bao giờ lộ cho customer.
Mở từ Onsite App: entry "Incident" chỉ hiện khi có quyền; list giới hạn theo site do app cung cấp (một site ẩn selector, nhiều site giới hạn lựa chọn); xem/tải/upload attachment chạy ngay trong webview tablet/mobile.
Manager review và approve
Người có quyền full-control xử lý sau khi incident được submit:
| Trạng thái | Hành động thường gặp |
|---|---|
| Submitted | Start Review, Request Changes, Approve, Cancel |
| Under Review | Request Changes, Approve, Cancel |
| Changes Requested | Creator sửa và submit lại |
| Approved | Generate PDF, Send To Customer, Close |
Nếu cần sửa, manager Request Changes kèm comment. Comment được giữ trong history để creator biết cần sửa gì.
Gửi report cho customer
Sau khi incident được Approved, manager có thể:
- Generate PDF report: popup hỏi visibility trước. Bỏ chọn Internal Use Only ⇒ report customer-visible, một PDF mỗi attendee. Chọn Internal Use Only ⇒ chọn tiếp gộp một report (mặc định) hoặc một PDF mỗi attendee.
- Send To Customer: chọn customer contacts cần gửi.
- Chọn delivery channels theo cấu hình/request.
- Checkbox Include PDF report mặc định đã chọn — gắn generated document mới nhất vào acknowledgement; bỏ chọn thì gửi notification không kèm document.
- Gửi report cho customer.
Hệ thống tạo FormAcknowledgement cho contact:
| Contact | Vai trò acknowledgement |
|---|---|
| Primary contact | Có trách nhiệm acknowledge hoặc sign nếu incident yêu cầu. |
| Non-primary contact | Thường là notification-only; nhận tin nhưng không phải người submit acknowledgement. |
Customer xem và xác nhận
Customer vào trang Incidents trong customer portal:
- Thấy danh sách incident thuộc account hiện tại.
- Mở detail bằng acknowledgement id của mình.
- Xem summary, attendee liên quan, ghi chú customer-visible, generated PDF nếu được gắn.
- Bấm acknowledge hoặc ký xác nhận nếu incident yêu cầu signature.
Settings: Description template (full-control)
Settings icon trên trang Incident Management chỉ hiện với full-control. Bấm vào mở template manager:
- Một Description template editable cho mỗi loại (Incident, Accident, Illness), kèm danh sách placeholder được phép chèn.
- Loại chưa lưu ⇒ hiện built-in default; lưu lại ghi template vào blob và set
PrefillBlobNamecho version đang active của loại đó, scope theo Business Unit.
Phản hồi tiến trình khi refresh
Sau mỗi action thành công (thêm/sửa/xóa attendee, upload/xóa attachment, generate PDF, workflow action), UI giữ loading feedback đến khi detail mới được áp dụng — không bắt reload tay, không hiện state cũ như thể đã mới. Mở detail lần đầu vẫn có thể dùng full-page spinner. Nếu mutation thành công nhưng refresh fail, hệ thống báo "đã thành công nhưng chưa refresh được dữ liệu mới" và dừng spinner.
Support/vận hành cần xem gì?
- Incident detail: status hiện tại, attendee, acknowledgement, attachment, generated PDF.
- History timeline: ai tạo/sửa/submit/approve/send/acknowledge/close.
- Notification history: job nào đã tạo, event type nào, recipient và delivery method nào.
- Permissions: user create-only chỉ thấy incident của mình; full-control mới được review/governance action.
Tiếp theo: Khái niệm cốt lõi.