<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\uiController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/clear', function() {
    $exitCode = Artisan::call('cache:clear');
    $exitCode = Artisan::call('config:cache');
    $exitCode = Artisan::call('config:clear');
    $exitCode = Artisan::call('route:clear');

    return 'DONE'; //Return anything
});

Route::get('/card', [uiController::class, 'card']);



Route::get('/', [uiController::class, 'dashboard']);
Route::get('/dashboard', [uiController::class, 'dashboard'])->name('dashboard');
Route::get('/dashboard/ccustomer', [uiController::class, 'CustomerDashboard'])->name('customer-dashboard');
Route::get('/dashboard/contractor', [uiController::class, 'contractordashboard'])->name('contractor-dashboard');
Route::get('/calendar', [uiController::class, 'calendar'])->name('calendar');


Route::get('/appointment/list', [uiController::class, 'appointmentList'])->name('appointment-list');

Route::get('/user/role', [uiController::class, 'userRole'])->name('user-role');
Route::get('/user/list', [uiController::class, 'userList'])->name('user-list');
Route::get('/user/add', [uiController::class, 'userAdd'])->name('user-add');
Route::get('/user/edit', [uiController::class, 'userEdit'])->name('user-edit');
Route::get('/permission', [uiController::class, 'permissions'])->name('permission');

Route::get('/services/list', [uiController::class, 'serviceList'])->name('service-list');
Route::get('/service/add', [uiController::class, 'serviceAdd'])->name('service-add');
Route::get('/service/edit', [uiController::class, 'serviceEdit'])->name('service-edit');



Route::get('/project/list', [uiController::class, 'projectList'])->name('project-list');
Route::get('/project/add', [uiController::class, 'projectAdd'])->name('project-add');
Route::get('/project/edit', [uiController::class, 'projectEdit'])->name('project-edit');
Route::get('/project/detail', [uiController::class, 'projectDetail'])->name('project-detail');
Route::get('/project/buyer', [uiController::class, 'projectBuyer'])->name('project-buyer');
Route::get('/project/buyer/detail', [uiController::class, 'projectBuyerDetail'])->name('project-buyer-detail');

Route::get('/order/list', [uiController::class, 'orderList'])->name('order-list');
Route::get('/order/add', [uiController::class, 'orderAdd'])->name('order-add');
Route::get('/order/edit', [uiController::class, 'orderEdit'])->name('order-edit');
Route::get('/order/detail', [uiController::class, 'orderDetail'])->name('order-detail');

Route::get('/register', [uiController::class, 'register'])->name('register');
Route::get('/login', [uiController::class, 'login'])->name('login');
Route::get('/forgot', [uiController::class, 'forgotPassword'])->name('forgot-password');
Route::get('/profile', [uiController::class, 'profile'])->name('profile');
Route::get('/activitylog', [uiController::class, 'activityLog'])->name('activity-log');

Route::get('/invoice/list', [uiController::class, 'invoiceList'])->name('invoice-list');
Route::get('/invoice/detail', [uiController::class, 'invoiceDetail'])->name('invoice-detail');
Route::get('/invoice/create/dynamic', [uiController::class, 'invoiceCreate'])->name('invoice-create');
Route::get('/invoice/create/fixed', [uiController::class, 'invoiceCreateFixed'])->name('invoice-create-fixed');
Route::get('/invoice/edit', [uiController::class, 'invoiceEdit'])->name('invoice-edit');

Route::get('/task/list', [uiController::class, 'task'])->name('task');

Route::get('/tickets', [uiController::class, 'ticketing'])->name('ticketing');
Route::get('/tickets/detail', [uiController::class, 'ticketDetail'])->name('ticket-detail');



