Merge branch 'feature/RoadObservationExcel' into 'develop'

Feature/road observation excel

See merge request witelgroup/rms_v2!83
This commit is contained in:
2025-03-01 10:58:07 +00:00
12 changed files with 237 additions and 98 deletions

View File

@@ -7,7 +7,9 @@ use App\Exports\V3\RoadObservation\SupervisorCartableReport;
use App\Facades\File\FileFacade;
use App\Facades\Sms\Sms;
use App\Http\Controllers\Controller;
use App\Http\Requests\V3\RoadObservation\ModifyRegisterationRequest;
use App\Http\Requests\V3\RoadObservation\ReferRequest;
use App\Http\Requests\V3\RoadObservation\RegisterRequest;
use App\Http\Requests\V3\RoadObservation\RestoreRequest;
use App\Http\Requests\V3\RoadObservation\VerifyBySupervisorRequest;
use App\Http\Traits\ApiResponse;
@@ -85,13 +87,18 @@ class RoadObservationController extends Controller
return Excel::download(new ComplaintsReport($data['data']), $name);
}
public function register(Request $request, RoadObserved $roadObserved, NikarayanService $nikarayanService): JsonResponse
public function show(RoadObserved $roadObserved): JsonResponse
{
return $this->successResponse($roadObserved->only(['rms_status', 'rms_description', 'image_before', 'image_after', 'rms_start_latlng']));
}
public function register(RegisterRequest $request, RoadObserved $roadObserved, NikarayanService $nikarayanService): JsonResponse
{
$roadObservedData = [
'status' => 0,
'status_fa' => 'در حال بررسی',
'rms_status' => $request->rms_status ?? $roadObserved->rms_status,
'rms_description' => $request->description?? $roadObserved->rms_description,
'rms_description' => $request->rms_description ?? $roadObserved->rms_description,
];
$roadObservedHistoryData = [
@@ -100,7 +107,7 @@ class RoadObservationController extends Controller
'previous_rms_start_latlng' => $roadObserved->rms_start_latlng,
'previous_rms_end_latlng' => $roadObserved->rms_end_latlng,
'previous_rms_description' => $roadObserved->rms_description,
'new_files' => []
'new_files' => json_encode([])
];
if ($request->rms_status == 1) {
@@ -119,8 +126,79 @@ class RoadObservationController extends Controller
$files = json_encode($files_path);
$now_date_time = Carbon::now();
$roadObservedData['image_before'] = $image_before;
$roadObservedData['image_after'] = $image_after;
$roadObservedData['image_before'] = $image_before;
$roadObservedData['rms_start_latlng'] = explode(',', $request->start_point);
$roadObservedData['updated_at_fa'] = Verta::instance($now_date_time);
$roadObservedData['rms_last_activity_fa'] = Verta::instance($now_date_time);
$roadObservedData['rms_last_activity'] = $now_date_time;
$roadObservedHistoryData['new_files'] = $files;
}
$roadObserved->problemHistories()->create($roadObservedHistoryData);
$roadObserved->update($roadObservedData);
auth()->user()->addActivityComplete(1142);
try {
$nikarayanService->updateRoadObservedInfoByNikarayan($request, $roadObserved, json_encode($roadObservedHistoryData['new_files']));
}
catch (SoapFault $e) {
$msg = "error in send to nikarayan at" . date("Y-m-d H:i:s") . "\n";
$msg .= $e->getMessage();
Sms::sendSms(env('RMS_CTO_PHONE_NUMBER'), $msg);
}
return $this->successResponse();
}
public function modifyRegistration(ModifyRegisterationRequest $request, RoadObserved $roadObserved, NikarayanService $nikarayanService): JsonResponse
{
$roadObservedData = [
'status' => 0,
'status_fa' => 'در حال بررسی',
'rms_status' => $request->rms_status ?? $roadObserved->rms_status,
'rms_description' => $request->rms_description ?? $roadObserved->rms_description,
];
$roadObservedHistoryData = [
'user_id' => auth()->user()->id,
'previous_rms_status' => $roadObserved->rms_status,
'previous_rms_start_latlng' => $roadObserved->rms_start_latlng,
'previous_rms_end_latlng' => $roadObserved->rms_end_latlng,
'previous_rms_description' => $roadObserved->rms_description,
'new_files' => json_encode([])
];
if ($request->rms_status == 1) {
$files_path = [];
$roadObserved->files()->where('path', 'like', '%_image_before%')->delete();
$roadObserved->files()->where('path', 'like', '%_image_after%')->delete();
if ($request->has('image_before')) {
if ($roadObserved->image_before) {
FileFacade::delete($roadObserved->image_before, true);
}
$image_before = FileFacade::save($request->image_before, "road_observeds/{$roadObserved->id}/");
$roadObservedData['image_before'] = $image_before;
$files_path[0]['path'] = $image_before;
}
if ($request->has('image_after')) {
if ($roadObserved->image_after) {
FileFacade::delete($roadObserved->image_after, true);
}
$image_after = FileFacade::save($request->image_after, "road_observeds/{$roadObserved->id}/");
$roadObservedData['image_after'] = $image_after;
$files_path[1]['path'] = $image_after;
}
$files = json_encode($files_path);
$now_date_time = Carbon::now();
$roadObservedData['rms_start_latlng'] = explode(',', $request->start_point);
$roadObservedData['updated_at_fa'] = Verta::instance($now_date_time);
$roadObservedData['rms_last_activity_fa'] = Verta::instance($now_date_time);
@@ -148,6 +226,8 @@ class RoadObservationController extends Controller
public function refer(ReferRequest $request, RoadObserved $roadObserved): JsonResponse
{
$province = Province::query()->find($request->province_id);
RoadObservationHistory::query()->create([
'id' => $roadObserved->id,
'user_id' => auth()->user()->id,
@@ -156,12 +236,13 @@ class RoadObservationController extends Controller
'from_edareh' => $roadObserved->edarate_shahri_id,
'to_edareh' => $request->edarate_shahri_id,
'from_province' => $roadObserved->province_id,
'to_province' => $request->province_id
'to_province' => $province->id
]);
$roadObserved->update([
'edarate_shahri_id' => $request->edarate_shahri_id,
'province_id' => $request->province_id,
'province_id' => $province->id,
'province_fa' => $province->name_fa,
]);
auth()->user()->addActivityComplete(1037);
@@ -171,20 +252,22 @@ class RoadObservationController extends Controller
public function referList(RoadObserved $roadObserved): JsonResponse
{
$referList = [];
$data = RoadObservationHistory::query()
->where('road_observation_histories.id', $roadObserved->id)
->where('action', '=', 'refer')->get();
->where('id', '=', $roadObserved->id)
->where('action', '=', 'refer')->get([
'created_at', 'description', 'from_edareh', 'to_edareh',
'from_province', 'to_province', 'user_id'
]);
foreach ($data as $key => $value) {
$referList[$key]['from_edareh'] = EdarateShahri::query()->find($value->from_edareh)->name_fa;
$referList[$key]['to_edareh'] = EdarateShahri::query()->find($value->to_edareh)->name_fa;
$referList[$key]['from_province'] = Province::query()->find($value->from_province)->name_fa;
$referList[$key]['to_province'] = Province::query()->find($value->to_province)->name_fa;
$data[$key]->from_edareh = EdarateShahri::query()->find($value->from_edareh)->name_fa ?? null;
$data[$key]->to_edareh = EdarateShahri::query()->find($value->to_edareh)->name_fa ?? null;
$data[$key]->from_province = Province::query()->find($value->from_province)->name_fa ?? null;
$data[$key]->to_province = Province::query()->find($value->to_province)->name_fa ?? null;
$user = User::query()->find($value->user_id);
$referList[$key]['user'] = $user->first_name . ' ' . $user->last_name;
$data[$key]->user = $user->first_name . ' ' . $user->last_name;
}
return $this->successResponse($referList);
return $this->successResponse($data);
}
public function restore(RestoreRequest $request, RoadObserved $roadObserved): JsonResponse

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Http\Requests\V3\RoadObservation;
use Illuminate\Foundation\Http\FormRequest;
class ModifyRegisterationRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'rms_status' => 'required|in:1,2',
'rms_description' => 'required_if:rms_status,1|string',
'image_before' => 'file|mimes:jpg,jpeg,png',
'image_after' => 'file|mimes:jpg,jpeg,png',
'start_point' => 'string',
];
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Http\Requests\V3\RoadObservation;
use Illuminate\Foundation\Http\FormRequest;
class RegisterRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'rms_status' => 'required|in:1,2',
'rms_description' => 'required_if:rms_status,1|string',
'image_before' => 'required_if:rms_status,1|file|mimes:jpg,jpeg,png',
'image_after' => 'required_if:rms_status,1|file|mimes:jpg,jpeg,png',
'start_point' => 'string',
];
}
}

