- Add status checker + admin secure packages + upgrade enum + add sentry + upgrade to sitemap generator + bump to CRMV2 - Set customer role enum and user role enum - Update customer migration to set roles - phpcbf - faker local to fr - update lang - composer update - bump laravel ui - Redo all user crud - npm bump - Create admin command - rearrange views - redo all auth system - redo customer pro bo
34 lines
1.4 KiB
PHP
34 lines
1.4 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Fo\Pro\CustomerController;
|
|
use App\Http\Controllers\Fo\Pro\DashboardController;
|
|
use App\Http\Controllers\Fo\Pro\ObjectivesController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
// * Pro Intra
|
|
Route::prefix('pro')->name('fo.pro.')
|
|
->middleware([
|
|
// * 'valid-pro' Filter has client_number
|
|
// * 'pro' Filter only role 3
|
|
'auth:frontend', 'verified', 'pro', 'valid-pro'
|
|
])->group(function () {
|
|
Route::resource('customers', CustomerController::class)->only(['edit', 'update']);
|
|
Route::name('customers.')->prefix('{customer}')->group(function () {
|
|
Route::get('/change-mdp', [CustomerController::class, 'password'])->name('password');
|
|
Route::post('/change-mdp', [CustomerController::class, 'updatePassword'])->name('update-password');
|
|
});
|
|
|
|
// * objectifs de prix (index create delete by user id)
|
|
Route::prefix('ajax')->name('ajx.')
|
|
->group(function () {
|
|
Route::post('/save-objectif', [ObjectivesController::class, 'saveProDatas'])->name('objectives.save');
|
|
Route::post('/delete-objectif', [ObjectivesController::class, 'destroy'])->name('objectives.delete');
|
|
});
|
|
|
|
Route::get('/validation-en-attente', [DashboardController::class, 'waiting'])
|
|
->name('pending-validation')
|
|
->withoutMiddleware('valid-pro');
|
|
|
|
// * Tableau de bord
|
|
Route::get('/', [DashboardController::class, 'index'])->name('dashboard');
|
|
});
|