refactor road observation

This commit is contained in:
2025-05-31 10:54:16 +03:30
parent 968d185292
commit 2d671e79b9
8 changed files with 292 additions and 203 deletions

View File

@@ -19,7 +19,7 @@ use App\Http\Controllers\V3\Dashboard\Reports\RoadItemsReportController;
use App\Http\Controllers\V3\Dashboard\Reports\RoadPatrolReportController;
use App\Http\Controllers\V3\Dashboard\RoadItemsProjectController;
use App\Http\Controllers\V3\Dashboard\RoadMaintenanceStationController;
use App\Http\Controllers\V3\Dashboard\RoadObservationController;
use App\Http\Controllers\V3\Dashboard\RoadObservation\RoadObservationController;
use App\Http\Controllers\V3\Dashboard\RoadPatrolProjectController;
use App\Http\Controllers\V3\Dashboard\SafetyAndPrivacy\OperatorController;
use App\Http\Controllers\V3\Dashboard\SafetyAndPrivacy\OperatorReportController;
@@ -292,37 +292,48 @@ Route::prefix('receipt_reports')
Route::prefix('road_observations')
->name('roadObservations.')
->controller(RoadObservationController::class)
->group(function () {
Route::get('/supervisor_index', 'supervisorIndex')->name('supervisorIndex')->middleware('permission:show-fast-react-province|show-fast-react');
Route::post('/verify/{roadObserved}', 'verifyBySupervisor')->name('verifyBySupervisor');
Route::get('/supervisor_report', 'supervisorCartableReport')->name('supervisorCartableReport')->middleware('permission:show-fast-react-province|show-fast-react');
Route::get('/operator_index','operatorIndex')->name('operatorIndex')->middleware('permission:show-fast-react-edarate-shahri');
Route::get('/operator_report','operatorCartableReport')->name('operatorCartableReport')->middleware('permission:show-fast-react-edarate-shahri');
Route::get('/complaints_index', 'complaintsIndex')
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react')
->name('complaintsIndex');
Route::get('/complaints_report', 'complaintsReport')->name('complaintsReport')
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react');
Route::post('/register/{roadObserved}', 'register')
->middleware('permission:show-fast-react-edarate-shahri')
->name('register');
Route::post('/modify_registration/{roadObserved}', 'modifyRegistration')
->middleware('permission:show-fast-react-edarate-shahri')
->name('modifyRegistration');
Route::controller(\App\Http\Controllers\V3\Dashboard\RoadObservation\OperatorController::class)->get('/{roadObserved}', 'show')->name('show');
Route::name('operator.')
->controller(\App\Http\Controllers\V3\Dashboard\RoadObservation\OperatorController::class)
->group(function () {
Route::get('/cartable','cartableIndex')->name('cartableIndex')->middleware('permission:show-fast-react-edarate-shahri');
Route::get('/cartable_report','cartableReport')->name('cartableReport')->middleware('permission:show-fast-react-edarate-shahri');
Route::get('/complaints_index', 'complaintsIndex')
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react')
->name('complaintsIndex');
Route::get('/complaints_report', 'complaintsReport')->name('complaintsReport')
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react');
Route::post('/register/{roadObserved}', 'register')
->middleware('permission:show-fast-react-edarate-shahri')
->name('register');
Route::post('/modify_registration/{roadObserved}', 'modifyRegistration')
->middleware('permission:show-fast-react-edarate-shahri')
->name('modifyRegistration');
Route::post('/refer/{roadObserved}', 'refer')
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react')
->name('refer');
Route::get('/refer_list/{roadObserved}', 'referList')
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react')
->name('referList');
});
Route::get('/{roadObserved}', 'show')->name('show');
Route::post('/refer/{roadObserved}', 'refer')
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react')
->name('refer');
Route::name('supervisor.')
->controller(\App\Http\Controllers\V3\Dashboard\RoadObservation\SupervisorController::class)
->group(function () {
Route::get('/index', 'index')->name('index')->middleware('permission:show-fast-react-province|show-fast-react');
Route::post('/verify/{roadObserved}', 'verify')->name('verify');
Route::get('/report', 'report')->name('report')->middleware('permission:show-fast-react-province|show-fast-react');
Route::post('/restore/{roadObserved}', 'restore')->middleware('permission:restore-fast-react')->name('restore');
});
Route::get('/refer_list/{roadObserved}', 'referList')
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react')
->name('referList');
Route::post('/restore/{roadObserved}', 'restore')
->middleware('permission:restore-fast-react')
->name('restore');
Route::name('report.')
->controller(\App\Http\Controllers\V3\Dashboard\RoadObservation\ReportController::class)
->group(function () {
Route::get('/index', 'index')->name('index')->middleware('permission:show-fast-react-province|show-fast-react');
Route::get('/excel', 'excel')->name('excel')->middleware('permission:show-fast-react-province|show-fast-react');
Route::get('/map', 'map')->name('map');
});
});
Route::prefix('log_list')