View File

@@ -22,7 +22,7 @@ class RestoreRequest extends FormRequest
public function rules(): array
{
return [
'restore_description' => 'required|string',
'restore_description' => 'string',
];
}
}

View File

@@ -62,6 +62,9 @@ class RoadObserved extends Model
'supervisor_description',
'supervising_time',
'supervisor_name',
'rms_start_latlng',
'rms_end_latlng',
'rms_description',
];
/**

View File

@@ -17,13 +17,12 @@ class RoadObservationTableService
$fields = [
'fk_RegisteredEventMessage', 'road_observeds.id', 'Title', 'road_observeds.created_at',
'lat', 'lng', 'FeatureTypeTitle', 'Description', 'MobileForSendEventSms',
'rms_description', 'rms_status', 'rms_last_activity_fa', 'rms_last_activity',
'lat', 'lng', 'FeatureTypeTitle', 'Description', 'MobileForSendEventSms', 'rms_start_latlng',
'rms_description', 'rms_status', 'rms_last_activity_fa', 'rms_last_activity', 'edarate_shahri_id',
'road_observeds.province_id', 'province_fa', 'city_id', 'city_fa', 'edarate_shahri.name_fa',
'status', 'status_fa', 'supervisor_description', 'supervising_time', 'image_after', 'image_before'
];
if ($user->hasPermissionTo('show-fast-react')) {
$query = RoadObserved::query()->leftjoin('edarate_shahri', 'road_observeds.edarate_shahri_id', 'edarate_shahri.id')
->whereNotNull('road_observeds.status')
@@ -53,25 +52,21 @@ class RoadObservationTableService
{
$user = auth()->user();
if (is_null($user->edarate_shahri_id)) {
return $this->errorResponse('اداره‌ای برای شما در سامانه ثبت نشده است!');
}
$fields = [
'fk_RegisteredEventMessage', 'road_observeds.id', 'Title', 'road_observeds.created_at',
'lat', 'lng', 'FeatureTypeTitle', 'Description', 'MobileForSendEventSms',
'lat', 'lng', 'FeatureTypeTitle', 'Description', 'MobileForSendEventSms', 'edarate_shahri_id',
'rms_description', 'rms_status', 'rms_start_latlng', 'rms_last_activity_fa', 'image_after', 'image_before',
'rms_last_activity', 'road_observeds.province_id', 'province_fa', 'city_id', 'city_fa',
'edarate_shahri.name_fa', 'status', 'status_fa', 'supervisor_description', 'supervising_time'
];
$query = RoadObserved::query()
->where('rms_status', '<>', 0)
->whereNotNull('road_observeds.province_id')
->whereNotNull('status')
->leftJoin('edarate_shahri', 'road_observeds.edarate_shahri_id', '=', 'edarate_shahri.id')
->where('edarate_shahri_id', $user->edarate_shahri_id)
->select($fields);
$query = RoadObserved::query()
->where('rms_status', '!=', 0)
->whereNotNull('road_observeds.province_id')
->whereNotNull('status')
->leftJoin('edarate_shahri', 'road_observeds.edarate_shahri_id', '=', 'edarate_shahri.id')
->where('edarate_shahri_id', $user->edarate_shahri_id)
->select($fields);
return DataTableFacade::run(
$query,
@@ -89,7 +84,7 @@ class RoadObservationTableService
->where('rms_status', '=', 0)
->whereNotNull('edarate_shahri_id')
->selectRaw('fk_RegisteredEventMessage, road_observeds.id, Title, FeatureTypeTitle, MobileForSendEventSms,
road_observeds.created_at, rms_last_activity, rms_last_activity_fa, status,
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'
);
}
@@ -104,7 +99,7 @@ class RoadObservationTableService
->whereNotNull('road_observeds.province_id')
->where('road_observeds.province_id', '=', $user->province_id)
->selectRaw('fk_RegisteredEventMessage, road_observeds.id, Title, FeatureTypeTitle, MobileForSendEventSms,
road_observeds.created_at, rms_last_activity, rms_last_activity_fa, status,
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'
);
@@ -120,7 +115,7 @@ class RoadObservationTableService
->whereNotNull('edarate_shahri_id')
->where('edarate_shahri_id', '=', $user->edarate_shahri_id)
->selectRaw('fk_RegisteredEventMessage, road_observeds.id, Title, FeatureTypeTitle, MobileForSendEventSms,
road_observeds.created_at, rms_last_activity, rms_last_activity_fa, status,
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'
);

View File

@@ -66,7 +66,7 @@ class ApplyFilter
}
$relation = $this->filter->getRelation();
return $relation ? $this->applyFilterToRelation($relation) : $this->searchFilter->apply();
return method_exists($this->query->getModel(), $relation) ? $this->applyFilterToRelation($relation) : $this->searchFilter->apply();
}
protected function applyFilterToRelation(string $relation): Builder

View File

@@ -26,15 +26,18 @@
<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>
<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>
</tr>
</thead>
@@ -45,15 +48,18 @@
<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->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>
<td style="border: 1px solid black;text-align: center;">{{$item->plaque}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->accident_type_fa}}</td>
<td style="border: 1px solid black;text-align: center;">{{Hekmatinasser\Verta\Verta::instance($item->accident_date)->format('Y/n/j')}} {{$item->accident_time}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->sum ?? 0}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->plaque}}</td>
<td style="border: 1px solid black;text-align: center;">{{Hekmatinasser\Verta\Verta::instance($item->created_at)->format('Y/n/j')}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->status_fa}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->final_amount ?? 0}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->deposit_insurance_amount ?? 0}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->deposit_daghi_amount ?? 0}}</td>
<td style="border: 1px solid black;text-align: center;">{{Hekmatinasser\Verta\Verta::instance($item->created_at)->format('Y/n/j')}}</td>
<td style="border: 1px solid black;text-align: center;">{{$item->status_fa}}</td>
</tr>
@endforeach
</tbody>

View File

@@ -21,54 +21,33 @@
<table>
<thead>
<tr>
<th colspan="9"
<th colspan="10"
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
</th>
</tr>
<tr>
<th colspan="9"
<th colspan="10"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
</th>
</tr>
<tr>
<th colspan="9"
<th colspan="10"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
گزارش رسیدگی به شکایات واکنش سریع
</th>
</tr>
<tr>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">کد
سوانح</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
استان
</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
ادارات شهری
</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
موضوع گزارش
</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
نوع گزارش</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
توضیح گزارش</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
موقعیت مکانی</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
شماره تماس گیرنده</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
تاریخ ثبت گزارش</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">کد یکتا</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">کد سوانح</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">استان</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">اداره</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">موضوع گزارش</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">نوع گزارش</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">توضیح گزارش</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">موقعیت مکانی</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">شماره تماس گیرنده</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">تاریخ ثبت</th>
</tr>
</thead>
@@ -76,9 +55,10 @@
<tbody>
@foreach ($data as $item)
<tr>
<td style="border: 1px solid black;text-align: center;">{{ $item['id'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['fk_RegisteredEventMessage'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['province_fa'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['edarate_shahri_name_fa'] ?? '-' }}</td>
<td>{{ $item['province_fa'] ?? '-' }}</td>
<td>{{ $item['edarate_shahri_name_fa'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['Title'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['FeatureTypeTitle'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['Description'] ?? '-' }}</td>

View File

@@ -40,15 +40,15 @@
<tr>
<th>کد یکتا</th>
<th>کد سوانح</th>
<th>استان</th>
<th>ادارات شهری</th>
<th>موضوع گزارش</th>
<th>نوع گزارش</th>
<th>توضیح گزارش</th>
<th>شماره تماس گیرنده</th>
<th>وضعیت</th>
<th>تاریخ ثبت</th>
<th>تاریخ اقدام</th>
<th>توضیحات</th>
<th>توضیحات کارشناس</th>
<th>توضیح مامور</th>
<th>توضیح کارشناس</th>
<th>وضعیت</th>
</tr>
</thead>
@@ -57,15 +57,15 @@
<tr>
<td>{{ $item['id'] ?? '-' }}</td>
<td>{{ $item['fk_RegisteredEventMessage'] ?? '-' }}</td>
<td>{{ $item['province_fa'] ?? '-' }}</td>
<td>{{ $item['edarate_shahri_name_fa'] ?? '-' }}</td>
<td>{{ $item['Title'] ?? '-' }}</td>
<td>{{ $item['FeatureTypeTitle'] ?? '-' }}</td>
<td>{{ $item['Description'] ?? '-' }}</td>
<td>{{ $item['MobileForSendEventSms'] ?? '-' }}</td>
<td>{{ $item['status_fa'] ?? '-' }}</td>
<td>{{ verta($item['created_at'])->format('Y/n/j') ?? '-' }}</td>
<td>{{ $item['rms_last_activity_fa'] ?? '-' }}</td>
<td>{{ $item['rms_description'] ?? '-' }}</td>
<td>{{ $item['supervisor_description'] ?? '-' }}</td>
<td>{{ $item['status_fa'] ?? '-' }}</td>
</tr>
@endforeach
</tbody>

View File

@@ -33,23 +33,24 @@
</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;">
گزارش کارتابل ارزیابی واکنش سریع
</th>
</tr>
<tr>
<th>کد یکتا</th>
<th>کد پیگیری</th>
<th>کد سوانح</th>
<th>استان</th>
<th>ادارات شهری</th>
<th>اداره</th>
<th>موضوع گزارش</th>
<th>نوع گزارش</th>
<th>توضیح گزارش</th>
<th>شماره تماس گیرنده</th>
<th>وضعیت</th>
<th>تاریخ ثبت</th>
<th>تاریخ اقدام</th>
<th>توضیحات</th>
<th>توضیحات کارشناس</th>
<th>توضیح مامور</th>
<th>توضیح کارشناس</th>
<th>وضعیت</th>
</tr>
</thead>
@@ -59,14 +60,17 @@
<td>{{ $item['id'] ?? '-' }}</td>
<td>{{ $item['fk_RegisteredEventMessage'] ?? '-' }}</td>
<td>{{ $item['province_fa'] ?? '-' }}</td>
<td>{{ $item['edarate_shahri_name_fa'] ?? '-' }}</td>
<td>{{ $item['name_fa'] ?? '-' }}</td>
<td>{{ $item['Title'] ?? '-' }}</td>
<td>{{ $item['FeatureTypeTitle'] ?? '-' }}</td>
<td>{{ $item['Description'] ?? '-' }}</td>
<td>{{ $item['MobileForSendEventSms'] ?? '-' }}</td>
<td>{{ $item['status_fa'] ?? '-' }}</td>
<td>{{ verta($item['created_at'])->format('Y/n/j') ?? '-' }}</td>
<td>{{ $item['rms_last_activity_fa'] ?? '-' }}</td>
<td>{{ $item['rms_description'] ?? '-' }}</td>
<td>{{ $item['supervisor_description'] ?? '-' }}</td>
<td>{{ $item['status_fa'] ?? '-' }}</td>
<td>{{ $item['rms_last_activity_fa'] ?? '-' }}</td>
</tr>
@endforeach
</tbody>

View File

@@ -283,16 +283,23 @@ Route::prefix('road_observations')
->controller(RoadObservationController::class)
->group(function () {
Route::get('/supervisor_index', 'supervisorIndex')->name('supervisorIndex')->middleware('permission:show-fast-react-province|show-fast-react');
Route::post('/verify/{road_observed}', 'verifyBySupervisor')->name('verifyBySupervisor');
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::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');
@@ -304,9 +311,6 @@ Route::prefix('road_observations')
Route::post('/restore/{roadObserved}', 'restore')
->middleware('permission:restore-fast-react')
->name('restore');
Route::get('/complaints_report', 'complaintsReport')->name('complaintsReport')
->middleware('permission:show-fast-react-edarate-shahri|show-fast-react-province|show-fast-react');
});
Route::prefix('log_list')