diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 1566b77..b0c1094 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -206,6 +206,27 @@ $routes->match(['get', 'post'], '/guidebook/edit/(:any)', 'Guidebook::edit/$1'); $routes->get('/guidebook/delete/(:num)', 'Guidebook::delete/$1'); +// Certificates +$routes->group('certificates', function($routes) { + + // Untuk Index + $routes->get('/', 'Certificates::index'); + + // Untuk Index Tiap Menu + $routes->get('training', 'Certificates::trainingIndex'); + $routes->get('calibration', 'Certificates::calibrateIndex'); + $routes->get('maintenance', 'Certificates::maintenanceIndex'); + + // Untuk View Cerificate + $routes->get('training/show/(:any)', 'Certificates::createTraining/$1'); + $routes->get('calibration/show/(:any)/(:any)', 'Certificates::createCalibrate/$1/$2'); + $routes->get('maintenance/show/(:any)', 'Certificates::createMaintenance/$1'); + + // $routes->get('view/(:any)', 'Certificates::view/$1'); + // $routes->get('get/(:any)', 'Certificates::get/$1'); +}); + + // Groups $routes->get('/mailgroups', 'Mailgroups::index'); diff --git a/app/Controllers/Certificates.php b/app/Controllers/Certificates.php new file mode 100644 index 0000000..614d665 --- /dev/null +++ b/app/Controllers/Certificates.php @@ -0,0 +1,1156 @@ + 'CERT001', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-001', + // 'type' => 'calibration', + // 'issuedate' => '2024-01-15', + // 'expirydate' => '2025-01-15', + // 'vendor' => 'Summit Calibration Lab' + // ], + // [ + // 'certid' => 'CERT002', + // 'certname' => 'CL900i Operator Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-002', + // 'type' => 'training', + // 'issuedate' => '2024-03-20', + // 'expirydate' => '2025-03-20', + // 'vendor' => 'Summit Training Center' + // ], + // [ + // 'certid' => 'CERT003', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-003', + // 'type' => 'maintenance', + // 'issuedate' => '2024-06-10', + // 'expirydate' => '2024-12-10', + // 'vendor' => 'Summit Service Team' + // ] + // ]; + + // // Data dummy untuk products dropdown + // // $products = [ + // // ['productid' => '1', 'productname' => 'CL900i', 'productnumber' => 'SN-2024-001'], + // // ['productid' => '2', 'productname' => 'CL900i', 'productnumber' => 'SN-2024-002'], + // // ['productid' => '3', 'productname' => 'CL900i', 'productnumber' => 'SN-2024-003'] + // // ]; + + // $data = [ + // 'certificates' => $certificates, + // // 'products' => $products + // ]; + + // return view('certificate_index', $data); + // } + // public function view($certid = null) { + // if (!$certid) { + // return $this->response->setStatusCode(400)->setJSON(['error' => 'Certificate ID is required']); + // } + + // // Get certificate data from dummy data + // $certificates = [ + // [ + // 'certid' => 'CERT001', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-001', + // 'type' => 'calibration', + // 'issuedate' => '2024-01-15', + // 'expirydate' => '2025-01-15', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ], + // [ + // 'certid' => 'CERT002', + // 'certname' => 'CL900i Operator Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-002', + // 'type' => 'training', + // 'issuedate' => '2024-03-20', + // 'expirydate' => '2025-03-20', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Operator training completion certificate. Covers basic operation and safety procedures.' + // ], + // [ + // 'certid' => 'CERT003', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-003', + // 'type' => 'maintenance', + // 'issuedate' => '2024-06-10', + // 'expirydate' => '2024-12-10', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment. All components checked and serviced.' + // ], + // [ + // 'certid' => 'CERT004', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-004', + // 'type' => 'calibration', + // 'issuedate' => '2023-11-01', + // 'expirydate' => '2024-11-01', + // 'vendor' => 'External Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ], + // [ + // 'certid' => 'CERT005', + // 'certname' => 'CL900i Advanced Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-005', + // 'type' => 'training', + // 'issuedate' => '2024-05-15', + // 'expirydate' => '2025-05-15', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Advanced training completion certificate. Covers advanced operation and troubleshooting procedures.' + // ], + // [ + // 'certid' => 'CERT006', + // 'certname' => 'CL900i Annual Maintenance', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-006', + // 'type' => 'maintenance', + // 'issuedate' => '2024-01-01', + // 'expirydate' => '2025-01-01', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Annual maintenance record for CL900i equipment. All components checked and serviced.' + // ], + // [ + // 'certid' => 'CERT007', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-007', + // 'type' => 'calibration', + // 'issuedate' => '2024-02-28', + // 'expirydate' => '2025-02-28', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ], + // [ + // 'certid' => 'CERT008', + // 'certname' => 'CL900i Safety Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-008', + // 'type' => 'training', + // 'issuedate' => '2024-04-10', + // 'expirydate' => '2025-04-10', + // 'vendor' => 'External Safety Institute', + // 'description' => 'Safety training completion certificate. Covers safety procedures and emergency protocols.' + // ], + // [ + // 'certid' => 'CERT009', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-009', + // 'type' => 'calibration', + // 'issuedate' => '2024-07-20', + // 'expirydate' => '2025-07-20', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ], + // [ + // 'certid' => 'CERT010', + // 'certname' => 'CL900i Technical Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-010', + // 'type' => 'training', + // 'issuedate' => '2024-08-05', + // 'expirydate' => '2025-08-05', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Technical training completion certificate. Covers technical specifications and maintenance procedures.' + // ], + // [ + // 'certid' => 'CERT011', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-011', + // 'type' => 'maintenance', + // 'issuedate' => '2024-09-15', + // 'expirydate' => '2025-03-15', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment. All components checked and serviced.' + // ], + // [ + // 'certid' => 'CERT012', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-012', + // 'type' => 'calibration', + // 'issuedate' => '2024-10-01', + // 'expirydate' => '2025-10-01', + // 'vendor' => 'External Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ], + // [ + // 'certid' => 'CERT013', + // 'certname' => 'CL900i Basic Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-013', + // 'type' => 'training', + // 'issuedate' => '2024-11-20', + // 'expirydate' => '2025-11-20', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Basic training completion certificate. Covers basic operation procedures.' + // ], + // [ + // 'certid' => 'CERT014', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-014', + // 'type' => 'maintenance', + // 'issuedate' => '2024-12-01', + // 'expirydate' => '2025-06-01', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment. All components checked and serviced.' + // ], + // [ + // 'certid' => 'CERT015', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-015', + // 'type' => 'calibration', + // 'issuedate' => '2024-01-10', + // 'expirydate' => '2025-01-10', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ], + // [ + // 'certid' => 'CERT016', + // 'certname' => 'CL900i Operator Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-016', + // 'type' => 'training', + // 'issuedate' => '2024-02-15', + // 'expirydate' => '2025-02-15', + // 'vendor' => 'External Training Institute', + // 'description' => 'Operator training completion certificate. Covers basic operation and safety procedures.' + // ], + // [ + // 'certid' => 'CERT017', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-017', + // 'type' => 'maintenance', + // 'issuedate' => '2024-03-25', + // 'expirydate' => '2024-09-25', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment. All components checked and serviced.' + // ], + // [ + // 'certid' => 'CERT018', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-018', + // 'type' => 'calibration', + // 'issuedate' => '2024-04-30', + // 'expirydate' => '2025-04-30', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ], + // [ + // 'certid' => 'CERT019', + // 'certname' => 'CL900i Advanced Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-019', + // 'type' => 'training', + // 'issuedate' => '2024-05-20', + // 'expirydate' => '2025-05-20', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Advanced training completion certificate. Covers advanced operation and troubleshooting procedures.' + // ], + // [ + // 'certid' => 'CERT020', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-020', + // 'type' => 'maintenance', + // 'issuedate' => '2024-06-15', + // 'expirydate' => '2024-12-15', + // 'vendor' => 'External Service Provider', + // 'description' => 'Regular maintenance record for CL900i equipment. All components checked and serviced.' + // ], + // [ + // 'certid' => 'CERT021', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-021', + // 'type' => 'calibration', + // 'issuedate' => '2024-07-10', + // 'expirydate' => '2025-07-10', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ], + // [ + // 'certid' => 'CERT022', + // 'certname' => 'CL900i Safety Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-022', + // 'type' => 'training', + // 'issuedate' => '2024-08-25', + // 'expirydate' => '2025-08-25', + // 'vendor' => 'External Safety Institute', + // 'description' => 'Safety training completion certificate. Covers safety procedures and emergency protocols.' + // ], + // [ + // 'certid' => 'CERT023', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-023', + // 'type' => 'maintenance', + // 'issuedate' => '2024-09-05', + // 'expirydate' => '2025-03-05', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment. All components checked and serviced.' + // ], + // [ + // 'certid' => 'CERT024', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-024', + // 'type' => 'calibration', + // 'issuedate' => '2024-10-15', + // 'expirydate' => '2025-10-15', + // 'vendor' => 'External Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ], + // [ + // 'certid' => 'CERT025', + // 'certname' => 'CL900i Technical Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-025', + // 'type' => 'training', + // 'issuedate' => '2024-11-10', + // 'expirydate' => '2025-11-10', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Technical training completion certificate. Covers technical specifications and maintenance procedures.' + // ], + // [ + // 'certid' => 'CERT026', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-026', + // 'type' => 'maintenance', + // 'issuedate' => '2024-12-20', + // 'expirydate' => '2025-06-20', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment. All components checked and serviced.' + // ], + // [ + // 'certid' => 'CERT027', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-027', + // 'type' => 'calibration', + // 'issuedate' => '2024-01-05', + // 'expirydate' => '2025-01-05', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ], + // [ + // 'certid' => 'CERT028', + // 'certname' => 'CL900i Operator Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-028', + // 'type' => 'training', + // 'issuedate' => '2024-02-20', + // 'expirydate' => '2025-02-20', + // 'vendor' => 'External Training Institute', + // 'description' => 'Operator training completion certificate. Covers basic operation and safety procedures.' + // ], + // [ + // 'certid' => 'CERT029', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-029', + // 'type' => 'maintenance', + // 'issuedate' => '2024-03-10', + // 'expirydate' => '2024-09-10', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment. All components checked and serviced.' + // ], + // [ + // 'certid' => 'CERT030', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-030', + // 'type' => 'calibration', + // 'issuedate' => '2024-04-25', + // 'expirydate' => '2025-04-25', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment. All parameters verified and within specifications.' + // ] + // ]; + + // $certificate = null; + // foreach ($certificates as $cert) { + // if ($cert['certid'] === $certid) { + // $certificate = $cert; + // break; + // } + // } + + // if (!$certificate) { + // return $this->response->setStatusCode(404)->setJSON(['error' => 'Certificate not found']); + // } + + // // Generate PDF based on type + // return $this->generatePDF($certificate, $certificate['type']); + // } + // public function get($certid = null) { + // $certificates = [ + // [ + // 'certid' => 'CERT001', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-001', + // 'type' => 'calibration', + // 'issuedate' => '2024-01-15', + // 'expirydate' => '2025-01-15', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT002', + // 'certname' => 'CL900i Operator Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-002', + // 'type' => 'training', + // 'issuedate' => '2024-03-20', + // 'expirydate' => '2025-03-20', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Operator training completion certificate.' + // ], + // [ + // 'certid' => 'CERT003', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-003', + // 'type' => 'maintenance', + // 'issuedate' => '2024-06-10', + // 'expirydate' => '2024-12-10', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT004', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-004', + // 'type' => 'calibration', + // 'issuedate' => '2023-11-01', + // 'expirydate' => '2024-11-01', + // 'vendor' => 'External Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT005', + // 'certname' => 'CL900i Advanced Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-005', + // 'type' => 'training', + // 'issuedate' => '2024-05-15', + // 'expirydate' => '2025-05-15', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Advanced training completion certificate.' + // ], + // [ + // 'certid' => 'CERT006', + // 'certname' => 'CL900i Annual Maintenance', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-006', + // 'type' => 'maintenance', + // 'issuedate' => '2024-01-01', + // 'expirydate' => '2025-01-01', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Annual maintenance record for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT007', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-007', + // 'type' => 'calibration', + // 'issuedate' => '2024-02-28', + // 'expirydate' => '2025-02-28', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT008', + // 'certname' => 'CL900i Safety Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-008', + // 'type' => 'training', + // 'issuedate' => '2024-04-10', + // 'expirydate' => '2025-04-10', + // 'vendor' => 'External Safety Institute', + // 'description' => 'Safety training completion certificate.' + // ], + // [ + // 'certid' => 'CERT009', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-009', + // 'type' => 'calibration', + // 'issuedate' => '2024-07-20', + // 'expirydate' => '2025-07-20', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT010', + // 'certname' => 'CL900i Technical Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-010', + // 'type' => 'training', + // 'issuedate' => '2024-08-05', + // 'expirydate' => '2025-08-05', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Technical training completion certificate.' + // ], + // [ + // 'certid' => 'CERT011', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-011', + // 'type' => 'maintenance', + // 'issuedate' => '2024-09-15', + // 'expirydate' => '2025-03-15', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT012', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-012', + // 'type' => 'calibration', + // 'issuedate' => '2024-10-01', + // 'expirydate' => '2025-10-01', + // 'vendor' => 'External Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT013', + // 'certname' => 'CL900i Basic Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-013', + // 'type' => 'training', + // 'issuedate' => '2024-11-20', + // 'expirydate' => '2025-11-20', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Basic training completion certificate.' + // ], + // [ + // 'certid' => 'CERT014', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-014', + // 'type' => 'maintenance', + // 'issuedate' => '2024-12-01', + // 'expirydate' => '2025-06-01', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT015', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-015', + // 'type' => 'calibration', + // 'issuedate' => '2024-01-10', + // 'expirydate' => '2025-01-10', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT016', + // 'certname' => 'CL900i Operator Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-016', + // 'type' => 'training', + // 'issuedate' => '2024-02-15', + // 'expirydate' => '2025-02-15', + // 'vendor' => 'External Training Institute', + // 'description' => 'Operator training completion certificate.' + // ], + // [ + // 'certid' => 'CERT017', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-017', + // 'type' => 'maintenance', + // 'issuedate' => '2024-03-25', + // 'expirydate' => '2024-09-25', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT018', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-018', + // 'type' => 'calibration', + // 'issuedate' => '2024-04-30', + // 'expirydate' => '2025-04-30', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT019', + // 'certname' => 'CL900i Advanced Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-019', + // 'type' => 'training', + // 'issuedate' => '2024-05-20', + // 'expirydate' => '2025-05-20', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Advanced training completion certificate.' + // ], + // [ + // 'certid' => 'CERT020', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-020', + // 'type' => 'maintenance', + // 'issuedate' => '2024-06-15', + // 'expirydate' => '2024-12-15', + // 'vendor' => 'External Service Provider', + // 'description' => 'Regular maintenance record for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT021', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-021', + // 'type' => 'calibration', + // 'issuedate' => '2024-07-10', + // 'expirydate' => '2025-07-10', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT022', + // 'certname' => 'CL900i Safety Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-022', + // 'type' => 'training', + // 'issuedate' => '2024-08-25', + // 'expirydate' => '2025-08-25', + // 'vendor' => 'External Safety Institute', + // 'description' => 'Safety training completion certificate.' + // ], + // [ + // 'certid' => 'CERT023', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-023', + // 'type' => 'maintenance', + // 'issuedate' => '2024-09-05', + // 'expirydate' => '2025-03-05', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT024', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-024', + // 'type' => 'calibration', + // 'issuedate' => '2024-10-15', + // 'expirydate' => '2025-10-15', + // 'vendor' => 'External Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT025', + // 'certname' => 'CL900i Technical Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-025', + // 'type' => 'training', + // 'issuedate' => '2024-11-10', + // 'expirydate' => '2025-11-10', + // 'vendor' => 'Summit Training Center', + // 'description' => 'Technical training completion certificate.' + // ], + // [ + // 'certid' => 'CERT026', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-026', + // 'type' => 'maintenance', + // 'issuedate' => '2024-12-20', + // 'expirydate' => '2025-06-20', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT027', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-027', + // 'type' => 'calibration', + // 'issuedate' => '2024-01-05', + // 'expirydate' => '2025-01-05', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT028', + // 'certname' => 'CL900i Operator Training', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-028', + // 'type' => 'training', + // 'issuedate' => '2024-02-20', + // 'expirydate' => '2025-02-20', + // 'vendor' => 'External Training Institute', + // 'description' => 'Operator training completion certificate.' + // ], + // [ + // 'certid' => 'CERT029', + // 'certname' => 'CL900i Maintenance Record', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-029', + // 'type' => 'maintenance', + // 'issuedate' => '2024-03-10', + // 'expirydate' => '2024-09-10', + // 'vendor' => 'Summit Service Team', + // 'description' => 'Regular maintenance record for CL900i equipment.' + // ], + // [ + // 'certid' => 'CERT030', + // 'certname' => 'CL900i Calibration Certificate', + // 'productname' => 'CL900i', + // 'productnumber' => 'SN-2024-030', + // 'type' => 'calibration', + // 'issuedate' => '2024-04-25', + // 'expirydate' => '2025-04-25', + // 'vendor' => 'Summit Calibration Lab', + // 'description' => 'Annual calibration certificate for CL900i equipment.' + // ] + // ]; + + // foreach ($certificates as $cert) { + // if ($cert['certid'] === $certid) { + // return $this->response->setJSON($cert); + // } + // } + + // return $this->response->setStatusCode(404)->setJSON(['error' => 'Certificate not found']); + // } + + // Untuk Tampilan List Sertifikat + public function trainingIndex() { + + $certificates = [ + [ + 'certid' => 'CERT002', + 'certname' => 'Jokoh Calibration Certificate', + 'productname' => 'Jokoh', + 'productnumber' => 'SN-2024-001', + 'issuedate' => '2024-01-15', + 'expirydate' => '2025-01-15', + 'vendor' => 'Summit Calibration Lab' + ] + ]; + $data = ['certificates' => $certificates]; + + return view('certificate_training_index', $data); + } + public function calibrateIndex() { + + $certificates = [ + [ + 'certid' => 'CERT001', + 'certname' => 'TMS50i Calibration Certificate', + 'productname' => 'tms50i', + 'productnumber' => 'SN-2024-001', + 'type' => 'calibration', + 'issuedate' => '2024-01-15', + 'expirydate' => '2025-01-15', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for TMS50i equipment.' + ], + [ + 'certid' => 'CERT002', + 'certname' => 'TMS24i Calibration Certificate', + 'productname' => 'tms24i', + 'productnumber' => 'SN-2024-002', + 'type' => 'calibration', + 'issuedate' => '2024-01-16', + 'expirydate' => '2025-01-16', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for tms24i equipment.' + ], + [ + 'certid' => 'CERT003', + 'certname' => 'tms30i Calibration Certificate', + 'productname' => 'tms30i', + 'productnumber' => 'SN-2024-003', + 'type' => 'calibration', + 'issuedate' => '2024-01-17', + 'expirydate' => '2025-01-17', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for tms30i equipment.' + ], + [ + 'certid' => 'CERT004', + 'certname' => 'BS430 Calibration Certificate', + 'productname' => 'bs430', + 'productnumber' => 'SN-2024-004', + 'type' => 'calibration', + 'issuedate' => '2024-01-18', + 'expirydate' => '2025-01-18', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for BS430 equipment.' + ], + [ + 'certid' => 'CERT005', + 'certname' => 'CL900i Calibration Certificate', + 'productname' => 'cl900i', + 'productnumber' => 'SN-2024-005', + 'type' => 'calibration', + 'issuedate' => '2024-01-19', + 'expirydate' => '2025-01-19', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for CL900i equipment.' + ], + [ + 'certid' => 'CERT006', + 'certname' => 'Jokoh Calibration Certificate', + 'productname' => 'jokoh', + 'productnumber' => 'SN-2024-006', + 'type' => 'calibration', + 'issuedate' => '2024-01-20', + 'expirydate' => '2025-01-20', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for Jokoh equipment.' + ], + [ + 'certid' => 'CERT007', + 'certname' => 'BC760R Calibration Certificate', + 'productname' => 'bc760r', + 'productnumber' => 'SN-2024-007', + 'type' => 'calibration', + 'issuedate' => '2024-01-21', + 'expirydate' => '2025-01-21', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for BC760R equipment.' + ], + [ + 'certid' => 'CERT008', + 'certname' => 'BC5140 Calibration Certificate', + 'productname' => 'bc5140', + 'productnumber' => 'SN-2024-008', + 'type' => 'calibration', + 'issuedate' => '2024-01-22', + 'expirydate' => '2025-01-22', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for BC5140 equipment.' + ], + ]; + + $data = ['certificates' => $certificates]; + return view('certificate_calibration_index', $data); + } + public function maintenanceIndex() { + + $certificates = [ + [ + 'certid' => 'CERT001', + 'certname' => 'Jokoh Calibration Certificate', + 'productname' => 'Jokoh', + 'productnumber' => 'SN-2024-001', + 'issuedate' => '2024-01-15', + 'expirydate' => '2025-01-15', + 'vendor' => 'Summit Calibration Lab' + ] + ]; + $data = ['certificates' => $certificates]; + + return view('certificate_maintenance_index', $data); + } + + public function createTraining($certid = null) { + if (!$certid) { + return $this->response->setStatusCode(400)->setJSON(['error' => 'Certificate ID is required']); + } + + // Get certificate data + $certificates = [ + [ + 'certid' => 'CERT002', + 'certname' => 'Jokoh Training Certificate', + 'productname' => 'Jokoh', + 'productnumber' => 'SN-2024-001', + 'issuedate' => '2024-01-15', + 'expirydate' => '2025-01-15', + 'vendor' => 'Summit Calibration Lab' + ] + ]; + + $certificate = null; + foreach ($certificates as $cert) { + if ($cert['certid'] === $certid) { + $certificate = $cert; + break; + } + } + + if (!$certificate) { + return $this->response->setStatusCode(404)->setJSON(['error' => 'Training certificate not found']); + } + + // Generate PDF + return $this->generatePDF($certificate, 'training'); + } + public function createCalibrate($certid = null, $productname = null) { + if (!$certid) { + return $this->response->setStatusCode(400)->setJSON(['error' => 'Certificate ID is required']); + } + + // Get certificate data + $certificates = [ + [ + 'certid' => 'CERT001', + 'certname' => 'TMS50i Calibration Certificate', + 'productname' => 'tms50i', + 'productnumber' => 'SN-2024-001', + 'type' => 'calibration', + 'issuedate' => '2024-01-15', + 'expirydate' => '2025-01-15', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for TMS50i equipment.' + ], + [ + 'certid' => 'CERT002', + 'certname' => 'tms24i Calibration Certificate', + 'productname' => 'tms24i', + 'productnumber' => 'SN-2024-002', + 'type' => 'calibration', + 'issuedate' => '2024-01-16', + 'expirydate' => '2025-01-16', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for tms24i equipment.' + ], + [ + 'certid' => 'CERT003', + 'certname' => 'tms30i Calibration Certificate', + 'productname' => 'tms30i', + 'productnumber' => 'SN-2024-003', + 'type' => 'calibration', + 'issuedate' => '2024-01-17', + 'expirydate' => '2025-01-17', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for tms30i equipment.' + ], + [ + 'certid' => 'CERT004', + 'certname' => 'BS430 Calibration Certificate', + 'productname' => 'bs430', + 'productnumber' => 'SN-2024-004', + 'type' => 'calibration', + 'issuedate' => '2024-01-18', + 'expirydate' => '2025-01-18', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for BS430 equipment.' + ], + [ + 'certid' => 'CERT005', + 'certname' => 'CL900i Calibration Certificate', + 'productname' => 'cl900i', + 'productnumber' => 'SN-2024-005', + 'type' => 'calibration', + 'issuedate' => '2024-01-19', + 'expirydate' => '2025-01-19', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for CL900i equipment.' + ], + [ + 'certid' => 'CERT006', + 'certname' => 'Jokoh Calibration Certificate', + 'productname' => 'jokoh', + 'productnumber' => 'SN-2024-006', + 'type' => 'calibration', + 'issuedate' => '2024-01-20', + 'expirydate' => '2025-01-20', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for Jokoh equipment.' + ], + [ + 'certid' => 'CERT007', + 'certname' => 'BC760R Calibration Certificate', + 'productname' => 'bc760r', + 'productnumber' => 'SN-2024-007', + 'type' => 'calibration', + 'issuedate' => '2024-01-21', + 'expirydate' => '2025-01-21', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for BC760R equipment.' + ], + [ + 'certid' => 'CERT008', + 'certname' => 'BC5140 Calibration Certificate', + 'productname' => 'bc5140', + 'productnumber' => 'SN-2024-008', + 'type' => 'calibration', + 'issuedate' => '2024-01-22', + 'expirydate' => '2025-01-22', + 'vendor' => 'Summit Calibration Lab', + 'description' => 'Annual calibration certificate for BC5140 equipment.' + ], + ]; + + $certificate = null; + foreach ($certificates as $cert) { + if ($cert['certid'] === $certid) { + $certificate = $cert; + break; + } + } + + if (!$certificate) { + return $this->response->setStatusCode(404)->setJSON(['error' => 'Calibration certificate not found']); + } + + // Generate PDF + return $this->generatePDF($certificate, 'calibration', $productname); + } + public function createMaintenance($certid = null) { + if (!$certid) { + return $this->response->setStatusCode(400)->setJSON(['error' => 'Certificate ID is required']); + } + + // Get certificate data + $certificates = [ + [ + 'certid' => 'CERT001', + 'certname' => 'Jokoh Calibration Certificate', + 'productname' => 'Jokoh', + 'productnumber' => 'SN-2024-001', + 'issuedate' => '2024-01-15', + 'expirydate' => '2025-01-15', + 'vendor' => 'Summit Calibration Lab' + ] + ]; + + $certificate = null; + foreach ($certificates as $cert) { + if ($cert['certid'] === $certid) { + $certificate = $cert; + break; + } + } + + if (!$certificate) { + return $this->response->setStatusCode(404)->setJSON(['error' => 'Maintenance certificate not found']); + } + + // dd($certificate); + + // Generate PDF + return $this->generatePDF($certificate, 'maintenance'); + } + + // Digunakan Untuk Generate PDF Show + private function generatePDF($certificate, $type, $productType=null) { + // Generate PDF + $options = new Options(); + $options->set('isRemoteEnabled', true); + $options->set('isHtml5ParserEnabled', true); + // $options->set('defaultFont', 'Playfair Display'); + + $dompdf = new Dompdf($options); + + // Format dates + $issuedate = date('F d, Y', strtotime($certificate['issuedate'])); + $expirydate = date('F d, Y', strtotime($certificate['expirydate'])); + + // Get status + $today = date('Y-m-d'); + $expiryCheck = date('Y-m-d', strtotime($certificate['expirydate'])); + $daysUntilExpiry = (strtotime($expiryCheck) - strtotime($today)) / (60 * 60 * 24); + + if ($daysUntilExpiry < 0) { + $status = 'Expired'; + $statusColor = '#dc3545'; + } elseif ($daysUntilExpiry <= 30) { + $status = 'Expiring Soon'; + $statusColor = '#ffc107'; + } else { + $status = 'Active'; + $statusColor = '#28a745'; + } + + // Select template and orientation based on type + $template = 'certificate_pdf'; + $orientation = 'portrait'; + + switch($type) { + case 'training': + $template = 'certificates/certificate_training'; + $orientation = 'landscape'; + break; + case 'calibration': + if ($productType == 'tms50i') { + $template = 'certificates/callibrations_template/certificate_tms50i_calibration'; + } else if ($productType == 'tms24i') { + $template = 'certificates/callibrations_template/certificate_tms24i_calibration'; + } else if ($productType == 'tms30i') { + $template = 'certificates/callibrations_template/certificate_tms30i_calibration'; + } else if ($productType == 'bs430') { + $template = 'certificates/callibrations_template/certificate_bs430_calibration'; + } else if ($productType == 'cl900i') { + $template = 'certificates/callibrations_template/certificate_cl900i_calibration'; + } else if ($productType == 'jokoh') { + $template = 'certificates/callibrations_template/certificate_jokoh_calibration'; + } else if ($productType == 'bc760r') { + $template = 'certificates/callibrations_template/certificate_bc760r_calibration'; + } else if ($productType == 'bc5140') { + $template = 'certificates/callibrations_template/certificate_bc5140_calibration'; + } else { + return $this->response->setStatusCode(404)->setJSON(['error' => 'Not Found']); + } + $orientation = 'portrait'; + break; + case 'maintenance': + $template = 'certificates/certificate_maintenance'; + $orientation = 'landscape'; + break; + } + + $html = view($template, [ + 'certificate' => $certificate, + 'issuedate' => $issuedate, + 'expirydate' => $expirydate, + 'status' => $status, + 'statusColor' => $statusColor + ]); + + $dompdf->loadHtml($html); + // $dompdf->set_option('isRemoteEnabled', true); + $dompdf->setPaper('A4', $orientation); + $dompdf->render(); + + // Output PDF + $filename = 'Certificate_' . $certificate['certid'] . '.pdf'; + $dompdf->stream($filename, ['Attachment' => false]); + } +} \ No newline at end of file diff --git a/app/Views/certificate_calibration_index.php b/app/Views/certificate_calibration_index.php new file mode 100644 index 0000000..498acce --- /dev/null +++ b/app/Views/certificate_calibration_index.php @@ -0,0 +1,655 @@ +extend('layouts/main.php') ?> + +section('content') ?> + +
+
+
+
+

