change name one culum name and prefix some item
This commit is contained in:
@@ -23,6 +23,7 @@ use Illuminate\Http\Request;
|
|||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
class OperatorController
|
class OperatorController
|
||||||
{
|
{
|
||||||
@@ -40,11 +41,17 @@ class OperatorController
|
|||||||
return Excel::download(new OperatorCartableReport($data['data']), $name);
|
return Excel::download(new OperatorCartableReport($data['data']), $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Throwable
|
||||||
|
*/
|
||||||
public function complaintsIndex(Request $request, OperatorService $operatorService): JsonResponse
|
public function complaintsIndex(Request $request, OperatorService $operatorService): JsonResponse
|
||||||
{
|
{
|
||||||
return response()->json($operatorService->complaintsIndex($request));
|
return response()->json($operatorService->complaintsIndex($request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Throwable
|
||||||
|
*/
|
||||||
public function complaintsReport(Request $request, OperatorService $operatorService): BinaryFileResponse
|
public function complaintsReport(Request $request, OperatorService $operatorService): BinaryFileResponse
|
||||||
{
|
{
|
||||||
$name = 'گزارش از رسیدگی به شکایات واکنش سریع ' . verta()->now()->format('Y-m-d H:i') . '.xlsx';
|
$name = 'گزارش از رسیدگی به شکایات واکنش سریع ' . verta()->now()->format('Y-m-d H:i') . '.xlsx';
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use App\Exceptions\ProhibitedAction;
|
|||||||
use App\Facades\DataTable\DataTableFacade;
|
use App\Facades\DataTable\DataTableFacade;
|
||||||
use App\Models\RoadObserved;
|
use App\Models\RoadObserved;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
class OperatorService
|
class OperatorService
|
||||||
{
|
{
|
||||||
@@ -37,15 +38,15 @@ class OperatorService
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws \Throwable
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
public function complaintsIndex(Request $request)
|
public function complaintsIndex(Request $request)
|
||||||
{
|
{
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
|
|
||||||
$fields = 'fk_RegisteredEventMessage, road_observeds.id, Title, FeatureTypeTitle, MobileForSendEventSms, StartTime_DateTime,
|
$fields = ['fk_RegisteredEventMessage, road_observeds.id, Title, FeatureTypeTitle, MobileForSendEventSms, StartTime_DateTime,
|
||||||
road_observeds.created_at, rms_last_activity, rms_last_activity_fa, status, edarate_shahri_id,
|
road_observeds.created_at, rms_last_activity, rms_last_activity_fa, status, edarate_shahri_id,
|
||||||
status_fa, supervisor_description, rms_description, province_fa, city_id, city_fa, Description, edarate_shahri.name_fa as edarate_shahri_name_fa, lat, lng';
|
status_fa, supervisor_description, rms_description, province_fa, city_id, city_fa, Description, edarate_shahri.name_fa as edarate_shahri_name_fa, lat, lng'];
|
||||||
|
|
||||||
if ($user->hasPermissionTo('show-fast-react')) {
|
if ($user->hasPermissionTo('show-fast-react')) {
|
||||||
$query = RoadObserved::query()->leftjoin('edarate_shahri', 'road_observeds.edarate_shahri_id', 'edarate_shahri.id')
|
$query = RoadObserved::query()->leftjoin('edarate_shahri', 'road_observeds.edarate_shahri_id', 'edarate_shahri.id')
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="11"
|
<th colspan="11"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13;">
|
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||||
گزارش خسارات وارده به ابنیه فنی و تاسیسات راه از تاریخ
|
گزارش خسارات وارده به ابنیه فنی و تاسیسات راه از تاریخ
|
||||||
{{ verta($fromDate)->format('Y/n/j') }}
|
{{ verta($fromDate)->format('Y/n/j') }}
|
||||||
تا
|
تا
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
اداره کل
|
اداره کل
|
||||||
</th>
|
</th>
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||||
تعداد کل
|
تعداد خسارات ثبت شده
|
||||||
</th>
|
</th>
|
||||||
<th colspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
<th colspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||||
نحوه شناسایی خسارت
|
نحوه شناسایی خسارت
|
||||||
@@ -59,11 +59,14 @@
|
|||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
|
کل
|
||||||
|
</th>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
در دست اقدام
|
در دست اقدام
|
||||||
</th>
|
</th>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
در حال فرایند پرداخت
|
در حال پرداخت
|
||||||
</th>
|
</th>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
خاتمه یافته
|
خاتمه یافته
|
||||||
@@ -76,7 +79,7 @@
|
|||||||
گزارش گشت راهداری
|
گزارش گشت راهداری
|
||||||
</th>
|
</th>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
فیش
|
فاکتور
|
||||||
</th>
|
</th>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
بیمه
|
بیمه
|
||||||
@@ -94,6 +97,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
{{ $road['name'] }}</td>
|
{{ $road['name'] }}</td>
|
||||||
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
|
{{ $road['tedade'] }}</td>
|
||||||
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
{{ $road['egdam'] }}</td>
|
{{ $road['egdam'] }}</td>
|
||||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">استان</th>
|
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">استان</th>
|
||||||
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">شهرستان</th>
|
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">شهرستان</th>
|
||||||
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نام محور</th>
|
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نام محور</th>
|
||||||
|
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نوع ناوگان</th>
|
||||||
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نام راننده</th>
|
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نام راننده</th>
|
||||||
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">کد ملی راننده</th>
|
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">کد ملی راننده</th>
|
||||||
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">شماره موبایل راننده</th>
|
<th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">شماره موبایل راننده</th>
|
||||||
@@ -48,6 +49,7 @@
|
|||||||
<td style="border: 1px solid black;text-align: center;">{{$item->province_fa}}</td>
|
<td style="border: 1px solid black;text-align: center;">{{$item->province_fa}}</td>
|
||||||
<td style="border: 1px solid black;text-align: center;">{{$item->city_fa}}</td>
|
<td style="border: 1px solid black;text-align: center;">{{$item->city_fa}}</td>
|
||||||
<td style="border: 1px solid black;text-align: center;">{{$item->axis_name}}</td>
|
<td style="border: 1px solid black;text-align: center;">{{$item->axis_name}}</td>
|
||||||
|
<td style="border: 1px solid black;text-align: center;">{{$item->is_foreign ? 'داخلی' : 'خارجی'}}</td>
|
||||||
<td style="border: 1px solid black;text-align: center;">{{$item->driver_name}}</td>
|
<td style="border: 1px solid black;text-align: center;">{{$item->driver_name}}</td>
|
||||||
<td style="border: 1px solid black;text-align: center;">{{$item->driver_national_code}}</td>
|
<td style="border: 1px solid black;text-align: center;">{{$item->driver_national_code}}</td>
|
||||||
<td style="border: 1px solid black;text-align: center;">{{$item->driver_phone_number}}</td>
|
<td style="border: 1px solid black;text-align: center;">{{$item->driver_phone_number}}</td>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="11"
|
<th colspan="11"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13;">
|
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||||
گزارش خسارات وارده به ابنیه فنی و تاسیسات راه از تاریخ
|
گزارش خسارات وارده به ابنیه فنی و تاسیسات راه از تاریخ
|
||||||
{{ verta($fromDate)->format('Y/n/j') }}
|
{{ verta($fromDate)->format('Y/n/j') }}
|
||||||
تا
|
تا
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
اداره کل
|
اداره کل
|
||||||
</th>
|
</th>
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||||
تعداد کل
|
تعداد خسارات ثبت شده
|
||||||
</th>
|
</th>
|
||||||
<th colspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
<th colspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||||
تعداد نحوه شناسایی خسارت
|
تعداد نحوه شناسایی خسارت
|
||||||
@@ -60,11 +60,14 @@
|
|||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
|
کل
|
||||||
|
</th>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
در دست اقدام
|
در دست اقدام
|
||||||
</th>
|
</th>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
در حال فرایند پرداخت
|
در حال پرداخت
|
||||||
</th>
|
</th>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
خاتمه یافته
|
خاتمه یافته
|
||||||
@@ -77,7 +80,7 @@
|
|||||||
گزارش گشت راهداری
|
گزارش گشت راهداری
|
||||||
</th>
|
</th>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
فیش
|
فاکتور
|
||||||
</th>
|
</th>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||||
بیمه
|
بیمه
|
||||||
@@ -95,6 +98,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
{{ $road['name'] }}</td>
|
{{ $road['name'] }}</td>
|
||||||
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
|
{{ $road['tedade'] }}</td>
|
||||||
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
<<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
<<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
{{ $road['egdam'] }}</td>
|
{{ $road['egdam'] }}</td>
|
||||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
|
|||||||
@@ -294,20 +294,19 @@ Route::prefix('road_observations')
|
|||||||
->name('roadObservations.')
|
->name('roadObservations.')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::name('operator.')
|
Route::name('operator.')
|
||||||
->prefix('operator')
|
|
||||||
->controller(\App\Http\Controllers\V3\Dashboard\RoadObservation\OperatorController::class)
|
->controller(\App\Http\Controllers\V3\Dashboard\RoadObservation\OperatorController::class)
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/cartable','cartableIndex')->name('cartableIndex')->middleware('permission:show-fast-react-edarate-shahri');
|
Route::get('operator/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('operator/report','cartableReport')->name('cartableReport')->middleware('permission:show-fast-react-edarate-shahri');
|
||||||
Route::get('/complaints_index', 'complaintsIndex')
|
Route::get('/complaints_index', 'complaintsIndex')
|
||||||
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react')
|
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react')
|
||||||
->name('complaintsIndex');
|
->name('complaintsIndex');
|
||||||
Route::get('/complaints_report', 'complaintsReport')->name('complaintsReport')
|
Route::get('/complaints_report', 'complaintsReport')->name('complaintsReport')
|
||||||
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react');
|
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react');
|
||||||
Route::post('/register/{roadObserved}', 'register')
|
Route::post('operator/register/{roadObserved}', 'register')
|
||||||
->middleware('permission:show-fast-react-edarate-shahri')
|
->middleware('permission:show-fast-react-edarate-shahri')
|
||||||
->name('register');
|
->name('register');
|
||||||
Route::post('/modify_registration/{roadObserved}', 'modifyRegistration')
|
Route::post('operator/modify_registration/{roadObserved}', 'modifyRegistration')
|
||||||
->middleware('permission:show-fast-react-edarate-shahri')
|
->middleware('permission:show-fast-react-edarate-shahri')
|
||||||
->name('modifyRegistration');
|
->name('modifyRegistration');
|
||||||
Route::post('/refer/{roadObserved}', 'refer')
|
Route::post('/refer/{roadObserved}', 'refer')
|
||||||
@@ -316,6 +315,7 @@ Route::prefix('road_observations')
|
|||||||
Route::get('/refer_list/{roadObserved}', 'referList')
|
Route::get('/refer_list/{roadObserved}', 'referList')
|
||||||
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react')
|
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react')
|
||||||
->name('referList');
|
->name('referList');
|
||||||
|
Route::get('/{roadObserved}', 'show')->name('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::name('supervisor.')
|
Route::name('supervisor.')
|
||||||
@@ -336,7 +336,6 @@ Route::prefix('road_observations')
|
|||||||
Route::get('/excel', 'excel')->name('excel')->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::get('/map', 'map')->name('map');
|
||||||
});
|
});
|
||||||
Route::get('/{roadObserved}', [\App\Http\Controllers\V3\Dashboard\RoadObservation\OperatorController::class, 'show'])->name('show');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::prefix('log_list')
|
Route::prefix('log_list')
|
||||||
|
|||||||
Reference in New Issue
Block a user