22
.env.example
22
.env.example
@@ -69,4 +69,24 @@ FMS_VEHICLE_ACTIVITY_USERNAME=
|
||||
|
||||
FMS_ERROR_RATE_URL=
|
||||
FMS_ERROR_RATE_PASSWORD=
|
||||
FMS_ERROR_RATE_USERNAME=
|
||||
FMS_ERROR_RATE_USERNAME=
|
||||
|
||||
HARIM_NEED_ACCESS_URL=
|
||||
HARIM_NEED_ACCESS_PASSWORD=
|
||||
HARIM_NEED_ACCESS_USERNAME=
|
||||
|
||||
HARIM_REJECT_URL=
|
||||
HARIM_REJECT_PASSWORD=
|
||||
HARIM_REJECT_USERNAME=
|
||||
|
||||
HARIM_NO_NEED_ACCESS_URL=
|
||||
HARIM_NO_NEED_ACCESS_PASSWORD=
|
||||
HARIM_NO_NEED_ACCESS_USERNAME=
|
||||
|
||||
HARIM_EDIT_ACCESS_URL=
|
||||
HARIM_EDIT_ACCESS_PASSWORD=
|
||||
HARIM_EDIT_ACCESS_USERNAME=
|
||||
|
||||
HARIM_NEED_GUARANTEE_LETTER_URL=
|
||||
HARIM_NEED_GUARANTEE_LETTER_PASSWORD=
|
||||
HARIM_NEED_GUARANTEE_LETTER_USERNAME=
|
||||
|
||||
@@ -71,7 +71,7 @@ class ExtractGeometryForCities extends Command
|
||||
|
||||
case 'Polygon':
|
||||
$wktCoords = collect($coordinates[0])
|
||||
->map(fn($pair) => $pair[1] . ' ' . $pair[0])
|
||||
->map(fn($pair) => $pair[0] . ' ' . $pair[1])
|
||||
->implode(',');
|
||||
$wellKnownText = "POLYGON(($wktCoords))";
|
||||
break;
|
||||
@@ -84,7 +84,7 @@ class ExtractGeometryForCities extends Command
|
||||
$ring[] = $ring[0];
|
||||
}
|
||||
return collect($ring)
|
||||
->map(fn($pair) => $pair[1] . ' ' . $pair[0])
|
||||
->map(fn($pair) => $pair[0] . ' ' . $pair[1])
|
||||
->implode(',');
|
||||
});
|
||||
return '((' . $rings->implode('),(') . '))';
|
||||
|
||||
@@ -11,7 +11,7 @@ enum HarimStates: int
|
||||
case BARESI_FILE_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM = 5;
|
||||
case BARESI_FILE_APLODE_SHODE_TAVASOTE_MOAVEN = 6;
|
||||
case BARESI_FILE_APLODE_SHODE_TAVASOTE_MODIR_KOL = 7;
|
||||
case ERSAL_ZEMANAT_NAME_TAVASOTE_HARIM =8;
|
||||
case ERSAL_ZEMANAT_NAME_TAVASOTE_KARBAR =8;
|
||||
case ERSAL_BE_PANJAREH_VAHED_NIAZ_BE_RAH_DASTRASI = 9;
|
||||
case EMKAN_PAZIR_NEMEBASHAD = 10;
|
||||
case ERSAL_BE_PANJAREH_VAHED_BEDONEH_NIAZ_BE_RAH_DASTRASI = 11;
|
||||
|
||||
@@ -64,7 +64,7 @@ class OperatorCartableReport implements FromView, WithEvents, ShouldAutoSize, Wi
|
||||
$drawing2->setHeight(50);
|
||||
$drawing2->setOffsetX(5);
|
||||
$drawing2->setOffsetY(5);
|
||||
$drawing2->setCoordinates('q1');
|
||||
$drawing2->setCoordinates('m1');
|
||||
return [$drawing, $drawing2];
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ class SupervisorCartableReport implements FromView, WithEvents, ShouldAutoSize,
|
||||
$drawing2->setHeight(50);
|
||||
$drawing2->setOffsetX(5);
|
||||
$drawing2->setOffsetY(5);
|
||||
$drawing2->setCoordinates('q1');
|
||||
$drawing2->setCoordinates('m1');
|
||||
return [$drawing, $drawing2];
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ class OperatorCartableReport implements FromView, WithEvents, ShouldAutoSize, Wi
|
||||
$drawing2->setHeight(50);
|
||||
$drawing2->setOffsetX(5);
|
||||
$drawing2->setOffsetY(5);
|
||||
$drawing2->setCoordinates('i1');
|
||||
$drawing2->setCoordinates('h1');
|
||||
return [$drawing, $drawing2];
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ class SupervisorCartableReport implements FromView, WithEvents, ShouldAutoSize,
|
||||
$drawing2->setHeight(50);
|
||||
$drawing2->setOffsetX(5);
|
||||
$drawing2->setOffsetY(5);
|
||||
$drawing2->setCoordinates('i1');
|
||||
$drawing2->setCoordinates('h1');
|
||||
return [$drawing, $drawing2];
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,7 @@ class DamageManagementController extends Controller
|
||||
'unit' => $request->unit,
|
||||
'base_price' => $request->base_price,
|
||||
'status' => 1,
|
||||
'update_time' => now()
|
||||
]);
|
||||
|
||||
return $this->successResponse();
|
||||
@@ -76,6 +77,7 @@ class DamageManagementController extends Controller
|
||||
'title' => $request->title,
|
||||
'unit' => $request->unit,
|
||||
'base_price' => $request->base_price,
|
||||
'update_time' => now()
|
||||
]);
|
||||
|
||||
return $this->successResponse();
|
||||
|
||||
@@ -8,8 +8,10 @@ use App\Exports\V3\AccidentReceipt\DataTableReport;
|
||||
use App\Facades\File\FileFacade;
|
||||
use App\Facades\Sms\Sms;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\V3\AccidentReceipt\ChangeStatusRequest;
|
||||
use App\Http\Requests\V3\AccidentReceipt\ConfirmPaymentInfoRequest;
|
||||
use App\Http\Requests\V3\AccidentReceipt\StoreRequest;
|
||||
use App\Http\Requests\V3\AccidentReceipt\SubmitInvoiceRequest;
|
||||
use App\Http\Requests\V3\AccidentReceipt\UpdateRequest;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\Accident;
|
||||
@@ -22,6 +24,7 @@ use App\Services\NominatimService;
|
||||
use App\Services\PaymentService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
@@ -280,8 +283,11 @@ class AccidentReceiptController extends Controller
|
||||
/**
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function submitInvoice(Accident $accident, PaymentService $paymentService): JsonResponse
|
||||
public function submitInvoice(Accident $accident, PaymentService $paymentService, SubmitInvoiceRequest $request): JsonResponse
|
||||
{
|
||||
$lock = Cache::lock("accidentPayment-{$accident->id}", 10);
|
||||
throw_if(!$lock->get(), new ProhibitedAction('امکان درخواست مجدد تا 10 ثانیه دیگر وجود ندارد'));
|
||||
|
||||
$final_amount = $accident->driver_share_amount - ($accident->deposit_insurance_amount + $accident->deposit_daghi_amount);
|
||||
|
||||
throw_if($final_amount < 0, new ProhibitedAction('مبالغ داغی و بیمه از مبلغ کل بیشتر می باشد.'));
|
||||
@@ -304,6 +310,8 @@ class AccidentReceiptController extends Controller
|
||||
|
||||
Sms::sendSms($accident->driver_phone_number, $msg);
|
||||
|
||||
$lock->release();
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
@@ -314,6 +322,8 @@ class AccidentReceiptController extends Controller
|
||||
|
||||
$response = json_decode($paymentService->callPaymentStatusBillApi(explode("/", $accident->bill_code)[0]));
|
||||
|
||||
throw_if(!$response->isPayed, new ProhibitedAction('پرداخت انجام نشده است'));
|
||||
|
||||
if ($response->isPayed) {
|
||||
$accident->update([
|
||||
'status' => AccidentStates::PARDAKHT_FACTOR->value,
|
||||
@@ -363,4 +373,14 @@ class AccidentReceiptController extends Controller
|
||||
{
|
||||
return $this->successResponse(DailyAccidentSettings::query()->where('type', 'accident_type')->get());
|
||||
}
|
||||
|
||||
public function changeStatus(ChangeStatusRequest $request, Accident $accident): JsonResponse
|
||||
{
|
||||
$accident->update([
|
||||
'status' => $request->status_id,
|
||||
'status_fa' => AccidentStates::name($request->status_id),
|
||||
]);
|
||||
|
||||
return $this->successResponse($accident);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ class GeneralManagerController extends Controller
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$query = Harim::query()
|
||||
->whereIn('state_id', [HarimStates::BARESI_TAVASOT_MODIR_KOL->value, HarimStates::BARESI_FILE_APLODE_SHODE_TAVASOTE_MODIR_KOL->value])
|
||||
->where('edareh_shahri_id', '=', auth()->user()->edarate_shahri_id);
|
||||
|
||||
$data = DataTableFacade::run(
|
||||
@@ -41,6 +40,7 @@ class GeneralManagerController extends Controller
|
||||
allowedFilters: ['*'],
|
||||
allowedSortings: ['*']
|
||||
);
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use App\Http\Requests\V3\Dashboard\Harim\HarimOffice\NeedRoadAccessRequest;
|
||||
use App\Http\Requests\V3\Dashboard\Harim\HarimOffice\WithoutRoadAccessRequest;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\Harim;
|
||||
use App\Models\Province;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -25,10 +26,6 @@ class HarimOfficeController extends Controller
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$query = Harim::query()
|
||||
->whereIn('state_id', [
|
||||
HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->value,
|
||||
HarimStates::BARESI_FILE_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM->value,
|
||||
])
|
||||
->where('edareh_shahri_id', '=', auth()->user()->edarate_shahri_id);
|
||||
|
||||
$data = DataTableFacade::run(
|
||||
@@ -63,6 +60,7 @@ class HarimOfficeController extends Controller
|
||||
'is_possible' => false,
|
||||
]);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
@@ -87,12 +85,13 @@ class HarimOfficeController extends Controller
|
||||
'state_name' => HarimStates::name($state),
|
||||
'is_possible' => true,
|
||||
'need_access_road' => true,
|
||||
'need_payment' => $request->need_payment
|
||||
]);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
|
||||
public function withoutRoadAccess(WithoutRoadAccessRequest $request, Harim $harim): JsonResponse
|
||||
{
|
||||
DB::transaction(function () use ($request,$harim) {
|
||||
@@ -113,8 +112,10 @@ class HarimOfficeController extends Controller
|
||||
'state_name' => HarimStates::name($state),
|
||||
'is_possible' => true,
|
||||
'need_access_road' => false,
|
||||
'need_payment' => $request->need_payment
|
||||
]);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
public function fileAccepted(FileAcceptedRequest $request, Harim $harim): JsonResponse
|
||||
@@ -138,6 +139,7 @@ class HarimOfficeController extends Controller
|
||||
'access_road_allowed' => true,
|
||||
]);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
public function fileRejected(FileRejectedRequest $request, Harim $harim): JsonResponse
|
||||
@@ -161,11 +163,22 @@ class HarimOfficeController extends Controller
|
||||
'access_road_allowed' => false,
|
||||
]);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
public function show(ShowRequest $request, Harim $harim): JsonResponse
|
||||
{
|
||||
return $this->successResponse($harim->load('histories'));
|
||||
}
|
||||
|
||||
public function referToCity(Request $request, Harim $harim)
|
||||
{
|
||||
$province = Province::query()->find($request->province_id);
|
||||
|
||||
$harim->update([
|
||||
'edareh_shahri_id' => $request->edarate_shahri_id,
|
||||
'province_id' => $province->id,
|
||||
'province_name' => $province->name_fa,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ use App\Http\Traits\ApiResponse;
|
||||
use App\Models\City;
|
||||
use App\Models\Harim;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PanjareVahedController extends Controller
|
||||
{
|
||||
@@ -19,11 +20,15 @@ class PanjareVahedController extends Controller
|
||||
|
||||
public function receiveNewRequest(ReceiveNewRequest $request)
|
||||
{
|
||||
$wkt = 'POLYGON((' . implode(',', array_map(fn($c) => "{$c[0]} {$c[1]}", $request->primary_area['coordinates'])) . '))';
|
||||
$result = DB::selectOne("SELECT ST_AsText(ST_PointOnSurface(ST_GeomFromText(?, 4326))) AS point", [$wkt]);
|
||||
preg_match('/POINT\(([^ ]+) ([^ ]+)\)/', $result->point, $matches);
|
||||
|
||||
try {
|
||||
$city = City::query()
|
||||
->whereRaw("ST_Contains(
|
||||
geometry,
|
||||
ST_SRID(ST_GeomFromText('POINT($request->lng $request->lat)'), 4326))"
|
||||
ST_GeomFromText('POINT($matches[1] $matches[2])', 4326))"
|
||||
)
|
||||
->firstOrFail(['id', 'name_fa', 'province_id']);
|
||||
}
|
||||
@@ -31,8 +36,7 @@ class PanjareVahedController extends Controller
|
||||
$city = City::query()
|
||||
->orderByRaw("ST_Distance(
|
||||
geometry,
|
||||
ST_SRID(ST_GeomFromText('POINT($request->lng $request->lat)'), 4326)
|
||||
) ASC"
|
||||
ST_GeomFromText('POINT($matches[1] $matches[2])', 4326)) ASC"
|
||||
)
|
||||
->first(['id', 'name_fa', 'province_id']);
|
||||
}
|
||||
@@ -42,7 +46,7 @@ class PanjareVahedController extends Controller
|
||||
Harim::query()->create([
|
||||
'state_id' => $state,
|
||||
'state_name' => HarimStates::name($state),
|
||||
'panjare_vahed_id' => $request->panjare_vahed_id,
|
||||
'panjare_vahed_id' => $request->request_id,
|
||||
'national_id' => $request->national_id,
|
||||
'phone_number' => $request->phone_number,
|
||||
'request_date' => $request->request_date,
|
||||
@@ -54,12 +58,10 @@ class PanjareVahedController extends Controller
|
||||
'requested_organization' => $request->requested_organization,
|
||||
'plan_group' => $request->plan_group,
|
||||
'plan_title' => $request->plan_title,
|
||||
'worksheet_id' => $request->worksheet_id,
|
||||
'worksheet_id' => $request->worksheet,
|
||||
'response_options' => json_encode($request->response_options),
|
||||
'isic' => $request->isic,
|
||||
'primary_area' => json_encode($request->primary_area),
|
||||
'lat' => $request->lat,
|
||||
'lng' => $request->lng,
|
||||
]);
|
||||
|
||||
return $this->successResponse([
|
||||
@@ -73,11 +75,11 @@ class PanjareVahedController extends Controller
|
||||
$state = HarimStates::BARESI_FILE_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM->value;
|
||||
|
||||
Harim::query()
|
||||
->firstWhere('panjare_vahed_id', '=', $request->panjare_vahed_id)
|
||||
->firstWhere('panjare_vahed_id', '=', $request->request_id)
|
||||
->update([
|
||||
'state_id' => $state,
|
||||
'state_name' => HarimStates::name($state),
|
||||
'access_road' => $request->access_road,
|
||||
'access_road' => json_encode($request->access_road),
|
||||
]);
|
||||
|
||||
return $this->successResponse();
|
||||
@@ -89,7 +91,7 @@ class PanjareVahedController extends Controller
|
||||
$state = HarimStates::MOKHALEFAT_BA_DASTGAH->value;
|
||||
|
||||
Harim::query()
|
||||
->firstWhere('panjare_vahed_id', '=', $request->panjare_vahed_id)
|
||||
->firstWhere('panjare_vahed_id', '=', $request->request_id)
|
||||
->update([
|
||||
'state_id' => $state,
|
||||
'state_name' => HarimStates::name($state),
|
||||
@@ -104,12 +106,12 @@ class PanjareVahedController extends Controller
|
||||
$state = HarimStates::TAEDE_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_DAFTAR_HARIM->value;
|
||||
|
||||
Harim::query()
|
||||
->firstWhere('panjare_vahed_id', '=', $request->panjare_vahed_id)
|
||||
->firstWhere('panjare_vahed_id', '=', $request->request_id)
|
||||
->update([
|
||||
'state_id' => $state,
|
||||
'state_name' => HarimStates::name($state),
|
||||
'final_area' => $request->final_area,
|
||||
'final_plan' => $request->final_plan,
|
||||
'final_area' => json_encode($request->final_area),
|
||||
'final_plan' => json_encode($request->final_plan),
|
||||
]);
|
||||
|
||||
return $this->successResponse();
|
||||
|
||||
@@ -22,7 +22,6 @@ class ProvinceOfficeController extends Controller
|
||||
{
|
||||
$user = auth()->user();
|
||||
$query = Harim::query()
|
||||
->where('state_id', '=', HarimStates::BARESI_EDARE_SHAHRESTAN->value)
|
||||
->where('edareh_shahri_id', '=', $user->edarate_shahri_id);
|
||||
|
||||
$data = DataTableFacade::run(
|
||||
@@ -53,6 +52,7 @@ class ProvinceOfficeController extends Controller
|
||||
$harim ->update([
|
||||
'state_id' => $state,
|
||||
'state_name' => HarimStates::name($state),
|
||||
'forbidden_area' => $request->input('forbidden_area'),
|
||||
]);
|
||||
});
|
||||
return $this->successResponse();
|
||||
|
||||
@@ -23,10 +23,6 @@ class TechnicalDeputyController extends Controller
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$query = Harim::query()
|
||||
->whereIn('state_id', [
|
||||
HarimStates::BARESI_FILE_APLODE_SHODE_TAVASOTE_MOAVEN->value,
|
||||
HarimStates::BARESI_TAVASOT_MOAVEN->value,
|
||||
])
|
||||
->where('edareh_shahri_id', '=', auth()->user()->edarate_shahri_id);
|
||||
|
||||
$data = DataTableFacade::run(
|
||||
@@ -59,8 +55,8 @@ class TechnicalDeputyController extends Controller
|
||||
'state_name' => HarimStates::name($state),
|
||||
]);
|
||||
});
|
||||
return $this->successResponse();
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
public function referRequest(ReferRequest $request, Harim $harim): JsonResponse
|
||||
{
|
||||
@@ -83,6 +79,7 @@ class TechnicalDeputyController extends Controller
|
||||
'state_name' => HarimStates::name($state),
|
||||
]);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
public function confirmRoadAccess(ConfirmRoadAccessRequest $request, Harim $harim): JsonResponse
|
||||
@@ -105,6 +102,7 @@ class TechnicalDeputyController extends Controller
|
||||
'state_name' => HarimStates::name($state),
|
||||
]);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
@@ -128,11 +126,11 @@ class TechnicalDeputyController extends Controller
|
||||
'state_name' => HarimStates::name($state),
|
||||
]);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
public function show(ShowRequest $request, Harim $harim): JsonResponse
|
||||
{
|
||||
return $this->successResponse($harim->load('histories'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +160,11 @@ class RequestPortalController extends Controller
|
||||
$mission->rahdaran()->sync($request->rahdaran);
|
||||
$mission->machines()->attach($request->machines);
|
||||
$mission->rahdaran()->attach($request->driver, ['is_driver' => true]);
|
||||
|
||||
if ($mission->category_id == 2) {
|
||||
$rpc = new OperatorController();
|
||||
$rpc->store($mission);
|
||||
}
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
|
||||
@@ -51,7 +51,6 @@ class OperatorController extends Controller
|
||||
*/
|
||||
public function store(StoreRequest $request, NominatimService $nominatimService): JsonResponse
|
||||
{
|
||||
|
||||
$info_item = InfoItem::query()->where('item', $request->item_id)
|
||||
->where('sub_item', $request->sub_item_id)
|
||||
->firstOrFail();
|
||||
@@ -72,7 +71,9 @@ class OperatorController extends Controller
|
||||
$start_coordinates = explode(',', $request->start_point);
|
||||
$end_coordinates = $info_item->needs_end_point ? explode(',', $request->end_point) : null;
|
||||
|
||||
DB::transaction(function () use ($request, $nominatimService, $start_coordinates, $end_coordinates, $info_item) {
|
||||
DB::transaction(function () use ($request, $nominatimService,
|
||||
$start_coordinates, $end_coordinates, $info_item)
|
||||
{
|
||||
$user = auth()->user();
|
||||
$road_item = RoadItemsProject::query()->create([
|
||||
'user_id' => $user->id,
|
||||
@@ -104,6 +105,7 @@ class OperatorController extends Controller
|
||||
'activity_time' => $request->activity_time,
|
||||
'activity_date_time' => $request->activity_date." ".$request->activity_time,
|
||||
'is_new' => 1,
|
||||
'mission_id' => $request->mission_id,
|
||||
]);
|
||||
|
||||
if ($request->has('after_image')) {
|
||||
@@ -123,8 +125,6 @@ class OperatorController extends Controller
|
||||
new ProhibitedAction('اقدام مربوطه قبلا رسیدگی شده است.')
|
||||
);
|
||||
|
||||
$road_item->missions()->attach($request->mission_id);
|
||||
|
||||
$user->addActivityComplete(1154);
|
||||
});
|
||||
|
||||
|
||||
@@ -50,10 +50,9 @@ class OperatorController extends Controller
|
||||
'edare_name' => $mission->edare_shahri_name,
|
||||
'start_time' => $mission->start_time,
|
||||
'end_time' => $mission->finish_time,
|
||||
'mission_id' => $mission->id,
|
||||
]);
|
||||
|
||||
$road_patrol->missions()->attach($mission->id);
|
||||
|
||||
auth()->user()->addActivityComplete(1147);
|
||||
});
|
||||
|
||||
|
||||
32
app/Http/Requests/V3/AccidentReceipt/ChangeStatusRequest.php
Normal file
32
app/Http/Requests/V3/AccidentReceipt/ChangeStatusRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\AccidentReceipt;
|
||||
|
||||
use App\Enums\AccidentStates;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class ChangeStatusRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return Auth::user()->hasPermissionTo('change-accident-status');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'status_id' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\AccidentReceipt;
|
||||
|
||||
use App\Enums\AccidentStates;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SubmitInvoiceRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->accident->status === AccidentStates::SABT_FISH->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Requests\V3\Dashboard\Harim\Deputy;
|
||||
|
||||
use App\Enums\HarimStates;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ConfirmRoadAccessRequest extends FormRequest
|
||||
@@ -19,7 +20,7 @@ class ConfirmRoadAccessRequest extends FormRequest
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
||||
@@ -12,11 +12,7 @@ class ShowRequest extends FormRequest
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
|
||||
in_array($this->harim->state_id, [
|
||||
HarimStates::BARESI_TAVASOT_MOAVEN->value,
|
||||
HarimStates::BARESI_FILE_APLODE_SHODE_TAVASOTE_MOAVEN->value,
|
||||
]);
|
||||
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,11 +12,7 @@ class ShowRequest extends FormRequest
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
|
||||
in_array($this->harim->state_id, [
|
||||
HarimStates::BARESI_TAVASOT_MODIR_KOL->value,
|
||||
HarimStates::BARESI_FILE_APLODE_SHODE_TAVASOTE_MODIR_KOL->value
|
||||
]);
|
||||
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,7 @@ class NeedRoadAccessRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'expert_description' => 'required|string',
|
||||
'need_payment' => 'required|in:0,1',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Requests\V3\Dashboard\Harim\HarimOffice;
|
||||
|
||||
use App\Enums\HarimStates;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ShowRequest extends FormRequest
|
||||
@@ -12,18 +13,14 @@ class ShowRequest extends FormRequest
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
|
||||
in_array($this->harim->state_id, [
|
||||
HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->value,
|
||||
HarimStates::BARESI_FILE_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM->value,
|
||||
]);
|
||||
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ class WithoutRoadAccessRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'expert_description' => 'required|string',
|
||||
'need_payment' => 'required|in:0,1',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,10 @@ class GetAccessRoadRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'panjare_vahed_id' => 'required',
|
||||
'access_road' => 'required',
|
||||
'request_id' => 'required|exists:harims,panjare_vahed_id',
|
||||
'access_road' => 'required|array',
|
||||
'access_road.type' => 'required|string',
|
||||
'access_road.coordinates' => 'required|array',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,13 @@ class GetFinalPolygonsRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'panjare_vahed_id' => 'required',
|
||||
'final_area' => 'required',
|
||||
'final_plan' => 'required',
|
||||
'request_id' => 'required|exists:harims,panjare_vahed_id',
|
||||
'final_area' => 'required|array',
|
||||
'final_area.type' => 'required|string',
|
||||
'final_area.coordinates' => 'required|array',
|
||||
'final_plan' => 'required|array',
|
||||
'final_plan.type' => 'required|string',
|
||||
'final_plan.coordinates' => 'required|array',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class GetRejectRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'panjare_vahed_id' => 'required',
|
||||
'request_id' => 'required|exists:harims,panjare_vahed_id',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,19 +23,19 @@ class ReceiveNewRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'panjare_vahed_id' => 'required|integer|unique:harims,panjare_vahed_id',
|
||||
'request_id' => 'required|unique:harims,panjare_vahed_id',
|
||||
'national_id' => 'required',
|
||||
'phone_number' => 'required',
|
||||
'request_date' => 'required',
|
||||
'requested_organization' => 'required',
|
||||
'requested_organization' => 'required|string',
|
||||
'plan_group' => 'required',
|
||||
'plan_title' => 'required',
|
||||
'worksheet_id' => 'required',
|
||||
'worksheet' => 'required',
|
||||
'response_options' => 'required',
|
||||
'isic' => 'required',
|
||||
'primary_area' => 'required',
|
||||
'lat' => 'required',
|
||||
'lng' => 'required',
|
||||
'primary_area' => 'required|array',
|
||||
'primary_area.type' => 'required|string',
|
||||
'primary_area.coordinates' => 'required|array',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,9 @@ class FeedBackRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'expert_description' => 'required|string',
|
||||
'forbidden_area' => 'required|array',
|
||||
'forbidden_area.type' => 'required|string',
|
||||
'forbidden_area.coordinates' => 'required|array',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,7 @@ class ShowRequest extends FormRequest
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
|
||||
$this->harim->state_id == HarimStates::BARESI_EDARE_SHAHRESTAN->value;
|
||||
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ class ConfirmGuaranteeLetterNeedListener implements ShouldQueue
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->url = config('harim_web_services.reject.url');
|
||||
$this->username = config('harim_web_services.reject.username');
|
||||
$this->password = config('harim_web_services.reject.password');
|
||||
$this->url = config('harim_web_services.Guarantee_Letter_Need.url');
|
||||
$this->username = config('harim_web_services.Guarantee_Letter_Need.username');
|
||||
$this->password = config('harim_web_services.Guarantee_Letter_Need.password');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,9 +22,9 @@ class ConfirmNoRoadAccessNeedListener implements ShouldQueue
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->url = config('harim_web_services.reject.url');
|
||||
$this->username = config('harim_web_services.reject.username');
|
||||
$this->password = config('harim_web_services.reject.password');
|
||||
$this->url = config('harim_web_services.No_Need_Access.url');
|
||||
$this->username = config('harim_web_services.No_Need_Access.username');
|
||||
$this->password = config('harim_web_services.No_Need_Access.password');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,9 +22,9 @@ class ConfirmRoadAccessEditNeedListener implements ShouldQueue
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->url = config('harim_web_services.reject.url');
|
||||
$this->username = config('harim_web_services.reject.username');
|
||||
$this->password = config('harim_web_services.reject.password');
|
||||
$this->url = config('harim_web_services.Edit_Need_Access.url');
|
||||
$this->username = config('harim_web_services.Edit_Need_Access.username');
|
||||
$this->password = config('harim_web_services.Edit_Need_Access.password');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,11 +22,12 @@ class ConfirmRoadAccessNeedListener implements ShouldQueue
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->url = config('harim_web_services.reject.url');
|
||||
$this->username = config('harim_web_services.reject.username');
|
||||
$this->password = config('harim_web_services.reject.password');
|
||||
$this->url = config('harim_web_services.Need_Access.url');
|
||||
$this->username = config('harim_web_services.Need_Access.username');
|
||||
$this->password = config('harim_web_services.Need_Access.password');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
* @throws RequestException
|
||||
|
||||
@@ -22,9 +22,9 @@ class RejectRequestListener implements ShouldQueue
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->url = config('harim_web_services.reject.url');
|
||||
$this->username = config('harim_web_services.reject.username');
|
||||
$this->password = config('harim_web_services.reject.password');
|
||||
$this->url = config('harim_web_services.Reject.url');
|
||||
$this->username = config('harim_web_services.Reject.username');
|
||||
$this->password = config('harim_web_services.Reject.password');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
|
||||
class Mission extends Model
|
||||
@@ -34,14 +35,14 @@ class Mission extends Model
|
||||
return $this->hasMany(MissionHistory::class);
|
||||
}
|
||||
|
||||
public function roadItems(): MorphToMany
|
||||
public function roadPatrol(): HasOne
|
||||
{
|
||||
return $this->morphedByMany(RoadItemsProject::class, 'missionable');
|
||||
return $this->hasOne(RoadPatrol::class);
|
||||
}
|
||||
|
||||
public function roadPatrols(): MorphToMany
|
||||
public function roadItems(): HasMany
|
||||
{
|
||||
return $this->morphedByMany(RoadPatrol::class, 'missionable');
|
||||
return $this->hasMany(RoadItemsProject::class);
|
||||
}
|
||||
|
||||
public function roadObserveds(): MorphToMany
|
||||
|
||||
@@ -3,11 +3,10 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class RoadItemsProject extends Model
|
||||
{
|
||||
@@ -56,6 +55,7 @@ class RoadItemsProject extends Model
|
||||
'activity_date',
|
||||
'activity_time',
|
||||
'activity_date_time',
|
||||
'mission_id'
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -188,13 +188,8 @@ class RoadItemsProject extends Model
|
||||
);
|
||||
}
|
||||
|
||||
public function missions(): MorphToMany
|
||||
public function mission(): BelongsTo
|
||||
{
|
||||
return $this->morphToMany(Mission::class,
|
||||
'missionable',
|
||||
'missionables',
|
||||
'missionable_id',
|
||||
'mission_id',
|
||||
);
|
||||
return $this->belongsTo(Mission::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
@@ -46,13 +47,8 @@ class RoadPatrol extends Model
|
||||
);
|
||||
}
|
||||
|
||||
public function missions(): MorphToMany
|
||||
public function mission(): BelongsTo
|
||||
{
|
||||
return $this->morphToMany(Mission::class,
|
||||
'missionable',
|
||||
'missionables',
|
||||
'missionable_id',
|
||||
'mission_id',
|
||||
);
|
||||
return $this->belongsTo(Mission::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class AccidentReceiptTableService
|
||||
COUNT(CASE WHEN STATUS =5 THEN 1 END ) AS khatm,
|
||||
COUNT(CASE WHEN report_base = 0 THEN 1 END) AS police_rah,
|
||||
COUNT(CASE WHEN report_base = 1 THEN 1 END) AS gozaresh_gasht,
|
||||
SUM(`sum`) AS kol_sabt_shode,
|
||||
SUM(`driver_share_amount`) AS kol_sabt_shode,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `sum` END) AS vasel_shode,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `deposit_insurance_amount` END) AS vasel_shode_bimeh,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `deposit_daghi_amount` END) AS vasel_shode_daghi,
|
||||
@@ -68,7 +68,7 @@ class AccidentReceiptTableService
|
||||
COUNT(CASE WHEN STATUS =5 THEN 1 END ) AS khatm,
|
||||
COUNT(CASE WHEN report_base = 0 THEN 1 END) AS police_rah,
|
||||
COUNT(CASE WHEN report_base = 1 THEN 1 END) AS gozaresh_gasht,
|
||||
SUM(`sum`) AS kol_sabt_shode,
|
||||
SUM(`driver_share_amount`) AS kol_sabt_shode,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `sum` END) AS vasel_shode,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `deposit_insurance_amount` END) AS vasel_shode_bimeh,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `deposit_daghi_amount` END) AS vasel_shode_daghi,
|
||||
@@ -98,7 +98,7 @@ class AccidentReceiptTableService
|
||||
COUNT(CASE WHEN STATUS =5 THEN 1 END ) AS khatm,
|
||||
COUNT(CASE WHEN report_base = 0 THEN 1 END) AS police_rah,
|
||||
COUNT(CASE WHEN report_base = 1 THEN 1 END) AS gozaresh_gasht,
|
||||
SUM(`sum`) AS kol_sabt_shode,
|
||||
SUM(`driver_share_amount`) AS kol_sabt_shode,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `sum` END) AS vasel_shode,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `deposit_insurance_amount` END) AS vasel_shode_bimeh,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `deposit_daghi_amount` END) AS vasel_shode_daghi,
|
||||
@@ -115,7 +115,7 @@ class AccidentReceiptTableService
|
||||
COUNT(CASE WHEN STATUS =5 THEN 1 END ) AS khatm,
|
||||
COUNT(CASE WHEN report_base = 0 THEN 1 END) AS police_rah,
|
||||
COUNT(CASE WHEN report_base = 1 THEN 1 END) AS gozaresh_gasht,
|
||||
SUM(`sum`) AS kol_sabt_shode,
|
||||
SUM(`driver_share_amount`) AS kol_sabt_shode,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `sum` END) AS vasel_shode,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `deposit_insurance_amount` END) AS vasel_shode_bimeh,
|
||||
SUM(CASE WHEN STATUS > 3 THEN `deposit_daghi_amount` END) AS vasel_shode_daghi,
|
||||
|
||||
@@ -12,8 +12,7 @@ class OperatorService
|
||||
{
|
||||
$query = RoadItemsProject::query()
|
||||
->where('is_new', '=', 1)
|
||||
->where('user_id', '=', auth()->user()->id)
|
||||
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
||||
->where('user_id', '=', auth()->user()->id);
|
||||
|
||||
return DataTableFacade::run(
|
||||
$query,
|
||||
@@ -23,7 +22,8 @@ class OperatorService
|
||||
allowedSelects: [
|
||||
'id', 'province_fa', 'edarat_name', 'supervisor_description', 'item', 'item_fa',
|
||||
'sub_item', 'sub_item_fa', 'sub_item_data', 'unit_fa', 'start_lat', 'start_lng',
|
||||
'end_lat', 'end_lng', 'activity_date_time', 'created_at', 'status_fa', 'status'
|
||||
'end_lat', 'end_lng', 'activity_date_time', 'created_at', 'status_fa', 'status',
|
||||
'mission_id'
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,15 +20,13 @@ class SupervisorService
|
||||
|
||||
if ($user->hasPermissionTo('show-road-item-supervise-cartable')) {
|
||||
$query = RoadItemsProject::query()
|
||||
->where('is_new', 1)
|
||||
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
||||
->where('is_new', 1);
|
||||
}
|
||||
elseif ($user->hasPermissionTo('show-road-item-supervise-cartable-province')) {
|
||||
throw_if(is_null($user->province_id), new ProhibitedAction('استانی برای شما در سامانه ثبت نشده است!'));
|
||||
$query = RoadItemsProject::query()
|
||||
->where('is_new', 1)
|
||||
->where('province_id', auth()->user()->province_id)
|
||||
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
||||
->where('province_id', auth()->user()->province_id);
|
||||
}
|
||||
|
||||
return DataTableFacade::run(
|
||||
@@ -39,7 +37,8 @@ class SupervisorService
|
||||
allowedSelects: [
|
||||
'id', 'province_fa', 'edarat_name', 'item', 'item_fa', 'sub_item',
|
||||
'sub_item_fa', 'sub_item_data', 'unit_fa', 'start_lat', 'start_lng',
|
||||
'end_lat', 'end_lng', 'activity_date_time', 'created_at', 'status_fa', 'status'
|
||||
'end_lat', 'end_lng', 'activity_date_time', 'created_at', 'status_fa',
|
||||
'status', 'mission_id'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,8 +12,7 @@ class OperatorService
|
||||
public function dataTable(Request $request, $loadRelations = false)
|
||||
{
|
||||
$query = RoadPatrol::query()
|
||||
->where('operator_id', '=', auth()->user()->id)
|
||||
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
||||
->where('operator_id', '=', auth()->user()->id);
|
||||
|
||||
return DataTableFacade::run(
|
||||
$query,
|
||||
@@ -23,7 +22,7 @@ class OperatorService
|
||||
allowedSelects: [
|
||||
'province_fa', 'province_id', 'id', 'edare_id', 'edare_name',
|
||||
'start_time', 'end_time', 'created_at', 'description',
|
||||
'distance', 'vehicle_runtime', 'fuel_consumption', 'stop_points'
|
||||
'distance', 'vehicle_runtime', 'fuel_consumption', 'stop_points', 'mission_id'
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,16 +20,14 @@ class SupervisorService
|
||||
$query = null;
|
||||
|
||||
if ($user->hasPermissionTo('show-road-patrol-supervise-cartable')) {
|
||||
$query = RoadPatrol::query()
|
||||
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
||||
$query = RoadPatrol::query();
|
||||
}
|
||||
elseif ($user->hasPermissionTo('show-road-patrol-supervise-cartable-province'))
|
||||
{
|
||||
throw_if(is_null($user->province_id), new ProhibitedAction('استانی برای شما در سامانه ثبت نشده است!'));
|
||||
|
||||
$query = RoadPatrol::query()
|
||||
->where('province_id', '=', $user->province_id)
|
||||
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
||||
->where('province_id', '=', $user->province_id);
|
||||
}
|
||||
|
||||
return DataTableFacade::run(
|
||||
@@ -40,7 +38,8 @@ class SupervisorService
|
||||
allowedSelects: [
|
||||
'province_fa', 'province_id', 'id', 'edare_id', 'edare_name',
|
||||
'start_time', 'end_time', 'created_at', 'description',
|
||||
'distance', 'vehicle_runtime', 'fuel_consumption', 'stop_points'
|
||||
'distance', 'vehicle_runtime', 'fuel_consumption', 'stop_points',
|
||||
'mission_id'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Exceptions\ProhibitedAction;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
||||
class PaymentService
|
||||
{
|
||||
/**
|
||||
* @throws ProhibitedAction
|
||||
*/
|
||||
public function invoiceBillApi($driver_national_code, $final_amount)
|
||||
{
|
||||
if (App::isProduction())
|
||||
@@ -32,7 +36,7 @@ class PaymentService
|
||||
return $response;
|
||||
}
|
||||
catch (\Throwable $th) {
|
||||
abort(500);
|
||||
throw new ProhibitedAction('خطا در ارتباط با سرویس پرداخت');
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
33
config/harim_web_services.php
Normal file
33
config/harim_web_services.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'Need_Access' => [
|
||||
'url' => env('HARIM_NEED_ACCESS_URL'),
|
||||
'password' => env('HARIM_NEED_ACCESS_PASSWORD'),
|
||||
'username' => env('HARIM_NEED_ACCESS_USERNAME'),
|
||||
],
|
||||
|
||||
'Reject' => [
|
||||
'url' => env('HARIM_REJECT_URL'),
|
||||
'password' => env('HARIM_REJECT_PASSWORD'),
|
||||
'username' => env('HARIM_REJECT_USERNAME'),
|
||||
],
|
||||
|
||||
'No_Need_Access' => [
|
||||
'url' => env('HARIM_NO_NEED_ACCESS_URL'),
|
||||
'password' => env('HARIM_NO_NEED_ACCESS_PASSWORD'),
|
||||
'username' => env('HARIM_NO_NEED_ACCESS_USERNAME'),
|
||||
],
|
||||
|
||||
'Edit_Access' => [
|
||||
'url' => env('HARIM_EDIT_ACCESS_URL'),
|
||||
'password' => env('HARIM_EDIT_ACCESS_PASSWORD'),
|
||||
'username' => env('HARIM_EDIT_ACCESS_USERNAME'),
|
||||
],
|
||||
|
||||
'Need_Guarantee_Letter' => [
|
||||
'url' => env('HARIM_NEED_GUARANTEE_LETTER_URL'),
|
||||
'password' => env('HARIM_NEED_GUARANTEE_LETTER_PASSWORD'),
|
||||
'username' => env('HARIM_NEED_GUARANTEE_LETTER_USERNAME'),
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('road_patrols', function (Blueprint $table) {
|
||||
$table->foreignId('mission_id')->nullable()->constrained('missions');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('road_patrols', function (Blueprint $table) {
|
||||
$table->dropForeign('road_patrols_mission_id_foreign');
|
||||
$table->dropColumn('mission_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('road_items_projects', function (Blueprint $table) {
|
||||
$table->foreignId('mission_id')->nullable()->constrained('missions');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('road_items_projects', function (Blueprint $table) {
|
||||
$table->dropForeign('road_items_projects_mission_id_foreign');
|
||||
$table->dropColumn('mission_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('harims', function (Blueprint $table) {
|
||||
$table->dropColumn('lat');
|
||||
$table->dropColumn('lng');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('harims', function (Blueprint $table) {
|
||||
$table->string('lat');
|
||||
$table->string('lng');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('damages', function (Blueprint $table) {
|
||||
$table->dateTime('update_time')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('damages', function (Blueprint $table) {
|
||||
$table->dropColumn('update_time');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -210,8 +210,8 @@ return [
|
||||
'info_id' => 'دسته بندی' ,
|
||||
'activity_date' => 'تاریخ فعالیت',
|
||||
'activity_time' => 'زمان فعالیت',
|
||||
'recognize_picture' => 'عکس بازدید' ,
|
||||
'recognize_picture_second' => 'عکس بازدید' ,
|
||||
'recognize_picture' => 'عکس بازدید',
|
||||
'recognize_picture_second' => 'عکس بازدید',
|
||||
'axis_type_id' => 'نوع محور',
|
||||
'supervisor_description' => 'توضیحات کارشناس',
|
||||
'need_judiciary' => 'دستور قضایی' ,
|
||||
@@ -220,8 +220,8 @@ return [
|
||||
'action_picture' => 'عکس اقدامات',
|
||||
'finish_picture' => 'عکس پایان کار',
|
||||
'action_date' => 'زمان فالیت',
|
||||
'evidence_picture' => 'تصویر مشاهده شده' ,
|
||||
'deposit_insurance_image' => 'عکس مبلغ بیمه' ,
|
||||
'evidence_picture' => 'تصویر مشاهده شده',
|
||||
'deposit_insurance_image' => 'عکس مبلغ بیمه',
|
||||
'deposit_insurance_amount' => ' مبلغ بیمه',
|
||||
'deposit_daghi_image' => 'عکس مبلغ بیمه',
|
||||
'deposit_daghi_amount' => 'مبلغ داغی',
|
||||
@@ -230,36 +230,61 @@ return [
|
||||
'driver_name' => 'اسم راننده',
|
||||
'plaque' => 'پلاک',
|
||||
'driver_national_code' => 'کدملی راننده',
|
||||
'driver_phone_number' => 'شماره موبایل راننده' ,
|
||||
'accident_type' => 'نوع خسارت' ,
|
||||
'accident_date' => 'تاریخ تصادف' ,
|
||||
'accident_time' => 'زمان تصادف' ,
|
||||
'report_base' => 'گزارش' ,
|
||||
'police_file' => 'تصویر کروکی یا نامه پلیس راه' ,
|
||||
'driver_phone_number' => 'شماره موبایل راننده',
|
||||
'accident_type' => 'نوع خسارت',
|
||||
'accident_date' => 'تاریخ تصادف',
|
||||
'accident_time' => 'زمان تصادف',
|
||||
'report_base' => 'گزارش',
|
||||
'police_file' => 'تصویر کروکی یا نامه پلیس راه',
|
||||
'police_serial' => 'شماره کروکی یا نامه پلیس راه',
|
||||
'police_file_date' => 'تاریخ کروکی یا نامه پلیس راه' ,
|
||||
'damage_picture1' => 'عکس تصادف' ,
|
||||
'damage_picture2' => 'عکس تصادف' ,
|
||||
'damage_items' => 'ایتم های خسارت ',
|
||||
'damage_items.*.value' => 'میزان ایتم های خسارت ',
|
||||
'damage_items.*.amount' => 'هزینه خسارت ' ,
|
||||
'driver_rate' => 'سهم راننده' ,
|
||||
'police_file_date' => 'تاریخ کروکی یا نامه پلیس راه',
|
||||
'damage_picture1' => 'عکس تصادف',
|
||||
'damage_picture2' => 'عکس تصادف',
|
||||
'damage_items' => 'ایتم های خسارت',
|
||||
'damage_items.*.value' => 'میزان ایتم های خسارت',
|
||||
'damage_items.*.amount' => 'هزینه خسارت',
|
||||
'driver_rate' => 'سهم راننده',
|
||||
'code' => 'کد',
|
||||
'rahdaran' => 'افراد' ,
|
||||
'machines' => 'خودرو' ,
|
||||
'driver' => 'راننده' ,
|
||||
'zone' => 'منطقه ' ,
|
||||
'start_date' => 'تاریخ شروع' ,
|
||||
'end_date' => 'تاریخ پایان' ,
|
||||
'rahdaran' => 'افراد',
|
||||
'machines' => 'خودرو',
|
||||
'driver' => 'راننده',
|
||||
'zone' => 'منطقه',
|
||||
'start_date' => 'تاریخ شروع',
|
||||
'end_date' => 'تاریخ پایان',
|
||||
'end_point' => 'مقصد',
|
||||
'area' => 'منطقه عملیاتی',
|
||||
'area.type' => 'نوع محدوده' ,
|
||||
'area.coordinates' => 'محدوده مختصاتی' ,
|
||||
'area.coordinates' => 'مختصات محدوده',
|
||||
'category_id' => 'دسته بندی',
|
||||
'explanation' => 'توضیحات' ,
|
||||
'requested_machines' => 'درخواست ماشین',
|
||||
'explanation' => 'توضیحات',
|
||||
'requested_machines' => 'ماشین های درخواستی',
|
||||
'type' => 'نوع',
|
||||
'road_observed_id' => 'واکنش سریع',
|
||||
'road_observed_id' => 'کد واکنش سریع',
|
||||
'city_id' => 'شهر',
|
||||
'expert_description' => 'توضیح کارشناس',
|
||||
'need_payment' => 'نیاز به پرداخت',
|
||||
'request_id' => 'شناسه درخواست',
|
||||
'access_road' => 'راه دسترسی',
|
||||
'access_road.type' => 'نوع راه دسترسی',
|
||||
'access_road.coordinates' => 'مختصات راه دسترسی',
|
||||
'final_area' => 'محدوده نهایی',
|
||||
'final_area.type' => 'نوع محدوده نهایی',
|
||||
'final_area.coordinates' => 'مختصات محدوده نهایی',
|
||||
'final_plan' => 'طرح نهایی',
|
||||
'final_plan.type' => 'نوع طرح نهایی',
|
||||
'final_plan.coordinate' => 'مختصات طرح نهایی',
|
||||
'national_id' => 'کد ملی' ,
|
||||
'requested_organization' => 'سازمان درخواستکننده',
|
||||
'plan_group' => 'گروه طرح',
|
||||
'plan_title' => 'موضوع طرح',
|
||||
'worksheet' => 'شناسه کاربرگ',
|
||||
'response_options' => 'گزینه های پاسخ',
|
||||
'isic' => 'کد ISIC',
|
||||
'primary_area' => 'محدوده اولیه',
|
||||
'primary_area.type' => 'نوع محدوده اولیه',
|
||||
'primary_area.coordinates' => 'مختصات محدوده اولیه',
|
||||
'forbidden_area' => 'محدوده ممنوعه',
|
||||
'forbidden_area.type' => 'نوع محدوده محدوده',
|
||||
'forbidden_area.coordinates' => 'مختصات محدوده ممنوعه',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -21,18 +21,18 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="14"
|
||||
<th colspan="13"
|
||||
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="14"
|
||||
<th colspan="13"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="14"
|
||||
<th colspan="13"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
گزارش کارتابل عملیات فعالیت های روزانه و جاری
|
||||
</th>
|
||||
@@ -60,10 +60,7 @@
|
||||
مقدار</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>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
نقطه شروع</th>
|
||||
@@ -97,8 +94,7 @@
|
||||
<td style="border: 1px solid black;text-align: center;">
|
||||
{{ $item['sub_item_data'] ? ($item['unit_fa'] ? $item['sub_item_data'] . '(' . $item['unit_fa'] . ')' : $item['sub_item_data'] . '(-)') : '-' }}
|
||||
</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['cmmsMachines'] != null ? $item['cmmsMachines']->pluck('machine_code')->implode(', ') : '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['rahdaran'] != null ? $item['rahdaran']->pluck('code')->implode(', ') : '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['mission_id'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">
|
||||
{{ isset($item['start_lat']) && isset($item['start_lng']) ? $item['start_lat'] . ' ' . $item['start_lng'] : '-' }}
|
||||
</td>
|
||||
|
||||
@@ -21,18 +21,18 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="14"
|
||||
<th colspan="13"
|
||||
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="14"
|
||||
<th colspan="13"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="14"
|
||||
<th colspan="13"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
گزارش کارتابل ارزیابی فعالیت های روزانه و جاری
|
||||
</th>
|
||||
@@ -60,10 +60,7 @@
|
||||
مقدار</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>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
نقطه شروع</th>
|
||||
@@ -97,8 +94,7 @@
|
||||
<td style="border: 1px solid black;text-align: center;">
|
||||
{{ $item['sub_item_data'] ? ($item['unit_fa'] ? $item['sub_item_data'] . '(' . $item['unit_fa'] . ')' : $item['sub_item_data'] . '(-)') : '-' }}
|
||||
</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['cmmsMachines'] != null ? $item['cmmsMachines']->pluck('machine_code')->implode(', ') : '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['rahdaran'] != null ? $item['rahdaran']->pluck('code')->implode(', ') : '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['mission_id'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">
|
||||
{{ isset($item['start_lat']) && isset($item['start_lng']) ? $item['start_lat'] . ' ' . $item['start_lng'] : '-' }}
|
||||
</td>
|
||||
|
||||
@@ -21,18 +21,18 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="14"
|
||||
<th colspan="8"
|
||||
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="14"
|
||||
<th colspan="8"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="14"
|
||||
<th colspan="8"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13;">
|
||||
گزارش کارتابل عملیات گشت راهداری
|
||||
</th>
|
||||
@@ -49,10 +49,7 @@
|
||||
اداره</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>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
تاریخ شروع</th>
|
||||
@@ -74,8 +71,7 @@
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['id'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['province_fa'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['edare_name'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['cmmsMachines'] != null ? $item['cmmsMachines']->pluck('machine_code')->implode(', ') : '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['rahdaran'] != null ? $item['rahdaran']->pluck('code')->implode(', ') : '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['mission_id'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['start_time'] ? verta($item['start_time'])->format('Y/n/j H:i:s') : '-' }}
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['end_time'] ? verta($item['end_time'])->format('Y/n/j H:i:s') : '-' }}
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['created_at'] ? verta($item['created_at'])->format('Y/n/j H:i:s') : '-' }}</td>
|
||||
|
||||
@@ -21,18 +21,18 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="9"
|
||||
<th colspan="8"
|
||||
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="8"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="9"
|
||||
<th colspan="8"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
گزارش کارتابل ارزیابی گشت راهداری
|
||||
</th>
|
||||
@@ -49,10 +49,7 @@
|
||||
اداره</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>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
تاریخ شروع</th>
|
||||
@@ -74,8 +71,7 @@
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['id'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['province_fa'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['edare_name'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['cmmsMachines'] != null ? $item['cmmsMachines']->pluck('machine_code')->implode(', ') : '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['rahdaran'] != null ? $item['rahdaran']->pluck('code')->implode(', ') : '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['mission_id'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['start_time'] ? verta($item['start_time'])->format('Y/n/j H:i:s') : '-' }}
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['end_time'] ? verta($item['end_time'])->format('Y/n/j H:i:s') : '-' }}
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['created_at'] ? verta($item['created_at'])->format('Y/n/j H:i:s') : '-' }}</td>
|
||||
|
||||
@@ -292,6 +292,7 @@ Route::prefix('receipts')
|
||||
Route::get('/check_payment_status/{accident}', 'checkPaymentStatus')->name('checkPaymentStatus');
|
||||
Route::get('/generate_police_document/{accident}', 'generatePoliceDocument')->name('generatePoliceDocument');
|
||||
Route::get('/send_sms_again/{accident}', 'sendSmsAgain')->name('sendSmsAgain');
|
||||
Route::post('change_status/{accident}', 'changeStatus')->name('changeStatus');
|
||||
});
|
||||
|
||||
Route::prefix('receipt_reports')
|
||||
|
||||
Reference in New Issue
Block a user