Certificates Calibration Management

+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + Expired'; + $statusClass = 'expired'; + } elseif($daysUntilExpiry <= 30) { + $statusBadge = 'Expiring Soon'; + $statusClass = 'expiring'; + } else { + $statusBadge = 'Active'; + $statusClass = 'active'; + } + } else { + $expirydate = '-'; + $statusBadge = 'N/A'; + $statusClass = ''; + } + + // Type badge + $typeBadge = ''; + switch(strtolower($type)) { + case 'calibration': + $typeBadge = 'calibration'; + break; + case 'training': + $typeBadge = 'Training'; + break; + case 'maintenance': + $typeBadge = 'Maintenance'; + break; + default: + $typeBadge = '' . htmlspecialchars($type) . ''; + } + ?> + + + + + + + + + + + + + +
NoCertificate NameProduct/EquipmentTypeIssue DateExpiry DateStatusVendorAction
+ +
+ ID: +
+ + +
SN: + + +
+
+ +
+
+
+
+
+
+
+
+
+ + + + +endSection() ?> + +section('script') ?> + +endSection() ?> \ No newline at end of file diff --git a/app/Views/certificate_index.php b/app/Views/certificate_index.php new file mode 100644 index 0000000..12d95d0 --- /dev/null +++ b/app/Views/certificate_index.php @@ -0,0 +1,577 @@ +extend('layouts/main.php') ?> + +section('content') ?> + +
+
+
+
+

