<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Auth\LoginController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\TimeController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::get('/', function () {
    return view('auth/login');
});
Route::get('/login', [LoginController::class, 'login'])->name('login');
Auth::routes();

Route::post('/logout', [LoginController::class, 'logout'])->name('logout');
Route::post('/get_section', [HomeController::class, 'get_section'])->name('get_section');
Route::post('/Get_SlotList_Schedule', [HomeController::class, 'Get_SlotList_Schedule'])->name('Get_SlotList_Schedule');
Route::post('/Get_Emplyees_Schedule', [HomeController::class, 'Get_Emplyees_Schedule'])->name('Get_Emplyees_Schedule');
Route::post('/op_schedule', [TimeController::class, 'op_schedule'])->name('op_schedule');
Route::post('/View_Scheduled_Emplye', [HomeController::class, 'View_Scheduled_Emplye'])->name('View_Scheduled_Emplye');
Route::post('/get_emp_code', [HomeController::class, 'get_emp_code'])->name('get_emp_code');
Route::get('/get_employee_leave', [HomeController::class, 'get_employee_leave'])->name('get_employee_leave');
Route::get('/Employee_Master', [App\Http\Controllers\HomeController::class, 'Employee_Master'])->name('Employee_Master');
Route::post('/Delete_schedule', [App\Http\Controllers\TimeController::class, 'Delete_schedule'])->name('Delete_schedule');
Route::post('/op_employee', [App\Http\Controllers\TimeController::class, 'op_employee'])->name('op_employee');
Route::post('/op_leave', [App\Http\Controllers\TimeController::class, 'op_leave'])->name('op_leave');


Route::post('/form_sp_leave', [App\Http\Controllers\HomeController::class, 'form_sp_leave'])->name('form_sp_leave');
Route::post('/Get_schedule_report', [App\Http\Controllers\HomeController::class, 'Get_schedule_report'])->name('Get_schedule_report');
Route::post('/form_sp_employee', [App\Http\Controllers\HomeController::class, 'form_sp_employee'])->name('form_sp_employee');
Route::post('/edit_employee', [App\Http\Controllers\HomeController::class, 'edit_employee'])->name('edit_employee');
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
Route::get('/index_report', [App\Http\Controllers\HomeController::class, 'index_report'])->name('index_report');
Route::get('/leave_mark', [App\Http\Controllers\HomeController::class, 'leave_mark'])->name('leave_mark');
Route::get('admin/home', [HomeController::class, 'adminHome'])->name('admin.home')->middleware('is_admin');