From ddfb6a9b66d3c9f839ed14e495d9c81ac07be23f Mon Sep 17 00:00:00 2001 From: mikael-zakaria Date: Mon, 25 Nov 2024 16:46:58 +0700 Subject: [PATCH] Update 1 Sample Print --- app/Config/Routes.php | 3 ++ app/Controllers/Prints.php | 82 ++++++++++++++++++++++++++++++ app/Views/dashboard_viewAccess.php | 26 +++++++++- 3 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 app/Controllers/Prints.php diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 3f31f0a..352e1e2 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -15,6 +15,9 @@ $routes->get('/tubes/unreceive/(:any)/(:any)', 'Tubes::unreceive/$1/$2'); $routes->get('/tubes/unreceiveAll/(:any)', 'Tubes::unreceiveAll/$1'); $routes->post('/tubes/comment/(:any)/(:any)', 'Tubes::comment/$1/$2'); +$routes->get('/prints/sample/(:any)/(:any)', 'Prints::sample/$1/$2'); +// $routes->get('/prints/sample/(:any)/(:any)', 'Prints::sample/$1/$2'); + // Pages $routes->get('/', 'Pages::dashboard_index'); $routes->get('/userroles/', 'Pages::userroles_index'); diff --git a/app/Controllers/Prints.php b/app/Controllers/Prints.php new file mode 100644 index 0000000..a57351c --- /dev/null +++ b/app/Controllers/Prints.php @@ -0,0 +1,82 @@ +response->setJSON( + [ + 'message' => "Label Dicetak", + 'status' => true, + ] + ); + } else { + $output = json_encode($output); // Konversi ke JSON + return $this->response->setJSON( + [ + 'error' => $output, + 'message' => "Label Gagal Dicetak", + 'status' => false, + ] + ); + } + + + } + +} diff --git a/app/Views/dashboard_viewAccess.php b/app/Views/dashboard_viewAccess.php index 7543714..434c453 100644 --- a/app/Views/dashboard_viewAccess.php +++ b/app/Views/dashboard_viewAccess.php @@ -54,7 +54,7 @@ span.badge { cursor:pointer; } } echo "$sampletext"; echo " - + Coll. Un-Coll. Un-Rec. @@ -83,8 +83,32 @@ span.badge { cursor:pointer; }