Certificates Management

+
+ +
+ +
+
+
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + Expired'; + $statusClass = 'expired'; + } elseif($daysUntilExpiry <= 30) { + $statusBadge = 'Expiring Soon'; + $statusClass = 'expiring'; + } else { + $statusBadge = 'Active'; + $statusClass = 'active'; + } + } else { + $expirydate = '-'; + $statusBadge = 'N/A'; + $statusClass = ''; + } + + // Type badge + $typeBadge = ''; + switch(strtolower($type)) { + case 'calibration': + $typeBadge = 'Calibration'; + break; + case 'training': + $typeBadge = 'Training'; + break; + case 'maintenance': + $typeBadge = 'Maintenance'; + break; + default: + $typeBadge = '' . htmlspecialchars($type) . ''; + } + ?> + + + + + + + + + + + + + + + +
NoCertificate NameProduct/EquipmentTypeIssue DateExpiry DateStatusVendorAction
+ +
+ ID: +
+ + +
SN: + +
+
+ + +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + +endSection() ?> + +section('script') ?> + +endSection() ?> diff --git a/app/Views/certificate_maintenance_index.php b/app/Views/certificate_maintenance_index.php new file mode 100644 index 0000000..50fccb3 --- /dev/null +++ b/app/Views/certificate_maintenance_index.php @@ -0,0 +1,361 @@ +extend('layouts/main.php') ?> + +section('content') ?> + +
+
+
+
+

