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 Maatwebsite\Excel\Facades\Excel;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
use Throwable;
|
||||
|
||||
class OperatorController
|
||||
{
|
||||
@@ -40,11 +41,17 @@ class OperatorController
|
||||
return Excel::download(new OperatorCartableReport($data['data']), $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function complaintsIndex(Request $request, OperatorService $operatorService): JsonResponse
|
||||
{
|
||||
return response()->json($operatorService->complaintsIndex($request));
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function complaintsReport(Request $request, OperatorService $operatorService): BinaryFileResponse
|
||||
{
|
||||
$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\Models\RoadObserved;
|
||||
use Illuminate\Http\Request;
|
||||
use Throwable;
|
||||
|
||||
class OperatorService
|
||||
{
|
||||
@@ -37,15 +38,15 @@ class OperatorService
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Throwable
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function complaintsIndex(Request $request)
|
||||
{
|
||||
$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,
|
||||
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')) {
|
||||
$query = RoadObserved::query()->leftjoin('edarate_shahri', 'road_observeds.edarate_shahri_id', 'edarate_shahri.id')
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<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') }}
|
||||
تا
|
||||
@@ -43,7 +43,7 @@
|
||||
اداره کل
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||
تعداد کل
|
||||
تعداد خسارات ثبت شده
|
||||
</th>
|
||||
<th colspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||
نحوه شناسایی خسارت
|
||||
@@ -59,11 +59,14 @@
|
||||
</th>
|
||||
</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>
|
||||
<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;">
|
||||
خاتمه یافته
|
||||
@@ -76,7 +79,7 @@
|
||||
گزارش گشت راهداری
|
||||
</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;">
|
||||
بیمه
|
||||
@@ -94,6 +97,9 @@
|
||||
<tr>
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
{{ $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;">
|
||||
{{ $road['egdam'] }}</td>
|
||||
<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>
|
||||
@@ -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->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->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_national_code}}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{$item->driver_phone_number}}</td>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<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') }}
|
||||
تا
|
||||
@@ -44,7 +44,7 @@
|
||||
اداره کل
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||
تعداد کل
|
||||
تعداد خسارات ثبت شده
|
||||
</th>
|
||||
<th colspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||
تعداد نحوه شناسایی خسارت
|
||||
@@ -60,11 +60,14 @@
|
||||
</th>
|
||||
</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>
|
||||
<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;">
|
||||
خاتمه یافته
|
||||
@@ -77,7 +80,7 @@
|
||||
گزارش گشت راهداری
|
||||
</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;">
|
||||
بیمه
|
||||
@@ -95,6 +98,9 @@
|
||||
<tr>
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
{{ $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;">
|
||||
{{ $road['egdam'] }}</td>
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
|
||||
@@ -294,20 +294,19 @@ Route::prefix('road_observations')
|
||||
->name('roadObservations.')
|
||||
->group(function () {
|
||||
Route::name('operator.')
|
||||
->prefix('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('operator/cartable','cartableIndex')->name('cartableIndex')->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')
|
||||
->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')
|
||||
Route::post('operator/register/{roadObserved}', 'register')
|
||||
->middleware('permission:show-fast-react-edarate-shahri')
|
||||
->name('register');
|
||||
Route::post('/modify_registration/{roadObserved}', 'modifyRegistration')
|
||||
Route::post('operator/modify_registration/{roadObserved}', 'modifyRegistration')
|
||||
->middleware('permission:show-fast-react-edarate-shahri')
|
||||
->name('modifyRegistration');
|
||||
Route::post('/refer/{roadObserved}', 'refer')
|
||||
@@ -316,6 +315,7 @@ Route::prefix('road_observations')
|
||||
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::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('/map', 'map')->name('map');
|
||||
});
|
||||
Route::get('/{roadObserved}', [\App\Http\Controllers\V3\Dashboard\RoadObservation\OperatorController::class, 'show'])->name('show');
|
||||
});
|
||||
|
||||
Route::prefix('log_list')
|
||||
|
||||
Reference in New Issue
Block a user