change structure of road patrol and route
# Conflicts: # app/Http/Controllers/V3/RoadPatrole/DetailController.php # app/Http/Controllers/V3/RoadPatrole/OperatorController.php # app/Http/Controllers/V3/RoadPatrole/SupervisorController.php # routes/v3.php
This commit is contained in:
@@ -2,25 +2,12 @@
|
||||
|
||||
namespace App\Http\Controllers\V3\RoadPatrole;
|
||||
|
||||
use App\Enums\MissionStates;
|
||||
use App\Facades\Sms\Sms;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\V3\RoadPatrol\DeleteRequest;
|
||||
use App\Http\Requests\V3\RoadPatrol\StoreRequest;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\EdarateShahri;
|
||||
use App\Models\InfoItem;
|
||||
use App\Models\Mission;
|
||||
use App\Models\RoadItemsProject;
|
||||
use App\Models\RoadObserved;
|
||||
use App\Models\RoadPatrol;
|
||||
use App\Services\NominatimService;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
|
||||
class DetailController extends Controller
|
||||
@@ -79,5 +66,4 @@ class DetailController extends Controller
|
||||
return $this->successResponse($roadPatrol->rahdaran()->get(['rahdaran.id', 'rahdaran.name', 'rahdaran.code']));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ use App\Http\Controllers\V3\Dashboard\Mission\TransportationUnitController;
|
||||
use App\Http\Controllers\V3\Dashboard\ObservedItemController;
|
||||
use App\Http\Controllers\V3\Dashboard\OtpManagementController;
|
||||
use App\Http\Controllers\V3\Dashboard\Reports\RoadItemsReportController;
|
||||
use App\Http\Controllers\V3\Dashboard\Reports\RoadPatrolReportController;
|
||||
use App\Http\Controllers\V3\Dashboard\RoadMaintenanceStationController;
|
||||
use App\Http\Controllers\V3\Dashboard\RoadPatrolProjectController;
|
||||
use App\Http\Controllers\V3\Dashboard\SafetyAndPrivacy\OperatorController;
|
||||
@@ -147,42 +146,7 @@ Route::prefix('road_items')
|
||||
});
|
||||
});
|
||||
|
||||
Route::prefix('road_patrols')
|
||||
->name('road_patrols.')
|
||||
->controller(RoadPatrolProjectController::class)
|
||||
->group(function () {
|
||||
|
||||
Route::get('/supervisor_index', 'supervisorIndex')
|
||||
->middleware(['permission:show-road-patrol-supervise-cartable|show-road-patrol-supervise-cartable-province'])
|
||||
->name('supervisorIndex');
|
||||
|
||||
Route::post('/delete/{roadPatrol}', 'delete')
|
||||
->middleware('permission:partial-delete-road-patrol|complete-delete-road-patrol')
|
||||
->name('delete');
|
||||
|
||||
Route::get('/supervisor_report', 'supervisorCartableReport')
|
||||
->name('supervisorCartableReport');
|
||||
|
||||
Route::get('/operator_index', 'operatorIndex')
|
||||
->middleware('permission:add-road-patrol')
|
||||
->name('operatorIndex');
|
||||
|
||||
Route::post('/store', 'store')
|
||||
->middleware('permission:add-road-patrol')
|
||||
->name('store');
|
||||
|
||||
Route::get('/operator_report', 'operatorCartableReport')
|
||||
->name('operatorCartableReport');
|
||||
|
||||
Route::get('/operator/report/{roadPatrol}', 'getReport')
|
||||
->name('getReport');
|
||||
|
||||
Route::get('/detail/{roadPatrol}', 'show')
|
||||
->name('show');
|
||||
|
||||
Route::get('/machines/{roadPatrol}', 'roadPatrolMachine')->name('roadPatrolMachine');
|
||||
Route::get('/rahdaran/{roadPatrol}', 'roadPatrolRahdar')->name('roadPatrolRahdar');
|
||||
});
|
||||
|
||||
Route::prefix('cmms_machines')
|
||||
->name('cmms_machines.')
|
||||
@@ -232,19 +196,60 @@ Route::prefix('road_item_reports')
|
||||
Route::get('/activities_on_map', 'activitiesOnMap')->name('activitiesOnMap');
|
||||
Route::get('/show_on_map/{roadItemsProject}', 'showOnMap')->name('showOnMap');
|
||||
});
|
||||
|
||||
Route::prefix('road_patrol_reports')
|
||||
->name('roadPatrolReports.')
|
||||
->controller(RoadPatrolReportController::class)
|
||||
Route::prefix('road_patrol')
|
||||
->group(function () {
|
||||
Route::get('/country_activity', 'countryPatrolActivity')->name('countryPatrolActivity');
|
||||
Route::get('/province_activity', 'provincePatrolActivity')->name('provincePatrolActivity');
|
||||
Route::get('/country_activity_excel', 'countryActivityExcel')->name('countryActivityExcel');
|
||||
Route::get('/province_activity_excel', 'provinceActivityExcel')->name('provinceActivityExcel');
|
||||
Route::get('/activities_on_map', 'activitiesOnMap')->name('activitiesOnMap');
|
||||
Route::get('/show_on_map/{roadPatrol}', 'showOnMap')->name('showOnMap');
|
||||
});
|
||||
Route::prefix('details')
|
||||
->name('details.')
|
||||
->controller(\App\Http\Controllers\V3\RoadPatrole\DetailController::class)
|
||||
->group(function () {
|
||||
Route::get('/{roadPatrol}', 'show')
|
||||
->name('show');
|
||||
Route::get('/machines/{roadPatrol}', 'roadPatrolMachine')->name('roadPatrolMachine');
|
||||
Route::get('/rahdaran/{roadPatrol}', 'roadPatrolRahdar')->name('roadPatrolRahdar');
|
||||
});
|
||||
Route::prefix('operator')
|
||||
->name('operator.')
|
||||
->controller(App\Http\Controllers\V3\RoadPatrole\OperatorController::class)
|
||||
->group(function () {
|
||||
Route::get('/', 'index')
|
||||
->middleware('permission:add-road-patrol')
|
||||
->name('index');
|
||||
|
||||
Route::get('/report', 'operatorCartableReport')
|
||||
->name('cartableReport');
|
||||
Route::post('/delete/{roadPatrol}', 'delete')
|
||||
->middleware('permission:partial-delete-road-patrol|complete-delete-road-patrol')
|
||||
->name('delete');
|
||||
Route::post('/store', 'store')
|
||||
->middleware('permission:add-road-patrol')
|
||||
->name('store');
|
||||
});
|
||||
|
||||
Route::prefix('report')
|
||||
->name('report.')
|
||||
->controller(ReportController::class)
|
||||
->group(function () {
|
||||
Route::get('/country_activity', 'countryPatrolActivity')->name('countryPatrolActivity');
|
||||
Route::get('/province_activity', 'provincePatrolActivity')->name('provincePatrolActivity');
|
||||
Route::get('/country_activity_excel', 'countryActivityExcel')->name('countryActivityExcel');
|
||||
Route::get('/province_activity_excel', 'provinceActivityExcel')->name('provinceActivityExcel');
|
||||
Route::get('/activities_on_map', 'activitiesOnMap')->name('activitiesOnMap');
|
||||
Route::get('/show_on_map/{roadPatrol}', 'showOnMap')->name('showOnMap');
|
||||
Route::get('/{roadPatrol}', 'getReport')
|
||||
->name('getReport');
|
||||
});
|
||||
Route::prefix('supervisor')
|
||||
->name('supervisor.')
|
||||
->controller(App\Http\Controllers\V3\RoadPatrole\SupervisorController::class)
|
||||
->group(function () {
|
||||
Route::get('/','index')
|
||||
->middleware(['permission:show-road-patrol-supervise-cartable|show-road-patrol-supervise-cartable-province'])
|
||||
->name('index');
|
||||
Route::get('/report', 'supervisorCartableReport')
|
||||
->name('cartableReport');
|
||||
|
||||
});
|
||||
});
|
||||
Route::prefix('damages')
|
||||
->name('damages.')
|
||||
->middleware('permission:manage-damage')
|
||||
|
||||
Reference in New Issue
Block a user