Certificates Maintenance Management

+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + Expired'; + $statusClass = 'expired'; + } elseif($daysUntilExpiry <= 30) { + $statusBadge = 'Expiring Soon'; + $statusClass = 'expiring'; + } else { + $statusBadge = 'Active'; + $statusClass = 'active'; + } + } else { + $expirydate = '-'; + $statusBadge = 'N/A'; + $statusClass = ''; + } + ?> + + + + + + + + + + + + +
NoCertificate NameProduct/EquipmentIssue DateExpiry DateStatusVendorAction
+ +
+ ID: +
+ + +
SN: + + +
+
+ +
+
+
+
+
+
+
+
+
+ + + + +endSection() ?> + +section('script') ?> + +endSection() ?> \ No newline at end of file diff --git a/app/Views/certificate_training_index.php b/app/Views/certificate_training_index.php new file mode 100644 index 0000000..1e731d0 --- /dev/null +++ b/app/Views/certificate_training_index.php @@ -0,0 +1,361 @@ +extend('layouts/main.php') ?> + +section('content') ?> + +
+
+
+
+

Certificates Training Management

+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + Expired'; + $statusClass = 'expired'; + } elseif($daysUntilExpiry <= 30) { + $statusBadge = 'Expiring Soon'; + $statusClass = 'expiring'; + } else { + $statusBadge = 'Active'; + $statusClass = 'active'; + } + } else { + $expirydate = '-'; + $statusBadge = 'N/A'; + $statusClass = ''; + } + ?> + + + + + + + + + + + + +
NoCertificate NameProduct/EquipmentIssue DateExpiry DateStatusVendorAction
+ +
+ ID: +
+ + +
SN: + + +
+
+ +
+
+
+
+
+
+
+
+
+ + + + +endSection() ?> + +section('script') ?> + +endSection() ?> \ No newline at end of file diff --git a/app/Views/certificates/callibrations_template/certificate_bc5140_calibration.php b/app/Views/certificates/callibrations_template/certificate_bc5140_calibration.php new file mode 100644 index 0000000..9397af2 --- /dev/null +++ b/app/Views/certificates/callibrations_template/certificate_bc5140_calibration.php @@ -0,0 +1,403 @@ + + + + + + Certificate of Instruments TMS50i + + + + + +
+ +
+ Nomor: FO.III.12/04.00/2019 +
+ +
+

