<?php



use CodeIgniter\Router\RouteCollection;



/**

 * @var RouteCollection $routes

 */

$routes->get('/', 'Home::index', ['filter' => 'auth']);

$routes->get('upload', 'Upload::index', ['filter' => 'auth']); // Add this line.

$routes->get('dashboard/chartincome', 'Home::chartIncome', ['filter' => 'auth']); // Add this line.

$routes->get('dashboard/recent', 'Home::recent', ['filter' => 'auth']); // Add this line.

$routes->get('dashboard/client', 'Home::client', ['filter' => 'auth']); // Add this line.

$routes->get('dashboard/clientbyid', 'Home::clientbyid', ['filter' => 'auth']); // Add this line.

$routes->get('products/getproducts', 'Invoice::getproducts', ['filter' => 'auth']); // Add this line.

$routes->get('invoice/create', 'Invoice::create', ['filter' => 'auth']); // Add this line.

$routes->get('invoice/update', 'Invoice::update', ['filter' => 'auth']); // Add this line.

$routes->get('invoice/qcupdate', 'Invoice::qcupdate', ['filter' => 'auth']); // Add this line.

$routes->get('invoice/list', 'Invoice::list', ['filter' => 'auth']); // Add this line.

$routes->get('invoice/payment', 'Invoice::payment', ['filter' => 'auth']); // Add this line.

$routes->get('invoice/getData', 'Invoice::getData', ['filter' => 'auth']);

$routes->get('invoice/test', 'Invoice::test', ['filter' => 'auth']);

$routes->get('invoice/deleteOrder', 'Invoice::deleteOrder', ['filter' => 'auth']);

$routes->get('invoice/qcapp', 'Invoice::qcapp', ['filter' => 'auth']);

$routes->get('invoice/index', 'Invoice::index', ['filter' => 'auth']);

$routes->get('/login', 'Auth::login', );

$routes->get('/logout', 'Auth::logout', );

$routes->get('/zzzz', 'Home::zzzz', );

$routes->get('/zzzz', 'Home::zzzz', );

$routes->get('invoice/print', 'Invoice::print', ['filter' => 'auth']);

$routes->get('invoice/activity', 'Invoice::activity', ['filter' => 'auth']);

$routes->get('orders/delivery', 'Invoice::delivery', ['filter' => 'auth']);

$routes->get('invoice/getDelivery', 'Invoice::getDelivery', ['filter' => 'auth']);

$routes->get('orders/getNow', 'Job::getNow', ['filter' => 'auth']);

$routes->get('orders/getSuratJalan', 'Job::getSuratJalan', ['filter' => 'auth']);

$routes->get('Stock/history', 'Stock::history', ['filter' => 'auth']);

$routes->get('Stock/generatedata', 'Stock::generatedata', ['filter' => 'auth']);

$routes->get('Stock/', 'Stock::index', ['filter' => 'auth']);

$routes->get('Stock/getStockindata', 'Stock::getStockindata', ['filter' => 'auth']);

$routes->get('Stock/getOpname', 'Stock::getOpname', ['filter' => 'auth']);

$routes->get('Stock/create', 'Stock::create', ['filter' => 'auth']);

$routes->get('open/calendar', 'Open::calendar');

$routes->get('laporan/invoice', 'Laporan::invoice');

$routes->get('ticket/getData', 'Ticket::getData', ['filter' => 'auth']);

$routes->get('ticket/', 'Ticket::list', ['filter' => 'auth']);

$routes->get('ticket/update', 'Ticket::update', ['filter' => 'auth']);

$routes->get('ticket/get/chat', 'Ticket::chat', ['filter' => 'auth']);

$routes->get('admin/', 'Admin::index', ['filter' => 'auth']);

$routes->get('admin/revenue', 'Admin::revenue', ['filter' => 'auth']);

$routes->get('admin/generateabsensi', 'Admin::generateabsensi', ['filter' => 'auth']);


$routes->get('admin/getabsensi', 'Admin::getabsensi', ['filter' => 'auth']);

$routes->get('admin/getlembur', 'Admin::getlembur', ['filter' => 'auth']);

$routes->get('admin/getgaji', 'Admin::getgaji', ['filter' => 'auth']);

