<?php

use CodeIgniter\Router\RouteCollection;

/**
 * @var RouteCollection $routes
 */
$routes->get('/', 'Home::index');
$routes->get('services', 'Home::services');
$routes->get('services/(:num)', 'Home::services/$1');
$routes->get('projects', 'Home::projects');
$routes->get('project_details/(:num)', 'Home::project_details/$1');
$routes->get('gallery', 'Home::gallery');
$routes->get('about', 'Home::about');
$routes->get('contact', 'Home::contact');
$routes->get('gallery', 'Home::gallery');

$routes->group('employee', ['namespace' => 'App\Controllers'], function($routes) {
    $routes->get('/', 'Employee::index');
    $routes->get('my_expenses', 'Employee::my_expenses');
    $routes->post('save_attendance', 'Employee::save_attendance');
    $routes->get('my_attendance', 'Employee::my_attendance');
    $routes->get('my_projects', 'Employee::my_projects');
    $routes->get('profile', 'Employee::profile');
    $routes->post('profile', 'Employee::profile');
    $routes->get('settings', 'Employee::settings');
    $routes->post('settings', 'Employee::settings');
    $routes->get('project_expenses/(:num)', 'Employee::project_expenses/$1');
    $routes->post('project_expenses/(:num)', 'Employee::project_expenses/$1');
});

$routes->get('admin', 'Admin::index');
$routes->get('admin/projects', 'Admin::projects');
$routes->get('admin/project_assign/(:num)', 'Admin::project_assign/$1');
$routes->post('admin/project_assign_save/(:num)', 'Admin::project_assign_save/$1');
$routes->get('admin/project_sheet/(:num)', 'Admin::project_sheet/$1');
$routes->get('admin/project_sheet/(:num)/(:num)', 'Admin::project_sheet/$1/$2');
$routes->post('admin/save_sheet/(:num)', 'Admin::save_sheet/$1');
$routes->post('admin/save_sheet/(:num)/(:num)', 'Admin::save_sheet/$1/$2');
$routes->post('admin/create_table/(:num)', 'Admin::create_table/$1');
$routes->post('admin/delete_folder/(:num)', 'Admin::delete_folder/$1');
$routes->get('admin/delete_table/(:num)/(:num)', 'Admin::delete_table/$1/$2');
$routes->get('admin/duplicate_table/(:num)/(:num)', 'Admin::duplicate_table/$1/$2');
$routes->post('admin/rename_table/(:num)', 'Admin::rename_table/$1');
$routes->post('admin/move_table/(:num)', 'Admin::move_table/$1');
$routes->get('admin/project_expenses/(:num)', 'Admin::project_expenses/$1');
$routes->post('admin/save_expenses/(:num)', 'Admin::save_expenses/$1');
$routes->get('admin/project_add', 'Admin::project_add');
$routes->post('admin/project_save', 'Admin::project_save');
$routes->get('admin/project_edit/(:num)', 'Admin::project_edit/$1');
$routes->get('admin/project_delete/(:num)', 'Admin::project_delete/$1');
$routes->get('admin/employees', 'Admin::employees');
$routes->get('admin/employee_add', 'Admin::employee_add');
$routes->post('admin/employee_save', 'Admin::employee_save');
$routes->get('admin/employee_edit/(:num)', 'Admin::employee_edit/$1');
$routes->get('admin/employee_delete/(:num)', 'Admin::employee_delete/$1');
$routes->post('admin/employee_import', 'Admin::employee_import');
$routes->get('admin/employee_sample_csv', 'Admin::employee_sample_csv');
$routes->get('admin/attendance', 'Admin::attendance');
$routes->get('admin/attendance_approve/(:num)', 'Admin::attendance_approve/$1');
$routes->get('admin/attendance_reject/(:num)', 'Admin::attendance_reject/$1');
$routes->get('admin/categories', 'Admin::categories');
$routes->post('admin/category_save', 'Admin::category_save');
$routes->get('admin/settings', 'Admin::settings');
$routes->post('admin/settings_save', 'Admin::settings_save');
$routes->get('admin/services', 'Admin::services');
$routes->get('admin/service_add', 'Admin::service_add');
$routes->post('admin/service_save', 'Admin::service_save');

$routes->get('admin/gallery', 'Admin::gallery');
$routes->get('admin/gallery_add', 'Admin::gallery_add');
$routes->post('admin/gallery_save', 'Admin::gallery_save');
$routes->get('admin/gallery_delete/(:num)', 'Admin::gallery_delete/$1');

$routes->get('admin/banners', 'Admin::banners');
$routes->get('admin/banner_add', 'Admin::banner_add');
$routes->post('admin/banner_save', 'Admin::banner_save');
$routes->get('admin/banner_delete/(:num)', 'Admin::banner_delete/$1');

$routes->get('admin/reports', 'Admin::reports');
$routes->get('admin/registers', 'Admin::registers');
$routes->get('admin/register_new', 'Admin::register_new');
$routes->get('admin/export/(:any)', 'Admin::export/$1');

$routes->get('admin/proposals', 'Admin::proposals');
$routes->get('admin/proposal_add', 'Admin::proposal_add');
$routes->post('admin/proposal_save', 'Admin::proposal_save');
$routes->get('admin/proposal_delete/(:num)', 'Admin::proposal_delete/$1');



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