Certificate of Instrument Calibration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Customer Data

+
+ Laboratory / Hospital + + : Trisensa Diagnostic Center +
+ Address + + : Jl. Taman AIS Yasin No.5, Embong Kaliasin, Kec. Genteng, Surabaya 60271 +
+ Instrument + + : Clinical Chemistry Analyzer TMS 50i Superior +
+ Serial Number + + : 5303150816 +
+ Date of Calibration + + : January 09, 2026 +
+ Valid Until + + : January 09, 2027 +
+ +
+ +
+ + + +

Required Material

SC Cal +

Procedure

Checking Instrument Status, Running Callibartion +

Requirement

Deviation must be ≤ 2.0% ; 3 Impedance measurement must be OK; Measurement point must be within +

Results

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParametersValueRangeUnitResult
Power +12V11.7911.00 - 14.00VPass
Power +24V24.0620.00 - 30.00VPass
Analog +12V11.7011.00 - 13.00VPass
Analog -12V-11.72-14.00 - -9.00VPass
Digital +56V56.0547.00 - 63.00VPass
HGB Blank Voltage4.213.85 - 4.85VPass
FS Blank Voltage0.290.07 - 1.00VPass
Laser Diode Current2820 - 70mAPass
Diluent Temperature2710.00 - 40.00°CPass
Reagent preheating Temperature42.239.5 - 44.0°CPass
Optical System Temperature29.415.0 - 40.0°CPass
Liquid Pressure92.070.00 - 110.0kPaPass
Vacuum-28.6-35.0 - -26.0kPaPass
WBC99.9375 - 125%Pass
RBC101.4975 - 125%Pass
HGB99.6575 - 125%Pass
MCV99.9475 - 125%Pass
PLT101.6075 - 125%Pass
+ +
+

