From 440f8b036262ac927da36ec8fb6baf78f152d285 Mon Sep 17 00:00:00 2001
From: mahdahar <89adham@gmail.com>
Date: Thu, 5 Feb 2026 11:33:29 +0700
Subject: [PATCH] feat: Add UAT checklist HTML version and enhance report
generation with collection date support
This commit adds a print-friendly HTML version of the UAT checklist and enhances the report generation system with collection date tracking.
New Features:
- Add UAT_GDC_CMOD_Checklist.html with interactive checkboxes and print-friendly layout
- Simplify UAT markdown checklist by removing 'No.' column and refining instructions
Report Generation Enhancements:
- Add collection date tracking to report generation workflow
- ReportController now passes collection date to PDF spooler
- ReportHelper fetches collection date from SP_REQUESTS table via getCollectionDateRaw()
- Node spooler receives collection date parameter for report generation
UI Improvements (content_requests.php):
- Add new 'Result' column showing Ready/Pending status with visual indicators
- Move Print, Generate PDF, and Retry PDF actions from Actions menu to Result dropdown
- Result dropdown shows green 'Ready' for duavalidated requests, yellow 'Pending' otherwise
- Actions appropriately restricted by role and validation status
- Simplify Actions menu by relocating report-related functions
---
UAT_GDC_CMOD_Checklist.html | 195 +++++++++++++
UAT_GDC_CMOD_Checklist.md | 376 +++++++++++++-------------
app/Controllers/ReportController.php | 16 +-
app/Libraries/ReportHelper.php | 13 +-
app/Views/shared/content_requests.php | 108 +++++---
5 files changed, 470 insertions(+), 238 deletions(-)
create mode 100644 UAT_GDC_CMOD_Checklist.html
diff --git a/UAT_GDC_CMOD_Checklist.html b/UAT_GDC_CMOD_Checklist.html
new file mode 100644
index 0000000..1cec36b
--- /dev/null
+++ b/UAT_GDC_CMOD_Checklist.html
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+
๐ UAT (User Acceptance Testing) ๐งช - GDC CMOD Laboratory Management System ๐ฅ
+
+ID Judul Test Case Langkah Utama Expected Result Role Hasil Issue/Jawaban
+๐ฏ ๐ Ready to Test! ๐ Let's Go! โจ Good Luck! ๐ฅ All Roles ๐ Fun! ๐ Notes...
+TC-001 Login Berhasil ๐ Login dengan username & password valid Redirect ke dashboard sesuai role ๐ฏ AUTENTIKASI & SESI ๐ โ
โ
+TC-002 Login Gagal - Username Salah ๐ซ Masukkan username tidak ada Error "Invalid credentials" โ ๏ธ AUTENTIKASI & SESI ๐ โ
โ
+TC-003 Login Gagal - Password Salah ๐
Password salah Error invalid credentials ๐จ AUTENTIKASI & SESI ๐ โ
โ
+TC-004 Login Gagal - Akun Terkunci ๐ Login ke akun locked dari legacy Error "Account locked" ๐ AUTENTIKASI & SESI ๐ โ
โ
+TC-005 Logout Berhasil ๐ Klik menu Logout Session terhapus, redirect ke login โจ AUTENTIKASI & SESI ๐ โ
โ
+TC-006 Redirect ke Login Belum Login ๐ Akses protected page tanpa login Redirect otomatis ke halaman login ๐ช AUTENTIKASI & SESI ๐ก๏ธ โ
โ
+TC-007 Ganti Password Berhasil ๐ Change password baru Password berhasil diubah dan di-hash โ
AUTENTIKASI & SESI ๐ โ
โ
+TC-008 Ganti Password Gagal - Password Lama Salah โ Masukkan password lama salah Error "Invalid old password" ๐ซ AUTENTIKASI & SESI ๐ โ
โ
+TC-009 Role-Based Redirect Login ๐ฅ Login dengan berbagai role Redirect ke dashboard sesuai role ๐ฏ AUTENTIKASI & SESI ๐ญ โ
โ
+TC-010 Tampilkan Semua Request ๐ Login Superuser โ /superuser Tabel requests semua status ditampilkan ๐ SU, ADM, PHLEB, CS โ
โ
+TC-011 Filter by Status ๐๏ธ Pilih status di dashboard filter Filter berfungsi sesuai status ๐ SU โ
โ
+TC-012 Filter by Date Range ๐
Set date1 & date2 โ filter Filter tanggal berfungsi ๐๏ธ SU โ
โ
+TC-013 Search by Patient Name ๐ค Masukkan nama pasien Tampilkan request dengan nama tsb ๐ SU โ
โ
+TC-014 Search by Lab Number ๐ข Masukkan Lab Number Tampilkan request tsb ๐ฏ SU โ
โ
+TC-015 Search by Register Number #๏ธโฃ Masukkan Register Number Tampilkan request tsb ๐ SU โ
โ
+TC-016 Table Sorting โ๏ธ Klik header kolom Kolom di-sort ASC/DESC ๐๐ SU โ
โ
+TC-017 Pagination ๐ Klik halaman berbeda Berpindah halaman dengan benar ๐ SU โ
โ
+TC-018 Tampilkan List User ๐ฅ Access /superuser/users Tabel users ditampilkan lengkap ๐ SU, ADM โ
โ
+TC-019 Buat User Baru โ Add User โ isi form User berhasil dibuat dan password di-hash ๐ SU, ADM โ
โ
+TC-020 Validasi Password Min 3 Karakter ๐ข Buat user dengan password < 3 char Error "Password min 3 karakter" โ ๏ธ SU โ
โ
+TC-021 Update User Role โ๏ธ Edit user โ ubah role Role berhasil diubah ๐ SU โ
โ
+TC-022 Update Password User ๐ Edit user โ ganti password Password di-hash dengan benar ๐ SU โ
โ
+TC-023 Delete User ๐๏ธ Delete user User terhapus dari database ๐๏ธ SU, ADM โ
โ
+TC-024 Tampilkan Request Final โจ Access /superuser/validate Hanya request "Fin" yang tampil โ
SU, ADM, LAB โ
โ
+TC-025 Filter by Date Range Validasi ๐
Set date1 & date2 โ filter Filter berfungsi di halaman validasi ๐ SU โ
โ
+TC-026 First Validation (VAL1) โ
Validasi request "Fin" ISVAL1=1, VAL1USER & VAL1DATE diset ๐ SU, ADM, LAB โ
โ
+TC-027 Second Validation (VAL2) โ
โ
Validasi dengan user berbeda ISVAL2=1, request duavalidated ๐ SU, ADM, LAB โ
โ
+TC-028 Gagal Validasi Sendiri ๐ซ Coba validasi ulang sama user Error "Cannot validate own request" ๐
SU, ADM, LAB โ
โ
+TC-029 Un-Validate Request โฉ๏ธ Un-validate dengan reason ISVAL reset, PENDING diset ๐ SU, ADM โ
โ
+TC-030 Shortcut Keyboard โจ๏ธ Enter=Validate, N=Skip, Esc=Close Shortcut berfungsi dengan benar โก SU โ
โ
+TC-031 Progress Indicator ๐ Buka validation modal Progress muncul (posisi / total) ๐ SU โ
โ
+TC-032 Collect Sample ๐งช Buka dialog sample โ Collect STATUS=1, COLLECTIONDATE & USERID diset โ
SU, ADM, LAB โ
โ
+TC-033 Un-Collect Sample โฉ๏ธ Buka dialog sample โ Un-Collect STATUS di-reset, audit log tercatat ๐ SU, ADM, LAB โ
โ
+TC-034 Un-Receive Sample ๐ Un-receive sample yang received Status berubah, audit log tercatat ๐ SU, ADM, LAB โ
โ
+TC-035 Print Label Individu ๐ท๏ธ Print label per tube Label tercetak dengan ZPL format ๐จ๏ธ SU โ
โ
+TC-036 Print Collection Label ๐ Print collection label Label collection tercetak ๐ท๏ธ SU โ
โ
+TC-037 Print All Labels ๐ Print semua tubes Semua labels tercetak ๐จ๏ธ SU โ
โ
+TC-038 View Request Audit ๐ Buka audit dialog request Audit trail timeline ditampilkan ๐ SU โ
โ
+TC-039 Filter by Category ๐ฏ Filter: All, Validation, Receive, Sample Filter berfungsi sesuai kategori ๐ SU โ
โ
+TC-040 View Report Validated ๐ View report request duavalidated Report ditampilkan lengkap ๐ SU, ADM, LAB, CS โ
โ
+TC-041 Cannot View Not Validated ๐ซ View report belum duavalidated Error: "Validated request required" โ ๏ธ SU โ
โ
+TC-042 Print Report ๐จ๏ธ Print report request validated Print dialog buka, audit log tercatat ๐ SU, ADM, LAB, CS โ
โ
+TC-043 Generate PDF ๐ Generate PDF request validated PDF berhasil di-generate โ
SU, ADM, LAB, CS โ
โ
+TC-044 Preview Report (No Audit) ๐ Preview report tanpa log audit Report tampil, tidak ada audit log ๐ SU โ
โ
+TC-045 English Version Report ๐ฌ๐ง Access /report/{id}/eng Report dalam Bahasa Inggris ๐ฃ๏ธ SU โ
โ
+TC-046 Edit Comment โ๏ธ Edit comment di dashboard Comment berubah tersimpan ๐พ SU โ
โ
+TC-047 Error Handling 404 ๐ซ Akses URL tidak valid Custom notfound page tampil ๐ SU โ
โ
+TC-048 Error Handling Unauthorized ๐ Coba akses role lain Redirect ke /unauthorized ๐ซ SU โ
โ
+TC-049 Filter & Search ๐ Uji berbagai filter dan search Semua berfungsi seperti Superuser โก ADMIN, PHLEB, CS โ
โ
+TC-050 Sample Collection Buttons Enabled โ
Buka dialog sample Tombol Collect/Un-Coll/Un-Recv enabled ๐ ADMIN โ
โ
+TC-051 Edit Comment Enabled โ๏ธ Edit comment dashboard Comment dapat diubah ๐ฌ ADMIN โ
โ
+TC-052 Print Labels ๐ท๏ธ Print individual/collection/all Semua labels tercetak ๐จ๏ธ ADM, LAB, PHLEB โ
โ
+TC-053 View Audit Trail ๐ Buka audit dialog Timeline audit ditampilkan ๐ ADM, LAB, PHLEB, CS โ
โ
+TC-054 Update User ๐ Edit user โ ubah data User berhasil di-update โ
ADMIN โ
โ
+TC-055 Cannot Access Role Lain ๐ซ Coba /superuser, /lab, /phlebo, /cs Redirect ke unauthorized/error โ ADM, LAB, PHLEB, CS โ
โ
+TC-056 Filter Test Code Alphabetical ๐ค Login Lab โ /lab Hanya request TESTS A-Z yang tampil ๐ LAB โ
โ
+TC-057 View Request Details ๐๏ธ Buka request Detail request ditampilkan ๐ LAB โ
โ
+TC-058 Filter & Search dalam Batas Filter ๐ Uji filter & search Sesuai batas test code A-Z โ
LAB โ
โ
+TC-059 Sample Buttons Enabled โ
Buka dialog sample Tombol Collect/Un-Coll/Un-Recv enabled ๐ LAB โ
โ
+TC-060 Edit Comment Disabled ๐ Cek comment field Comment field non-editable ๐ซ LAB, PHLEB, CS โ
โ
+TC-061 Un-Validate Disabled ๐ Coba un-validate Error/Unauthorized - cannot un-validate ๐ซ LAB โ
โ
+TC-062 Sample Collection Disabled ๐ Buka dialog sample Tombol Collect/Un-Coll/Un-Recv DISABLED ๐ซ PHLEB, CS โ
โ
+TC-063 Validation Page Denied ๐ Coba /phlebo/validate Halaman tidak tersedia/unauthorized โ PHLEB, CS โ
โ
+TC-064 View Sample Details (Read-Only) ๐ Buka dialog sample Sample details view-only ๐ PHLEB, CS โ
โ
+TC-065 Cannot View Report ๐ Coba view report Report tidak tersedia/error ๐ซ PHLEB โ
โ
+TC-066 Cannot Print Report ๐จ๏ธโ Coba print report Print tidak tersedia ๐ซ PHLEB โ
โ
+TC-067 Cannot Generate PDF ๐โ Coba generate PDF PDF tidak tersedia ๐ซ PHLEB โ
โ
+TC-068 Print Labels (Limited) ๐ท๏ธ Print labels Labels tercetak sesuai kapasitas ๐จ๏ธ CS โ
โ
+TC-069 User Mgmt Role Restrictions ๐ Lab/Phlebo/CS coba user management API Error unauthorized ๐ซ FITUR CROSS-ROLE ๐ โ
โ
+TC-070 Cross-Role Validation ๐ค Lab A validasi VAL1, Superuser B validasi VAL2 Cross-role validation berhasil โ
FITUR CROSS-ROLE ๐ โ
โ
+TC-071 Un-Validate Role Restrictions ๐ Lab/Phlebo/CS coba un-validate Error unauthorized - only SU/Admin ๐ซ FITUR CROSS-ROLE ๐ก๏ธ โ
โ
+TC-072 Un-Receive Role Restrictions ๐ Lab/Phlebo/CS coba un-receive Error unauthorized - only SU/Admin ๐ซ FITUR CROSS-ROLE ๐ก๏ธ โ
โ
+TC-073 Report Access Restrictions ๐๏ธ Coba view report semua role SU/Admin/Lab/CS OK, Phlebo NOT โ
โ FITUR CROSS-ROLE ๐ โ
โ
+TC-074 Report Validated Requirement โ
โ
View report hanya VAR1 vs duavalidated Hanya duavalidated dapat dilihat ๐ฏ FITUR CROSS-ROLE โ
โ
โ
+TC-075 Comment Edit Restrictions ๐ฌ๐ Lab/Phlebo/CS coba edit comment Error - only SU/Admin editable ๐ซ FITUR CROSS-ROLE โ๏ธ โ
โ
+TC-076 Validasi tidak Pengaruhi Data Lain ๐ก๏ธ Record data sebelum & sesudah validasi Hanya status validasi berubah ๐ FITUR CROSS-ROLE ๐ โ
โ
+TC-077 Un-Validate Mempertahankan Data ๐ Record data sebelum & sesudah un-validate Hanya status validasi berubah ๐ FITUR CROSS-ROLE ๐ โ
โ
+TC-078 Audit Trail Logging ๐ Lakukan berbagai aktivitas Semua tercatat di audit log โ
FITUR CROSS-ROLE ๐ โ
โ
+TC-079 Concurrent Validation โก 2 user buka validation dialog bersamaan Validasi berhasil, tidak conflict โ
FITUR CROSS-ROLE ๐ค โ
โ
+TC-080 Concurrent Sample Collection โก 2 user collect tube berbeda bersamaan Semua berhasil tercatat โ
FITUR CROSS-ROLE ๐งช โ
โ
+TC-081 Session Timeout โฑ๏ธ Tunggu session timeout Redirect ke login ๐ FITUR CROSS-ROLE ๐ โ
โ
+TC-082 Password Hashing Security ๐ Buat user โ cek database Password dalam HASH bukan plain ๐ก๏ธ FITUR CROSS-ROLE ๐ โ
โ
+TC-083 Legacy Read-Only ๐ Cek koneksi & fungsi Firebird Hanya READ dari Firebird, TIDAK WRITE ๐ซโ๏ธ FITUR CROSS-ROLE ๐๏ธ โ
โ
+
+
+
+
diff --git a/UAT_GDC_CMOD_Checklist.md b/UAT_GDC_CMOD_Checklist.md
index b90f420..93d02b9 100644
--- a/UAT_GDC_CMOD_Checklist.md
+++ b/UAT_GDC_CMOD_Checklist.md
@@ -29,23 +29,23 @@
1. Centang checkbox [ ] jika test case LULUS (PASS)
2. Tulis "X" dalam kotak [X] jika test case GAGAL (FAIL)
3. Tambahkan catatan @ kolom "Issue/Jawaban" untuk kasus FAIL/N/A/BLOCKED
-4. Beri nomor urut di "No." untuk tracking
+4. Gunakan ID test case untuk tracking
---
## 3. TEST CASE - AUTENTIKASI & SESI
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-AUTH-001** | Login Berhasil | Login dengan username & password valid | Redirect ke dashboard sesuai role | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-AUTH-002** | Login Gagal - Username Salah | Masukkan username tidak ada | Error "Invalid credentials" | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-AUTH-003** | Login Gagal - Password Salah | Password salah | Error invalid credentials | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-AUTH-004** | Login Gagal - Akun Terkunci | Login ke akun locked dari legacy | Error "Account locked" | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-AUTH-005** | Logout Berhasil | Klik menu Logout | Session terhapus, redirect ke login | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-AUTH-006** | Redirect ke Login Belum Login | Akses protected page tanpa login | Redirect otomatis ke halaman login | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-AUTH-007** | Ganti Password Berhasil | Change password baru | Password berhasil diubah dan di-hash | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-AUTH-008** | Ganti Password Gagal - Password Lama Salah | Masukkan password lama salah | Error "Invalid old password" | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-AUTH-009** | Role-Based Redirect Login | Login dengan berbagai role | Redirect ke dashboard sesuai role | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-AUTH-001** | Login Berhasil | Login dengan username & password valid | Redirect ke dashboard sesuai role | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-AUTH-002** | Login Gagal - Username Salah | Masukkan username tidak ada | Error "Invalid credentials" | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-AUTH-003** | Login Gagal - Password Salah | Password salah | Error invalid credentials | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-AUTH-004** | Login Gagal - Akun Terkunci | Login ke akun locked dari legacy | Error "Account locked" | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-AUTH-005** | Logout Berhasil | Klik menu Logout | Session terhapus, redirect ke login | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-AUTH-006** | Redirect ke Login Belum Login | Akses protected page tanpa login | Redirect otomatis ke halaman login | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-AUTH-007** | Ganti Password Berhasil | Change password baru | Password berhasil diubah dan di-hash | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-AUTH-008** | Ganti Password Gagal - Password Lama Salah | Masukkan password lama salah | Error "Invalid old password" | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-AUTH-009** | Role-Based Redirect Login | Login dengan berbagai role | Redirect ke dashboard sesuai role | [ ] PASS
[ ] FAIL | ___________ |
### Ringkasan Autentikasi: _ LULUS / _____ GAGAL
@@ -55,77 +55,77 @@
### 4.1 DASHBOARD SUPERUSER
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-SU-001** | Tampilkan Semua Request | Login Superuser โ `/superuser` | Tabel requests semua status ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-002** | Filter by Status | Pilih status di dashboard filter | Filter berfungsi sesuai status | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-003** | Filter by Date Range | Set date1 & date2 โ filter | Filter tanggal berfungsi | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-004** | Search by Patient Name | Masukkan nama pasien | Tampilkan request dengan nama tsb | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-005** | Search by Lab Number | Masukkan Lab Number | Tampilkan request tsb | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-006** | Search by Register Number | Masukkan Register Number | Tampilkan request tsb | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-007** | Table Sorting | Klik header kolom | Kolom di-sort ASC/DESC | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-008** | Pagination | Klik halaman berbeda | Berpindah halaman dengan benar | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-SU-001** | Tampilkan Semua Request | Login Superuser โ `/superuser` | Tabel requests semua status ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-002** | Filter by Status | Pilih status di dashboard filter | Filter berfungsi sesuai status | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-003** | Filter by Date Range | Set date1 & date2 โ filter | Filter tanggal berfungsi | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-004** | Search by Patient Name | Masukkan nama pasien | Tampilkan request dengan nama tsb | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-005** | Search by Lab Number | Masukkan Lab Number | Tampilkan request tsb | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-006** | Search by Register Number | Masukkan Register Number | Tampilkan request tsb | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-007** | Table Sorting | Klik header kolom | Kolom di-sort ASC/DESC | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-008** | Pagination | Klik halaman berbeda | Berpindah halaman dengan benar | [ ] PASS
[ ] FAIL | ___________ |
### 4.2 USER MANAGEMENT SUPERUSER
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-SU-009** | Tampilkan List User | Access `/superuser/users` | Tabel users ditampilkan lengkap | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-010** | Buat User Baru | Add User โ isi form | User berhasil dibuat dan password di-hash | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-011** | Validasi Password Min 3 Karakter | Buat user dengan password < 3 char | Error "Password min 3 karakter" | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-012** | Update User Role | Edit user โ ubah role | Role berhasil diubah | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-013** | Update Password User | Edit user โ ganti password | Password di-hash dengan benar | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-014** | Delete User | Delete user | User terhapus dari database | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-SU-009** | Tampilkan List User | Access `/superuser/users` | Tabel users ditampilkan lengkap | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-010** | Buat User Baru | Add User โ isi form | User berhasil dibuat dan password di-hash | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-011** | Validasi Password Min 3 Karakter | Buat user dengan password < 3 char | Error "Password min 3 karakter" | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-012** | Update User Role | Edit user โ ubah role | Role berhasil diubah | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-013** | Update Password User | Edit user โ ganti password | Password di-hash dengan benar | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-014** | Delete User | Delete user | User terhapus dari database | [ ] PASS
[ ] FAIL | ___________ |
### 4.3 VALIDASI SUPERUSER
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-SU-015** | Tampilkan Request Final | Access `/superuser/validate` | Hanya request "Fin" yang tampil | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-016** | Filter by Date Range Validasi | Set date1 & date2 โ filter | Filter berfungsi di halaman validasi | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-017** | First Validation (VAL1) | Validasi request "Fin" | ISVAL1=1, VAL1USER & VAL1DATE diset | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-018** | Second Validation (VAL2) | Validasi dengan user berbeda | ISVAL2=1, request duavalidated | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-019** | Gagal Validasi Sendiri | Coba validasi ulang sama user | Error "Cannot validate own request" | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-020** | Un-Validate Request | Un-validate dengan reason | ISVAL reset, PENDING diset | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-021** | Shortcut Keyboard | Enter=Validate, N=Skip, Esc=Close | Shortcut berfungsi dengan benar | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-022** | Progress Indicator | Buka validation modal | Progress muncul (posisi / total) | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-SU-015** | Tampilkan Request Final | Access `/superuser/validate` | Hanya request "Fin" yang tampil | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-016** | Filter by Date Range Validasi | Set date1 & date2 โ filter | Filter berfungsi di halaman validasi | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-017** | First Validation (VAL1) | Validasi request "Fin" | ISVAL1=1, VAL1USER & VAL1DATE diset | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-018** | Second Validation (VAL2) | Validasi dengan user berbeda | ISVAL2=1, request duavalidated | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-019** | Gagal Validasi Sendiri | Coba validasi ulang sama user | Error "Cannot validate own request" | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-020** | Un-Validate Request | Un-validate dengan reason | ISVAL reset, PENDING diset | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-021** | Shortcut Keyboard | Enter=Validate, N=Skip, Esc=Close | Shortcut berfungsi dengan benar | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-022** | Progress Indicator | Buka validation modal | Progress muncul (posisi / total) | [ ] PASS
[ ] FAIL | ___________ |
### 4.4 SAMPLE MANAGEMENT SUPERUSER
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-SU-023** | Collect Sample | Buka dialog sample โ Collect | STATUS=1, COLLECTIONDATE & USERID diset | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-024** | Un-Collect Sample | Buka dialog sample โ Un-Collect | STATUS di-reset, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-025** | Un-Receive Sample | Un-receive sample yang received | Status berubah, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-026** | Print Label Individu | Print label per tube | Label tercetak dengan ZPL format | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-027** | Print Collection Label | Print collection label | Label collection tercetak | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-028** | Print All Labels | Print semua tubes | Semua labels tercetak | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-SU-023** | Collect Sample | Buka dialog sample โ Collect | STATUS=1, COLLECTIONDATE & USERID diset | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-024** | Un-Collect Sample | Buka dialog sample โ Un-Collect | STATUS di-reset, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-025** | Un-Receive Sample | Un-receive sample yang received | Status berubah, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-026** | Print Label Individu | Print label per tube | Label tercetak dengan ZPL format | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-027** | Print Collection Label | Print collection label | Label collection tercetak | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-028** | Print All Labels | Print semua tubes | Semua labels tercetak | [ ] PASS
[ ] FAIL | ___________ |
### 4.5 AUDIT TRAIL SUPERUSER
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-SU-029** | View Request Audit | Buka audit dialog request | Audit trail timeline ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-030** | Filter by Category | Filter: All, Validation, Receive, Sample | Filter berfungsi sesuai kategori | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-SU-029** | View Request Audit | Buka audit dialog request | Audit trail timeline ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-030** | Filter by Category | Filter: All, Validation, Receive, Sample | Filter berfungsi sesuai kategori | [ ] PASS
[ ] FAIL | ___________ |
### 4.6 REPORT SUPERUSER
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-SU-031** | View Report Validated | View report request duavalidated | Report ditampilkan lengkap | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-032** | Cannot View Not Validated | View report belum duavalidated | Error: "Validated request required" | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-033** | Print Report | Print report request validated | Print dialog buka, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-034** | Generate PDF | Generate PDF request validated | PDF berhasil di-generate | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-035** | Preview Report (No Audit) | Preview report tanpa log audit | Report tampil, tidak ada audit log | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-036** | English Version Report | Access `/report/{id}/eng` | Report dalam Bahasa Inggris | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-SU-031** | View Report Validated | View report request duavalidated | Report ditampilkan lengkap | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-032** | Cannot View Not Validated | View report belum duavalidated | Error: "Validated request required" | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-033** | Print Report | Print report request validated | Print dialog buka, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-034** | Generate PDF | Generate PDF request validated | PDF berhasil di-generate | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-035** | Preview Report (No Audit) | Preview report tanpa log audit | Report tampil, tidak ada audit log | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-036** | English Version Report | Access `/report/{id}/eng` | Report dalam Bahasa Inggris | [ ] PASS
[ ] FAIL | ___________ |
### 4.7 FITUR TAMBAHAN SUPERUSER
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-SU-037** | Edit Comment | Edit comment di dashboard | Comment berubah tersimpan | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-038** | Error Handling 404 | Akses URL tidak valid | Custom notfound page tampil | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-SU-039** | Error Handling Unauthorized | Coba akses role lain | Redirect ke `/unauthorized` | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-SU-037** | Edit Comment | Edit comment di dashboard | Comment berubah tersimpan | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-038** | Error Handling 404 | Akses URL tidak valid | Custom notfound page tampil | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-SU-039** | Error Handling Unauthorized | Coba akses role lain | Redirect ke `/unauthorized` | [ ] PASS
[ ] FAIL | ___________ |
### Ringkasan Superuser: _ LULUS / _____ GAGAL
@@ -135,50 +135,50 @@
### 5.1 DASHBOARD ADMIN
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-ADM-001** | Tampilkan Semua Request | Login Admin โ `/admin` | Tabel requests semua status | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-002** | Filter & Search | Uji berbagai filter dan search | Semua berfungsi seperti Superuser | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-003** | Sample Collection Buttons Enabled | Buka dialog sample | Tombol Collect/Un-Coll/Un-Recv enabled | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-004** | Edit Comment Enabled | Edit comment dashboard | Comment dapat diubah | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-ADM-001** | Tampilkan Semua Request | Login Admin โ `/admin` | Tabel requests semua status | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-002** | Filter & Search | Uji berbagai filter dan search | Semua berfungsi seperti Superuser | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-003** | Sample Collection Buttons Enabled | Buka dialog sample | Tombol Collect/Un-Coll/Un-Recv enabled | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-004** | Edit Comment Enabled | Edit comment dashboard | Comment dapat diubah | [ ] PASS
[ ] FAIL | ___________ |
### 5.2 VALIDASI ADMIN
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-ADM-005** | Tampilkan Request Final | Access `/admin/validate` | Hanya request "Fin" tampil | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-006** | First Validation (VAL1) | Validasi request "Fin" | ISVAL1=1, VAL1USER & VAL1DATE diset | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-007** | Second Validation (VAL2) | Validasi dengan user berbeda | ISVAL2=1, request duavalidated | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-008** | Gagal Validasi Sendiri | Coba validasi ulang sama user | Error "Cannot validate own request" | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-009** | Un-Validate Request | Un-validate request validated | ISVAL reset, PENDING diset | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-ADM-005** | Tampilkan Request Final | Access `/admin/validate` | Hanya request "Fin" tampil | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-006** | First Validation (VAL1) | Validasi request "Fin" | ISVAL1=1, VAL1USER & VAL1DATE diset | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-007** | Second Validation (VAL2) | Validasi dengan user berbeda | ISVAL2=1, request duavalidated | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-008** | Gagal Validasi Sendiri | Coba validasi ulang sama user | Error "Cannot validate own request" | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-009** | Un-Validate Request | Un-validate request validated | ISVAL reset, PENDING diset | [ ] PASS
[ ] FAIL | ___________ |
### 5.3 SAMPLE & FITUR LAIN ADMIN
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-ADM-010** | Collect Sample | Collect tube | STATUS=1, COLLECTIONDATE & USERID diset | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-011** | Un-Collect Sample | Un-collect tube | STATUS di-reset | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-012** | Un-Receive Sample | Un-receive sample | Status berubah, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-013** | Print Labels | Print individual/collection/all | Semua labels tercetak | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-014** | View Audit Trail | Buka audit dialog | Timeline audit ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-015** | Tampilkan List User | Access `/admin/users` | Tabel users ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-016** | Buat User Baru | Add user lengkap | User berhasil dibuat dan di-hash | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-017** | Update User | Edit user โ ubah data | User berhasil di-update | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-018** | Delete User | Delete user | User terhapus | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-ADM-010** | Collect Sample | Collect tube | STATUS=1, COLLECTIONDATE & USERID diset | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-011** | Un-Collect Sample | Un-collect tube | STATUS di-reset | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-012** | Un-Receive Sample | Un-receive sample | Status berubah, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-013** | Print Labels | Print individual/collection/all | Semua labels tercetak | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-014** | View Audit Trail | Buka audit dialog | Timeline audit ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-015** | Tampilkan List User | Access `/admin/users` | Tabel users ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-016** | Buat User Baru | Add user lengkap | User berhasil dibuat dan di-hash | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-017** | Update User | Edit user โ ubah data | User berhasil di-update | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-018** | Delete User | Delete user | User terhapus | [ ] PASS
[ ] FAIL | ___________ |
### 5.4 REPORT ADMIN
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-ADM-019** | View Report Validated | View report request validated | Report ditampilkan lengkap | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-020** | Print Report | Print report | Print dialog buka, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-ADM-021** | Generate PDF | Generate PDF report | PDF berhasil di-generate | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-ADM-019** | View Report Validated | View report request validated | Report ditampilkan lengkap | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-020** | Print Report | Print report | Print dialog buka, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-ADM-021** | Generate PDF | Generate PDF report | PDF berhasil di-generate | [ ] PASS
[ ] FAIL | ___________ |
### 5.5 ROLE RESTRICTIONS ADMIN
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-ADM-PageNav** | Cannot Access Role Lain | Coba `/superuser`, `/lab`, `/phlebo`, `/cs` | Redirect ke unauthorized/error | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-ADM-PageNav** | Cannot Access Role Lain | Coba `/superuser`, `/lab`, `/phlebo`, `/cs` | Redirect ke unauthorized/error | [ ] PASS
[ ] FAIL | ___________ |
### Ringkasan Admin: _ LULUS / _____ GAGAL
@@ -188,47 +188,47 @@
### 6.1 DASHBOARD LAB
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-LAB-001** | Filter Test Code Alphabetical | Login Lab โ `/lab` | Hanya request TESTS A-Z yang tampil | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-002** | View Request Details | Buka request | Detail request ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-003** | Filter & Search dalam Batas Filter | Uji filter & search | Sesuai batas test code A-Z | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-004** | Sample Buttons Enabled | Buka dialog sample | Tombol Collect/Un-Coll/Un-Recv enabled | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-005** | Edit Comment Disabled | Cek comment field | Comment field non-editable | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-LAB-001** | Filter Test Code Alphabetical | Login Lab โ `/lab` | Hanya request TESTS A-Z yang tampil | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-002** | View Request Details | Buka request | Detail request ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-003** | Filter & Search dalam Batas Filter | Uji filter & search | Sesuai batas test code A-Z | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-004** | Sample Buttons Enabled | Buka dialog sample | Tombol Collect/Un-Coll/Un-Recv enabled | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-005** | Edit Comment Disabled | Cek comment field | Comment field non-editable | [ ] PASS
[ ] FAIL | ___________ |
### 6.2 VALIDASI LAB
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-LAB-006** | Tampilkan Request Final | Access `/lab/validate` | Hanya "Fin" dengan TESTS A-Z tampil | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-007** | First Validation (VAL1) | Validasi request "Fin" | ISVAL1=1, VAL1USER & VAL1DATE diset | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-008** | Second Validation (VAL2) | Validasi user berbeda | ISVAL2=1, request duavalidated | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-009** | Gagal Validasi Sendiri | Coba validasi sendiri | Error "Cannot validate own request" | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-010** | Un-Validate Disabled | Coba un-validate | Error/Unauthorized - cannot un-validate | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-LAB-006** | Tampilkan Request Final | Access `/lab/validate` | Hanya "Fin" dengan TESTS A-Z tampil | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-007** | First Validation (VAL1) | Validasi request "Fin" | ISVAL1=1, VAL1USER & VAL1DATE diset | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-008** | Second Validation (VAL2) | Validasi user berbeda | ISVAL2=1, request duavalidated | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-009** | Gagal Validasi Sendiri | Coba validasi sendiri | Error "Cannot validate own request" | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-010** | Un-Validate Disabled | Coba un-validate | Error/Unauthorized - cannot un-validate | [ ] PASS
[ ] FAIL | ___________ |
### 6.3 SAMPLE & FITUR LAIN LAB
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-LAB-011** | Collect Sample | Collect tube | STATUS=1, COLLECTIONDATE & USERID diset | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-012** | Un-Collect Sample | Un-collect tube | STATUS di-reset | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-013** | Un-Receive Sample | Un-receive sample | Status berubah, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-014** | Print Labels | Print semua jenis label | Semua labels tercetak | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-015** | View Audit Trail | Buka audit dialog | Timeline audit ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-LAB-011** | Collect Sample | Collect tube | STATUS=1, COLLECTIONDATE & USERID diset | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-012** | Un-Collect Sample | Un-collect tube | STATUS di-reset | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-013** | Un-Receive Sample | Un-receive sample | Status berubah, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-014** | Print Labels | Print semua jenis label | Semua labels tercetak | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-015** | View Audit Trail | Buka audit dialog | Timeline audit ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
### 6.4 REPORT LAB
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-LAB-016** | View Report Validated | View report request validated | Report ditampilkan lengkap | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-017** | Print Report | Print report validated | Print dialog buka, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-LAB-018** | Generate PDF | Generate PDF | PDF berhasil di-generate | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-LAB-016** | View Report Validated | View report request validated | Report ditampilkan lengkap | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-017** | Print Report | Print report validated | Print dialog buka, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-LAB-018** | Generate PDF | Generate PDF | PDF berhasil di-generate | [ ] PASS
[ ] FAIL | ___________ |
### 6.5 ROLE RESTRICTIONS LAB
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-LAB-PageNav** | Cannot Access Role Lain | Coba `/superuser`, `/admin`, `/phlebo`, `/cs` | Redirect ke unauthorized/error | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-LAB-PageNav** | Cannot Access Role Lain | Coba `/superuser`, `/admin`, `/phlebo`, `/cs` | Redirect ke unauthorized/error | [ ] PASS
[ ] FAIL | ___________ |
### Ringkasan Lab: _ LULUS / _____ GAGAL
@@ -236,20 +236,20 @@
## 7. TEST CASE - PHLEBOTOMIST (ROLE 3)
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-PHB-001** | Tampilkan Semua Request | Login Phlebo โ `/phlebo` | Tabel requests semua status | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-002** | Filter & Search | Uji filter & search | Semua berfungsi | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-003** | Sample Collection Disabled | Buka dialog sample | Tombol Collect/Un-Coll/Un-Recv DISABLED | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-004** | Edit Comment Disabled | Cek comment field | Comment field non-editable | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-005** | Validation Page Denied | Coba `/phlebo/validate` | Halaman tidak tersedia/unauthorized | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-006** | View Sample Details (Read-Only) | Buka dialog sample | Sample details view-only | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-007** | Print Labels | Print individual/collection/all | Labels tercetak | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-008** | View Audit Trail | Buka audit dialog | Audit trail ditampilkan (read-only) | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-009** | Cannot View Report | Coba view report | Report tidak tersedia/error | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-010** | Cannot Print Report | Coba print report | Print tidak tersedia | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-011** | Cannot Generate PDF | Coba generate PDF | PDF tidak tersedia | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-PHB-PageNav** | Cannot Access Role Lain | Coba `/superuser`, `/admin`, `/lab`, `/cs` | Redirect ke unauthorized/error | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-PHB-001** | Tampilkan Semua Request | Login Phlebo โ `/phlebo` | Tabel requests semua status | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-002** | Filter & Search | Uji filter & search | Semua berfungsi | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-003** | Sample Collection Disabled | Buka dialog sample | Tombol Collect/Un-Coll/Un-Recv DISABLED | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-004** | Edit Comment Disabled | Cek comment field | Comment field non-editable | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-005** | Validation Page Denied | Coba `/phlebo/validate` | Halaman tidak tersedia/unauthorized | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-006** | View Sample Details (Read-Only) | Buka dialog sample | Sample details view-only | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-007** | Print Labels | Print individual/collection/all | Labels tercetak | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-008** | View Audit Trail | Buka audit dialog | Audit trail ditampilkan (read-only) | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-009** | Cannot View Report | Coba view report | Report tidak tersedia/error | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-010** | Cannot Print Report | Coba print report | Print tidak tersedia | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-011** | Cannot Generate PDF | Coba generate PDF | PDF tidak tersedia | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-PHB-PageNav** | Cannot Access Role Lain | Coba `/superuser`, `/admin`, `/lab`, `/cs` | Redirect ke unauthorized/error | [ ] PASS
[ ] FAIL | ___________ |
### Ringkasan Phlebotomist: _ LULUS / _____ GAGAL
@@ -257,20 +257,20 @@
## 8. TEST CASE - CUSTOMER SERVICE (ROLE 4)
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-CS-001** | Tampilkan Semua Request | Login CS โ `/cs` | Tabel requests semua status | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-002** | Filter & Search | Uji filter & search | Semua berfungsi | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-003** | Sample Collection Disabled | Buka dialog sample | Tombol Collect/Un-Coll/Un-Recv DISABLED | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-004** | Edit Comment Disabled | Cek comment field | Comment field non-editable | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-005** | Validation Page Denied | Coba `/cs/validate` | Halaman tidak tersailable | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-006** | View Sample Details (Read-Only) | Buka dialog sample | Sample details view-only | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-007** | Print Labels (Limited) | Print labels | Labels tercetak sesuai kapasitas | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-008** | View Audit Trail | Buka audit dialog | Audit trail ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-009** | View Report Validated | View report request validated | Report ditampilkan lengkap | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-010** | Print Report | Print report validated | Print dialog buka, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-011** | Generate PDF | Generate PDF | PDF berhasil di-generate | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-CS-PageNav** | Cannot Access Role Lain | Coba `/superuser`, `/admin`, `/lab`, `/phlebo` | Redirect ke unauthorized/error | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-CS-001** | Tampilkan Semua Request | Login CS โ `/cs` | Tabel requests semua status | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-002** | Filter & Search | Uji filter & search | Semua berfungsi | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-003** | Sample Collection Disabled | Buka dialog sample | Tombol Collect/Un-Coll/Un-Recv DISABLED | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-004** | Edit Comment Disabled | Cek comment field | Comment field non-editable | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-005** | Validation Page Denied | Coba `/cs/validate` | Halaman tidak tersailable | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-006** | View Sample Details (Read-Only) | Buka dialog sample | Sample details view-only | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-007** | Print Labels (Limited) | Print labels | Labels tercetak sesuai kapasitas | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-008** | View Audit Trail | Buka audit dialog | Audit trail ditampilkan | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-009** | View Report Validated | View report request validated | Report ditampilkan lengkap | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-010** | Print Report | Print report validated | Print dialog buka, audit log tercatat | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-011** | Generate PDF | Generate PDF | PDF berhasil di-generate | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-CS-PageNav** | Cannot Access Role Lain | Coba `/superuser`, `/admin`, `/lab`, `/phlebo` | Redirect ke unauthorized/error | [ ] PASS
[ ] FAIL | ___________ |
### Ringkasan Customer Service: _ LULUS / _____ GAGAL
@@ -278,23 +278,23 @@
## 9. TEST CASE - FITUR CROSS-ROLE
-| No. | ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
-|-----|----|----------------|---------------|-----------------|-------|---------------|
-| | **TC-X-001** | User Mgmt Role Restrictions | Lab/Phlebo/CS coba user management API | Error unauthorized | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-002** | Cross-Role Validation | Lab A validasi VAL1, Superuser B validasi VAL2 | Cross-role validation berhasil | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-003** | Un-Validate Role Restrictions | Lab/Phlebo/CS coba un-validate | Error unauthorized - only SU/Admin | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-004** | Un-Receive Role Restrictions | Lab/Phlebo/CS coba un-receive | Error unauthorized - only SU/Admin | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-005** | Report Access Restrictions | Coba view report semua role | SU/Admin/Lab/CS OK, Phlebo NOT | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-006** | Report Validated Requirement | View report hanya VAR1 vs duavalidated | Hanya duavalidated dapat dilihat | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-007** | Comment Edit Restrictions | Lab/Phlebo/CS coba edit comment | Error - only SU/Admin editable | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-008** | Validasi tidak Pengaruhi Data Lain | Record data sebelum & sesudah validasi | Hanya status validasi berubah | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-009** | Un-Validate Mempertahankan Data | Record data sebelum & sesudah un-validate | Hanya status validasi berubah | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-010** | Audit Trail Logging | Lakukan berbagai aktivitas | Semua tercatat di audit log | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-011** | Concurrent Validation | 2 user buka validation dialog bersamaan | Validasi berhasil, tidak conflict | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-012** | Concurrent Sample Collection | 2 user collect tube berbeda bersamaan | Semua berhasil tercatat | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-013** | Session Timeout | Tunggu session timeout | Redirect ke login | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-014** | Password Hashing Security | Buat user โ cek database | Password dalam HASH bukan plain | [ ] PASS
[ ] FAIL | ___________ |
-| | **TC-X-015** | Legacy Read-Only | Cek koneksi & fungsi Firebird | Hanya READ dari Firebird, TIDAK WRITE | [ ] PASS
[ ] FAIL | ___________ |
+| ID | Judul Test Case | Langkah Utama | Expected Result | Hasil | Issue/Jawaban |
+|----|----------------|---------------|-----------------|-------|---------------|
+| **TC-X-001** | User Mgmt Role Restrictions | Lab/Phlebo/CS coba user management API | Error unauthorized | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-002** | Cross-Role Validation | Lab A validasi VAL1, Superuser B validasi VAL2 | Cross-role validation berhasil | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-003** | Un-Validate Role Restrictions | Lab/Phlebo/CS coba un-validate | Error unauthorized - only SU/Admin | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-004** | Un-Receive Role Restrictions | Lab/Phlebo/CS coba un-receive | Error unauthorized - only SU/Admin | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-005** | Report Access Restrictions | Coba view report semua role | SU/Admin/Lab/CS OK, Phlebo NOT | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-006** | Report Validated Requirement | View report hanya VAR1 vs duavalidated | Hanya duavalidated dapat dilihat | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-007** | Comment Edit Restrictions | Lab/Phlebo/CS coba edit comment | Error - only SU/Admin editable | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-008** | Validasi tidak Pengaruhi Data Lain | Record data sebelum & sesudah validasi | Hanya status validasi berubah | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-009** | Un-Validate Mempertahankan Data | Record data sebelum & sesudah un-validate | Hanya status validasi berubah | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-010** | Audit Trail Logging | Lakukan berbagai aktivitas | Semua tercatat di audit log | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-011** | Concurrent Validation | 2 user buka validation dialog bersamaan | Validasi berhasil, tidak conflict | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-012** | Concurrent Sample Collection | 2 user collect tube berbeda bersamaan | Semua berhasil tercatat | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-013** | Session Timeout | Tunggu session timeout | Redirect ke login | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-014** | Password Hashing Security | Buat user โ cek database | Password dalam HASH bukan plain | [ ] PASS
[ ] FAIL | ___________ |
+| **TC-X-015** | Legacy Read-Only | Cek koneksi & fungsi Firebird | Hanya READ dari Firebird, TIDAK WRITE | [ ] PASS
[ ] FAIL | ___________ |
### Ringkasan Cross-Role: _ LULUS / _____ GAGAL
@@ -304,8 +304,8 @@
### 10.1 Functional Criteria
-| No. | Kriteria Functional | Hasil |
-|-----|---------------------|-------|
+| Kriteria Functional | Hasil |
+|---------------------|-------|
| FC-01 | Autentikasi benar untuk semua role (0-4) | [ ] PASS
[ ] FAIL |
| FC-02 | Role-based access control (RBAC) berfungsi | [ ] PASS
[ ] FAIL |
| FC-03 | Dashboard menampilkan request sesuai filter & role | [ ] PASS
[ ] FAIL |
@@ -330,8 +330,8 @@
### 10.2 Security Criteria
-| No. | Kriteria Security | Hasil |
-|-----|-------------------|-------|
+| Kriteria Security | Hasil |
+|-------------------|-------|
| SC-01 | Password disimpan dalam bentuk HASH (bukan plain) | [ ] PASS
[ ] FAIL |
| SC-02 | Session timeout bekerja dengan benar | [ ] PASS
[ ] FAIL |
| SC-03 | Tidak ada SQL injection vulnerability | [ ] PASS
[ ] FAIL |
@@ -347,8 +347,8 @@
### 10.3 Performance Criteria
-| No. | Kriteria Performance | Target | Hasil Aktual | Pass/Fail |
-|-----|----------------------|--------|--------------|-----------|
+| Kriteria Performance | Target | Hasil Aktual | Pass/Fail |
+|----------------------|--------|--------------|-----------|
| PC-01 | Dashboard load time | < 3 detik | __________ detik | [ ] PASS
[ ] FAIL |
| PC-02 | Validation page load time | < 3 detik | __________ detik | [ ] PASS
[ ] FAIL |
| PC-03 | Report generation time | < 5 detik | __________ detik | [ ] PASS
[ ] FAIL |
@@ -362,8 +362,8 @@
### 10.4 Usability Criteria
-| No. | Kriteria Usability | Hasil |
-|-----|---------------------|-------|
+| Kriteria Usability | Hasil |
+|---------------------|-------|
| UC-01 | UI user-friendly dan mudah digunakan | [ ] PASS
[ ] FAIL |
| UC-02 | Shortcut keyboard (Enter, N, Esc) berfungsi | [ ] PASS
[ ] FAIL |
| UC-03 | Error messages jelas dan actionable | [ ] PASS
[ ] FAIL |
@@ -377,8 +377,8 @@
### 10.5 Data Integrity Criteria
-| No. | Kriteria Data Integrity | Hasil |
-|-----|-------------------------|-------|
+| Kriteria Data Integrity | Hasil |
+|-------------------------|-------|
| DC-01 | Validasi tidak menghapus/mengubah data lain | [ ] PASS
[ ] FAIL |
| DC-02 | Un-validate hanya menghapus status validasi | [ ] PASS
[ ] FAIL |
| DC-03 | Sample collection tidak modifikasi data lain | [ ] PASS
[ ] FAIL |
@@ -431,13 +431,13 @@ Untuk sistem dinyatakan **APPROVED** untuk production:
### 11.3 Issue Critical yang Harus Diperbaiki
-| No. | Issue | Severity | Impact | Assigned To | Deadline |
-|-----|-------|----------|--------|-------------|----------|
-| 1 | ________________________________ | High | ___________ | ___________ | _______ |
-| 2 | ________________________________ | Medium | ___________ | ___________ | _______ |
-| 3 | ________________________________ | Low | ___________ | ___________ | _______ |
-| 4 | ________________________________ | | ___________ | ___________ | _______ |
-| 5 | ________________________________ | | ___________ | ___________ | _______ |
+| Issue | Severity | Impact | Assigned To | Deadline |
+|-------|----------|--------|-------------|----------|
+| ________________________________ | High | ___________ | ___________ | _______ |
+| ________________________________ | Medium | ___________ | ___________ | _______ |
+| ________________________________ | Low | ___________ | ___________ | _______ |
+| ________________________________ | | ___________ | ___________ | _______ |
+| ________________________________ | | ___________ | ___________ | _______ |
---
diff --git a/app/Controllers/ReportController.php b/app/Controllers/ReportController.php
index 9c6f924..90e08bd 100644
--- a/app/Controllers/ReportController.php
+++ b/app/Controllers/ReportController.php
@@ -112,9 +112,10 @@ class ReportController extends BaseController
$html = view('report/template', $data);
$filename = $accessnumber . '.pdf';
+ $collectionDate = $data['collectionDate'] ?? '';
try {
- $jobId = $this->postToSpooler($html, $filename);
+ $jobId = $this->postToSpooler($html, $filename, $collectionDate);
return $this->response->setJSON([
'success' => true,
'jobId' => $jobId,
@@ -153,15 +154,22 @@ class ReportController extends BaseController
return $this->response->setJSON($response);
}
- private function postToSpooler($html, $filename)
+ private function postToSpooler($html, $filename, $collectionDate = '')
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://glenlis:3000/api/pdf/generate');
curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
+
+ $payload = [
'html' => $html,
'filename' => $filename
- ]));
+ ];
+
+ if ($collectionDate) {
+ $payload['collectionDate'] = $collectionDate;
+ }
+
+ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json'
diff --git a/app/Libraries/ReportHelper.php b/app/Libraries/ReportHelper.php
index 76a4bbb..dc6b35e 100644
--- a/app/Libraries/ReportHelper.php
+++ b/app/Libraries/ReportHelper.php
@@ -32,6 +32,7 @@ class ReportHelper
$valBy = $this->getValBy($accessnumber);
$valData = $this->getValData($accessnumber);
+ $collectionDate = $this->getCollectionDateRaw($accessnumber);
return [
'hostnumber' => $hostnumber,
'result' => $result,
@@ -45,7 +46,8 @@ class ReportHelper
'valBy' => $valBy,
'val1User' => $valData['VAL1USER'] ?? '',
'val2User' => $valData['VAL2USER'] ?? '',
- 'date' => date('d-m-Y H:i')
+ 'date' => date('d-m-Y H:i'),
+ 'collectionDate' => $collectionDate
];
}
@@ -783,4 +785,13 @@ class ReportHelper
$row = $this->db->query($sql, [$accessnumber])->getRowArray();
return $row ?? [];
}
+
+ private function getCollectionDateRaw(string $accessnumber): string {
+ $sql = "SELECT FORMAT(SR.COLLECTIONDATE,'yyyy-MM-dd') AS COLLDATE
+ FROM REQUESTS R
+ LEFT JOIN SP_REQUESTS SR ON SR.SP_ACCESSNUMBER=R.ACCESSNUMBER
+ WHERE R.ACCESSNUMBER=?";
+ $row = $this->db->query($sql, [$accessnumber])->getRowArray();
+ return $row['COLLDATE'] ?? '';
+ }
}
diff --git a/app/Views/shared/content_requests.php b/app/Views/shared/content_requests.php
index b375e77..61a21c6 100644
--- a/app/Views/shared/content_requests.php
+++ b/app/Views/shared/content_requests.php
@@ -183,9 +183,10 @@