$routes->get('admin/getpenalty', 'Admin::getpenalty', ['filter' => 'auth']);

$routes->get('admin/get/karyawan', 'Admin::getkaryawan', ['filter' => 'auth']);

$routes->get('admin/get/lemburbyid/(:num)', 'Admin::getlemburbyid/$1', ['filter' => 'auth']);

$routes->get('admin/get/absenbyid/(:num)', 'Admin::getabsensibyid/$1', ['filter' => 'auth']);

$routes->get('admin/get/getpenaltybyid/(:num)', 'Admin::getpenaltybyid/$1', ['filter' => 'auth']);

$routes->get('admin/get/gajibyid/(:num)', 'Admin::getgajibyid/$1', ['filter' => 'auth']);

$routes->get('admin/get/totallemburbyid/(:num)', 'Admin::getTotalLemburbyid/$1', ['filter' => 'auth']);

$routes->get('admin/get/totalmesinbyid/(:num)', 'Admin::getTotalMesinbyid/$1', ['filter' => 'auth']);

$routes->get('admin/get/totalpenalty/(:num)', 'Admin::gettotalpenaltybyid/$1', ['filter' => 'auth']);

$routes->get('admin/get/revenue', 'Reports::getrevenue', ['filter' => 'auth']);





$routes->post('invoice/store', 'Invoice::store', ['filter' => 'auth']); // Add this line.

$routes->post('upload/upload', 'Upload::upload', ['filter' => 'auth']); // Add this line.

$routes->post('dashboard/clientbyid', 'Home::clientbyid', ['filter' => 'auth']); // Add this line.

$routes->post('dashboard/clientreg', 'Home::clientreg', ['filter' => 'auth']); // Add this line.

$routes->post('products/getproducts', 'Invoice::getproducts', ['filter' => 'auth']); // Add this line.

$routes->post('invoice/post', 'Invoice::post', ['filter' => 'auth']);

$routes->post('invoice/qcpost', 'Invoice::qcpost', ['filter' => 'auth']);

$routes->post('invoice/getData', 'Invoice::getData', ['filter' => 'auth']);

$routes->post('invoice/datatable', 'Invoice::datatable', ['filter' => 'auth']);

$routes->post('/processLogin', 'Auth::processLogin', );

$routes->post('orders/addDelivery', 'Job::addDelivery', ['filter' => 'auth']);

$routes->post('orders/deleteItem', 'Job::deleteItem', ['filter' => 'auth']);

$routes->post('orders/saveDelivery', 'Job::saveDelivery', ['filter' => 'auth']);

$routes->post('Stock/addstock', 'Stock::addstock', ['filter' => 'auth']);

$routes->post('Stock/addopname', 'Stock::addopname', ['filter' => 'auth']);

$routes->post('ticket/getData', 'Ticket::getData', ['filter' => 'auth']);

$routes->post('ticket/post/chat', 'Ticket::send_chat', ['filter' => 'auth']);

$routes->post('ticket/post/sentinv', 'Ticket::sentinv', ['filter' => 'auth']);

$routes->post('admin/post/updatelembur', 'Admin::lemburupdate', ['filter' => 'auth']);

$routes->post('admin/post/updategaji', 'Admin::gajiupdate', ['filter' => 'auth']);

$routes->post('admin/post/updateabsensi', 'Admin::absensiupdate', ['filter' => 'auth']);

$routes->post('admin/post/updatepenalty', 'Admin::penaltyupdate', ['filter' => 'auth']);

$routes->post('admin/post/karyawandata', 'Admin::getkaryawandata', ['filter' => 'auth']);

$routes->post('admin/post/creategaji', 'Admin::creategaji', ['filter' => 'auth']);

$routes->post('admin/post/createpenalty', 'Admin::createpenalty', ['filter' => 'auth']);
$routes->post('admin/post/createabsen', 'Admin::addAbsensi', ['filter' => 'auth']);







//// APIIIII POSTT

$routes->get('api/post-data', 'Api::postData', ['filter' => 'apikey']);



$routes->post('api/post-data', 'Api::postData', ['filter' => 'apikey']);

$routes->post('api/post/lembur', 'Api::lembur', ['filter' => 'apikey']);