Conclusion

+ Instrument Auto Hematology Analyzer BC-5140 has been already calibrated. The result of calibration + is good. +
+ +
+ + +
+ +
+ +
+ + + \ No newline at end of file diff --git a/app/Views/certificates/callibrations_template/certificate_bc760r_calibration.php b/app/Views/certificates/callibrations_template/certificate_bc760r_calibration.php new file mode 100644 index 0000000..7d859c7 --- /dev/null +++ b/app/Views/certificates/callibrations_template/certificate_bc760r_calibration.php @@ -0,0 +1,418 @@ + + + + + + Certificate of Instruments TMS50i + + + + + +
+ +
+ Nomor: FO.III.12/04.00/2019 +
+ +
+

Certificate of Instrument Calibration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Customer Data

+
+ Laboratory / Hospital + + : Trisensa Diagnostic Center +
+ Address + + : Jl. Taman AIS Yasin No.5, Embong Kaliasin, Kec. Genteng, Surabaya 60271 +
+ Instrument + + : Clinical Chemistry Analyzer TMS 50i Superior +
+ Serial Number + + : 5303150816 +
+ Date of Calibration + + : January 09, 2026 +
+ Valid Until + + : January 09, 2027 +
+ +
+ +
+ + + + + + + + + + + + + + +
+

Required Material

+
SC Cal
+

Procedure

+
+ Checking Instrument Status, Running Callibartion +
+

Requirement

+
+ Deviation must be ≤ 2.0% ; 3 Impedance measurement must be OK; Measurement point must be within range +
+ +

Results

+ + + + + + + + +
+

Calibration Factor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParametersReferenceValueResult
WBC75 - 12595.20Pass
RBC75 - 125105.38Pass
HGB75 - 125101.86Pass
MCV75 - 125104.22Pass
PCT75 - 125105.58Pass
RBC-O75 - 125--
PCT-O75 - 125--
PCT-H75 - 125--
+
+

Optical

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParametersDeviationResult
DIFF_FS0.1Pass
DIFF_SS0.8Pass
DIFF_FC0.5Pass
DIFF_PMTN/APass
RET_FS--
RET_SS--
RET_FC--
RET_PMT--
+
+ +

Impedance

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ParametersTarget123Result
MCV_G93.197.992.793.3OK
HGB4.404.754.404.40OK
+ +

ESR Measurement Point

+ + + + + + + + + + + + + +
ParametersTestedReferenceResult
Measurement Point (µL)-135 - 180-
+ + +
+

Conclusion

+

Instrument Auto Hematology Analyzer BC-760R has been already calibrated. + The result of calibration is good.

+
+ +
+ + +
+ +
+ +
+ + + \ No newline at end of file diff --git a/app/Views/certificates/callibrations_template/certificate_bs430_calibration.php b/app/Views/certificates/callibrations_template/certificate_bs430_calibration.php new file mode 100644 index 0000000..f6570dc --- /dev/null +++ b/app/Views/certificates/callibrations_template/certificate_bs430_calibration.php @@ -0,0 +1,283 @@ + + + + + + Certificate of Instruments TMS50i + + + + + +
+ +
+ Nomor: FO.III.12/04.00/2019 +
+ +
+

Certificate of Instrument Calibration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Customer Data

+
+ Laboratory / Hospital + + : Trisensa Diagnostic Center +
+ Address + + : Jl. Taman AIS Yasin No.5, Embong Kaliasin, Kec. Genteng, Surabaya 60271 +
+ Instrument + + : Clinical Chemistry Analyzer TMS 50i Superior +
+ Serial Number + + : 5303150816 +
+ Date of Calibration + + : January 09, 2026 +
+ Valid Until + + : January 09, 2027 +
+ +
+ +
+

Required Material

+ - + +

Procedure

+ Running 60 samples (Aquadibidestilata) for 12 Wavelength + +

Requirement

+ Expected Result : (-20) - (+20) + +

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParametersValueRangeUnitResult
Reaction Carousel Temperature37.036.7 - 37.3°CPass
Cuvette Cleaning Fluid Temperature44.039.0 - 49.0°CPass
Cuvette Wash Solution Temperature44.239.0 - 49.00°CPass
Cuvette CheckNo Yellow CuvetteN/APass
Photometer Check79975000-8000λPass
Bar Code Stability CheckReadRead / No ReadN/APass
+ +
+

Conclusion

+ Instrument BS-430 Chemistry Analyzer has been already calibrated. + The result of calibration is good. +
+
+ +
+ +
+ +
+ + + \ No newline at end of file diff --git a/app/Views/certificates/callibrations_template/certificate_cl900i_calibration.php b/app/Views/certificates/callibrations_template/certificate_cl900i_calibration.php new file mode 100644 index 0000000..d27a9c0 --- /dev/null +++ b/app/Views/certificates/callibrations_template/certificate_cl900i_calibration.php @@ -0,0 +1,306 @@ + + + + + + Certificate of Instruments TMS50i + + + + + +
+ +
+ Nomor: FO.III.12/04.00/2019 +
+ +
+

Certificate of Instrument Calibration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Customer Data

+
+ Laboratory / Hospital + + : Trisensa Diagnostic Center +
+ Address + + : Jl. Taman AIS Yasin No.5, Embong Kaliasin, Kec. Genteng, Surabaya 60271 +
+ Instrument + + : Clinical Chemistry Analyzer TMS 50i Superior +
+ Serial Number + + : 5303150816 +
+ Date of Calibration + + : January 09, 2026 +
+ Valid Until + + : January 09, 2027 +
+ +
+ +
+

Required Material

+ Aquadibidestilata + +

Procedure

+ Running 60 samples (Aquadibidestilata) for 12 Wavelength +
+ (340, 380, 405, 450, 505, 546, 570, 600, 660, 700, 750 and 800 nm) + +

Requirement

+ Expected Result : (-20) - (+20) + +

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParametersValueRangeUnitResult
Incubation Module37.036.7 - 37.3°CPass
Reagent Compartment5.02.0 - 8.0°CPass
Power 24V Voltage23.9420 - 30VoltPass
Power 12 V Voltage11.8711.0 - 14.0VoltPass
Vacuum Pressure Check-23.00-24.00 - -34.00KPaPass
DCF Diagnosis0.96 + < 1.5% % + Pass
Substrate Background48SD < 200 N/APass
System Repeatability0.12%CV ≤ 1.5%%Pass
Dark Current Count80.20 - 350N/APass
+ +
+

Conclusion

+ Instrument Chemiluminescence Immunoassay System Mindray CL-900i have been already calibrated. + The result of calibration is good. +
+
+ +
+ +
+ +
+ + + diff --git a/app/Views/certificates/callibrations_template/certificate_jokoh_calibration.php b/app/Views/certificates/callibrations_template/certificate_jokoh_calibration.php new file mode 100644 index 0000000..aaa7e36 --- /dev/null +++ b/app/Views/certificates/callibrations_template/certificate_jokoh_calibration.php @@ -0,0 +1,274 @@ + + + + + + Certificate of Instruments TMS50i + + + + + +
+ +
+ Nomor: FO.III.12/04.00/2019 +
+ +
+

Certificate of Instrument Calibration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Customer Data

+
+ Laboratory / Hospital + + : Trisensa Diagnostic Center +
+ Address + + : Jl. Taman AIS Yasin No.5, Embong Kaliasin, Kec. Genteng, Surabaya 60271 +
+ Instrument + + : Clinical Chemistry Analyzer TMS 50i Superior +
+ Serial Number + + : 5303150816 +
+ Date of Calibration + + : January 09, 2026 +
+ Valid Until + + : January 09, 2027 +
+ +
+ +
+

Required Material

+ Standart Solution 1 +
+ Standart Solution 2 + +

Procedure

+ Running 60 samples (Aquadibidestilata) for 12 Wavelength + +

Requirement

+ Expected Result : +
+ Slope Na : (+40) - (+72) mV/dec +
+ Slope K : (+40) - (+67) mV/dec +
+ Slope Cl : (-25) - (-62) mV/dec + +

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type of CalibrationSlope NaStatusSlope KStatusSlope ClStatus
Auto Calibration(+46.4)PASS(+52.2)PASS(-41.0)PASS
Manual Calibration(+46.6)PASS(+51.7)PASS(-42.0)PASS
Slope Wash Calibration(+44.5)PASS(+50.9)PASS(-40.9)PASS
+ +
+

Conclusion

+ Instrument JOKOH EX-D have been already calibrated. + The Result of Calibration is good. +
+
+ +
+ +
+ +
+ + + \ No newline at end of file diff --git a/app/Views/certificates/callibrations_template/certificate_tms24i_calibration.php b/app/Views/certificates/callibrations_template/certificate_tms24i_calibration.php new file mode 100644 index 0000000..b8ba544 --- /dev/null +++ b/app/Views/certificates/callibrations_template/certificate_tms24i_calibration.php @@ -0,0 +1,302 @@ + + + + + + Certificate of Instruments TMS50i + + + + + +
+ +
+ Nomor: FO.III.12/04.00/2019 +
+ +
+

Certificate of Instrument Calibration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Customer Data

+
+ Laboratory / Hospital + + : Trisensa Diagnostic Center +
+ Address + + : Jl. Taman AIS Yasin No.5, Embong Kaliasin, Kec. Genteng, Surabaya 60271 +
+ Instrument + + : Clinical Chemistry Analyzer TMS 50i Superior +
+ Serial Number + + : 5303150816 +
+ Date of Calibration + + : January 09, 2026 +
+ Valid Until + + : January 09, 2027 +
+ +
+ +
+

Required Material

+ Aquadibidestilata + +

Procedure

+ Running 60 samples (Aquadibidestilata) for 12 Wavelength +
+ (340, 380, 405, 450, 505, 546, 570, 600, 660, 700, 750 and 800 nm) + +

Requirement

+ Expected Result : (-20) - (+20) + +

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wave LengthNumber of RunResultStatusWave LengthNumber of RunResultStatus
340 nm60-2PASS570 nm60-1PASS
380 nm60-1PASS600 nm600PASS
405 nm600PASS660 nm60-2PASS
450 nm60-1PASS700 nm60-2PASS
505 nm60-3PASS750 nm60-1PASS
546 nm60-1PASS800 nm60-2PASS
+ +
+

Conclusion

+

Instrument TMS 24i Premium have been already calibrated. + The Result of Calibration is good.

+
+
+ +
+ +
+ +
+ + + diff --git a/app/Views/certificates/callibrations_template/certificate_tms30i_calibration.php b/app/Views/certificates/callibrations_template/certificate_tms30i_calibration.php new file mode 100644 index 0000000..de7e2bb --- /dev/null +++ b/app/Views/certificates/callibrations_template/certificate_tms30i_calibration.php @@ -0,0 +1,312 @@ + + + + + + Certificate of Instruments TMS50i + + + + + +
+ +
+ Nomor: FO.III.12/04.00/2019 +
+ +
+

Certificate of Instrument Calibration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Customer Data

+
+ Laboratory / Hospital + + : Trisensa Diagnostic Center +
+ Address + + : Jl. Taman AIS Yasin No.5, Embong Kaliasin, Kec. Genteng, Surabaya 60271 +
+ Instrument + + : Clinical Chemistry Analyzer TMS 50i Superior +
+ Serial Number + + : 5303150816 +
+ Date of Calibration + + : January 09, 2026 +
+ Valid Until + + : January 09, 2027 +
+ +
+ +
+

Required Material

+ Aquadibidestilata + +

Procedure

+ Running 60 samples (Aquadibidestilata) for 12 Wavelength +
+ (340, 380, 405, 450, 505, 546, 570, 600, 660, 700, 750 and 800 nm) + +

Requirement

+ Expected Result : (-20) - (+20) + +

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wave LengthNumber of RunResultStatusWave LengthNumber of RunResultStatus
340 nm601PASS570 nm600PASS
380 nm601PASS600 nm600PASS
405 nm600PASS660 nm600PASS
450 nm600PASS700 nm600PASS
480 nm600PASS750 nm600PASS
505 nm600PASS800 nm600PASS
546 nm600PASS
+ +
+

Conclusion

+

Instrument TMS 30i have been already calibrated. + The Result of Calibration is good.

+
+
+ +
+ +
+ +
+ + + \ No newline at end of file diff --git a/app/Views/certificates/callibrations_template/certificate_tms50i_calibration.php b/app/Views/certificates/callibrations_template/certificate_tms50i_calibration.php new file mode 100644 index 0000000..e3d9f4e --- /dev/null +++ b/app/Views/certificates/callibrations_template/certificate_tms50i_calibration.php @@ -0,0 +1,301 @@ + + + + + + Certificate of Instruments TMS50i + + + + + +
+ +
+ Nomor: FO.III.12/04.00/2019 +
+ +
+

Certificate of Instrument Calibration

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Customer Data

+
+ +
+ Laboratory / Hospital + + : Trisensa Diagnostic Center +
+ Address + + : Jl. Taman AIS Yasin No.5, Embong Kaliasin, Kec. Genteng, Surabaya +
+ Instrument + + : Clinical Chemistry Analyzer TMS 50i Superior +
+ Serial Number + + : 5303150816 +
+ Date of Calibration + + : January 09, 2026 +
+ Valid Until + + : January 09, 2027 +
+
+ +
+

Required Material

Aquadibidestilata + +

Procedure

+ Running 60 samples (Aquadibidestilata) for 12 Wavelength (340, 380, 405, 450, 505, 546, 570, 600, 660, 700, 750 and 800 nm) + +

Requirement

+ Expected Result : (-20) - (+20) + +

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wave LengthNumber of RunResultStatusWave LengthNumber of RunResultStatus
340 nm60-2PASS570 nm601PASS
380 nm60-1PASS600 nm602PASS
405 nm600PASS660 nm603PASS
450 nm601PASS700 nm602PASS
505 nm602PASS750 nm602PASS
546 nm601PASS800 nm602PASS
+ +
+

Conclusion

+

Instrument TMS 50i Superior have been already calibrated. + The Result of Calibration is good.

+
+
+ +
+ +
+ +
+ + + diff --git a/app/Views/certificates/certificate_maintenance.php b/app/Views/certificates/certificate_maintenance.php new file mode 100644 index 0000000..fc3ee19 --- /dev/null +++ b/app/Views/certificates/certificate_maintenance.php @@ -0,0 +1,183 @@ + + + + + Maintenance Certificate - <?= $certificate['certname'] ?> + + + +
+ +
+ +
+
+

<<Nama Alat>>

+
+ +
+

at <<Nama Rumah Sakit / Laboratorium - Kota>>

+
+ +
+

Serial Number: <<Serial Number>>

+ +

has completed through a series of <<Jenis Sertifikat>>

+

and the final result:

+

PASSED

+

Date of <<Jenis Sertifikat>> and Inspection: <<Tanggal Terbit>>

+

<<Valid>> <<Tanggal Berakhir>>

+
+ + + + + + + +
+ Adhitya Pranata Putra + Technical Support Manager + + <<Nama TSO>> + <<Jabatan>> +
+ +
+

<<FO>>

+
+ +
+ +
+
+

<<Nama Alat>>

+
+ +
+

at <<Nama Rumah Sakit / Laboratorium - Kota>>

+
+ +
+

Serial Number: <<Serial Number>>

+ +

has completed through a series of <<Jenis Sertifikat>>

+

and the final result:

+

PASSED

+

Date of <<Jenis Sertifikat>> and Inspection: <<Tanggal Terbit>>

+

<<Valid>> <<Tanggal Berakhir>>

+
+ + + + + + + +
+ Adhitya Pranata Putra + Technical Support Manager + + <<Nama TSO>> + <<Jabatan>> +
+ +
+

<<FO>>

+
+ +
+ + + diff --git a/app/Views/certificates/certificate_maintenance_index.php b/app/Views/certificates/certificate_maintenance_index.php new file mode 100644 index 0000000..97de5c7 --- /dev/null +++ b/app/Views/certificates/certificate_maintenance_index.php @@ -0,0 +1,545 @@ +extend('layouts/main.php') ?> + +section('content') ?> + +
+
+
+
+

Certificates Maintenance Management

+
+
+ +
+
+ +
+
+
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + Expired'; + $statusClass = 'expired'; + } elseif($daysUntilExpiry <= 30) { + $statusBadge = 'Expiring Soon'; + $statusClass = 'expiring'; + } else { + $statusBadge = 'Active'; + $statusClass = 'active'; + } + } else { + $expirydate = '-'; + $statusBadge = 'N/A'; + $statusClass = ''; + } + + // Type badge + $typeBadge = ''; + switch(strtolower($type)) { + case 'calibration': + $typeBadge = 'Calibration'; + break; + case 'training': + $typeBadge = 'Training'; + break; + case 'maintenance': + $typeBadge = 'Maintenance'; + break; + default: + $typeBadge = '' . htmlspecialchars($type) . ''; + } + ?> + + + + + + + + + + + + + + + + + +
NoCertificate NameProduct/EquipmentTypeIssue DateExpiry DateStatusVendorAction
+ +
+ ID: +
+ + +
SN: + +
+
+ + + +
+
+ +

No certificates found

+ +
+
+
+
+
+
+
+
+ + + + + + + + + + +endSection() ?> + +section('script') ?> + +endSection() ?> diff --git a/app/Views/certificates/certificate_training.php b/app/Views/certificates/certificate_training.php new file mode 100644 index 0000000..e8f6d48 --- /dev/null +++ b/app/Views/certificates/certificate_training.php @@ -0,0 +1,150 @@ + + + + + Maintenance Certificate - <?= $certificate['certname'] ?> + + + +
+ +
+ +
+
+

<<Nama Analis>>

+
+ +
+

at <<Nama Rumah Sakit / Laboratorium - Kota>>

+
+ +
+

In Recording of Participation and Successful

+

Completion of Mindray Hematology Analyzer Training

+

BC5140

+

Date : February 05, 2026

+
+ + + + + + + +
+
+
+
+
+ Adhitya Pranata Putra + Technical Support Manager +
+ Trainer, +
+
+
+ <<Nama TSO>> + <<Jabatan>> +
+ +
+

<<FO>>

+
+ +
+ + + diff --git a/app/Views/layouts/_sidebar.php b/app/Views/layouts/_sidebar.php index 99e4243..0d787af 100644 --- a/app/Views/layouts/_sidebar.php +++ b/app/Views/layouts/_sidebar.php @@ -212,16 +212,25 @@
  • Transactions
  • +
  • + +
  • +
  • +
  • - + + diff --git a/public/assets/images/background_certificate/maintenance.jpeg b/public/assets/images/background_certificate/maintenance.jpeg new file mode 100644 index 0000000..35de057 Binary files /dev/null and b/public/assets/images/background_certificate/maintenance.jpeg differ