change strcture controller becuse repet some code in 3 file and get same code in model
This commit is contained in:
@@ -22,28 +22,26 @@ enum HarimStates: int
|
|||||||
case MOKHALEFAT_BA_DASTGAH = 16;
|
case MOKHALEFAT_BA_DASTGAH = 16;
|
||||||
case ETMAM_FARAYAND = 17;
|
case ETMAM_FARAYAND = 17;
|
||||||
|
|
||||||
public static function name(int $state): string
|
public function label(): string
|
||||||
{
|
{
|
||||||
$mapArray = [
|
return match ($this) {
|
||||||
1 => "بررسی ادارات شهرستان",
|
self::BARESI_EDARE_SHAHRESTAN => "بررسی ادارات شهرستان",
|
||||||
2 => "بررسی توسط ادارات حریم",
|
self::BARESI_TAVASOT_DAFTAR_HARIM => "بررسی توسط ادارات حریم",
|
||||||
3 => "بررسی توسط معاون ",
|
self::BARESI_TAVASOT_MOAVEN => "بررسی توسط معاون ",
|
||||||
4 => "بررسی توسط مدیر کل",
|
self::BARESI_TAVASOT_MODIR_KOL => "بررسی توسط مدیر کل",
|
||||||
5 => "بررسی راه دسترسی آپلود شده توسط اداره حریم",
|
self::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM => "بررسی راه دسترسی آپلود شده توسط اداره حریم",
|
||||||
6 => "بررسی راه دسترسی آپلود شده توسط معاون",
|
self::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MOAVEN => "بررسی راه دسترسی آپلود شده توسط معاون",
|
||||||
7 => "بررسی راه دسترسی آپلود شده توسط مدیر",
|
self::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MODIR_KOL => "بررسی راه دسترسی آپلود شده توسط مدیر",
|
||||||
8 => "ارسال ضمانت نامه توسط کاربر",
|
self::ARSE_VA_AYAN_NAHAI => "ارسال ضمانت نامه توسط کاربر",
|
||||||
9 => "ارسال به پنجره واحد (نیاز به راه دسترسی)",
|
self::ERSAL_BE_PANJAREH_VAHED_NIAZ_BE_RAH_DASTRASI => "ارسال به پنجره واحد (نیاز به راه دسترسی)",
|
||||||
10 => "امکان پذیر نمی باشد",
|
self::EMKAN_PAZIR_NEMEBASHAD => "امکان پذیر نمی باشد",
|
||||||
11 => "ارسال به پنجره واحد (بدون نیاز به راه دسترسی)",
|
self::ERSAL_BE_PANJAREH_VAHED_BEDONEH_NIAZ_BE_RAH_DASTRASI => "ارسال به پنجره واحد (بدون نیاز به راه دسترسی)",
|
||||||
12 => "بازبینی راه دسترسی بارگذاری شده",
|
self::UPDATE_RAHE_DASTRASI_BARGOZARE_SHODE => "بازبینی راه دسترسی بارگذاری شده",
|
||||||
13 => "تائید عرصه و اعیان ارسال شده توسط اداره حریم",
|
self::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_DAFTAR_HARIM => "تائید عرصه و اعیان ارسال شده توسط اداره حریم",
|
||||||
14 => "تائید عرصه و اعیان ارسال شده توسط معاون",
|
self::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MOAVEN => "تائید عرصه و اعیان ارسال شده توسط معاون",
|
||||||
15 => "تائید عرصه و اعیان ارسال شده توسط مدیر",
|
self::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MODIR_KOL => "تائید عرصه و اعیان ارسال شده توسط مدیر",
|
||||||
16 => "مخالفت با درخواست",
|
self::MOKHALEFAT_BA_DASTGAH => "مخالفت با درخواست",
|
||||||
17 => "اتمام فرایند"
|
self::ETMAM_FARAYAND => "اتمام فرایند",
|
||||||
];
|
};
|
||||||
|
|
||||||
return $mapArray[$state];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,8 +25,6 @@ use App\Http\Traits\ApiResponse;
|
|||||||
use App\Models\Harim;
|
use App\Models\Harim;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
|
|
||||||
class GeneralManagerController extends Controller
|
class GeneralManagerController extends Controller
|
||||||
@@ -48,209 +46,104 @@ class GeneralManagerController extends Controller
|
|||||||
return response()->json($data);
|
return response()->json($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function rejectRequest(RejectRequest $request, Harim $harim): JsonResponse
|
public function rejectRequest(RejectRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::CONFIRM->value;
|
action:HarimAction::CONFIRM->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::EMKAN_PAZIR_NEMEBASHAD->value,
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_name' => HarimStates::EMKAN_PAZIR_NEMEBASHAD->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'expert_description' => $request->expert_description,
|
);
|
||||||
'action_id' => $action,
|
RejectRequestEvent::dispatch($harim);
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::EMKAN_PAZIR_NEMEBASHAD->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
|
|
||||||
RejectRequestEvent::dispatch($harim);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function referRequest(ReferRequest $request, Harim $harim): JsonResponse
|
public function referRequest(ReferRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::REFER->value;
|
action:HarimAction::REFER->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::BARESI_TAVASOT_MOAVEN->value,
|
||||||
'previous-state_id' => $harim->state_id,
|
'state_name' => HarimStates::BARESI_TAVASOT_MOAVEN->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'export_description' => $request->export_description,
|
);
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_TAVASOT_MOAVEN->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function referFile(ReferFileRequest $request, Harim $harim): JsonResponse
|
public function referFile(ReferFileRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::REFER->value;
|
action:HarimAction::REFER->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MOAVEN->value,
|
||||||
'previous-state_id' => $harim->state_id,
|
'state_name' => HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MOAVEN->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'export_description' => $request->export_description,
|
);
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MOAVEN->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function confirmRoadAccessNeed(ConfirmRoadAccessNeedRequest $request, Harim $harim): JsonResponse
|
public function confirmRoadAccessNeed(ConfirmRoadAccessNeedRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::CONFIRM->value;
|
action:HarimAction::CONFIRM->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::ERSAL_BE_PANJAREH_VAHED_NIAZ_BE_RAH_DASTRASI->value,
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_name' => HarimStates::ERSAL_BE_PANJAREH_VAHED_NIAZ_BE_RAH_DASTRASI->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'expert_description' => $request->expert_description,
|
);
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::ERSAL_BE_PANJAREH_VAHED_NIAZ_BE_RAH_DASTRASI->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
|
|
||||||
ConfirmRoadAccessNeedEvent::dispatch($harim);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function confirmNoRoadAccessNeed(ConfirmNoRoadAccessNeedRequest $request, Harim $harim): JsonResponse
|
public function confirmNoRoadAccessNeed(ConfirmNoRoadAccessNeedRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::CONFIRM->value;
|
action:HarimAction::CONFIRM->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::ERSAL_BE_PANJAREH_VAHED_BEDONEH_NIAZ_BE_RAH_DASTRASI->value,
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_name' => HarimStates::ERSAL_BE_PANJAREH_VAHED_BEDONEH_NIAZ_BE_RAH_DASTRASI->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'expert_description' => $request->expert_description,
|
);
|
||||||
'action_id' => $action,
|
ConfirmNoRoadAccessNeedEvent::dispatch($harim);
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::ERSAL_BE_PANJAREH_VAHED_BEDONEH_NIAZ_BE_RAH_DASTRASI->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
|
|
||||||
ConfirmNoRoadAccessNeedEvent::dispatch($harim);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function confirmRoadAccessEditNeed(ConfirmRoadAccessEditNeedRequest $request, Harim $harim): JsonResponse
|
public function confirmRoadAccessEditNeed(ConfirmRoadAccessEditNeedRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::CONFIRM->value;
|
action:HarimAction::CONFIRM->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::UPDATE_RAHE_DASTRASI_BARGOZARE_SHODE->value,
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_name' => HarimStates::UPDATE_RAHE_DASTRASI_BARGOZARE_SHODE->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'expert_description' => $request->expert_description,
|
);
|
||||||
'action_id' => $action,
|
ConfirmRoadAccessEditNeedEvent::dispatch($harim);
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::UPDATE_RAHE_DASTRASI_BARGOZARE_SHODE->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
|
|
||||||
ConfirmRoadAccessEditNeedEvent::dispatch($harim);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws \Throwable
|
|
||||||
*/
|
|
||||||
public function confirmGuaranteeLetterNeed(ConfirmGuaranteeLetterNeedRequest $request, Harim $harim): JsonResponse
|
public function confirmGuaranteeLetterNeed(ConfirmGuaranteeLetterNeedRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::CONFIRM->value;
|
action:HarimAction::CONFIRM->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::ARSE_VA_AYAN_NAHAI->value,
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_name' => HarimStates::ARSE_VA_AYAN_NAHAI->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'expert_description' => $request->expert_description,
|
);
|
||||||
'action_id' => $action,
|
ConfirmGuaranteeLetterNeedEvent::dispatch($harim);
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::ARSE_VA_AYAN_NAHAI->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
|
|
||||||
ConfirmGuaranteeLetterNeedEvent::dispatch($harim);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
@@ -260,60 +153,33 @@ class GeneralManagerController extends Controller
|
|||||||
return $this->successResponse($harim->load('histories'));
|
return $this->successResponse($harim->load('histories'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function referPayment(ReferPaymentRequest $request, Harim $harim): JsonResponse
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function referPaymentRequest(ReferPaymentRequest $request, Harim $harim): JsonResponse
|
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::REFER->value;
|
action:HarimAction::REFER->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MOAVEN->value,
|
||||||
'previous-state_id' => $harim->state_id,
|
'state_name' => HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MOAVEN->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'export_description' => $request->export_description,
|
);
|
||||||
'action_id' => $action,
|
ConfirmGuaranteeLetterNeedEvent::dispatch($harim);
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MOAVEN->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function confirmPayment(ConfirmPaymentRequest $request, Harim $harim): JsonResponse
|
public function confirmPayment(ConfirmPaymentRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::CONFIRM->value;
|
action:HarimAction::CONFIRM->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::ETMAM_FARAYAND->value,
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_name' => HarimStates::ETMAM_FARAYAND->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'expert_description' => $request->expert_description,
|
);
|
||||||
'action_id' => $action,
|
ConfirmGuaranteeLetterNeedEvent::dispatch($harim);
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::ETMAM_FARAYAND->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,178 +42,100 @@ class HarimOfficeController extends Controller
|
|||||||
return response()->json($data);
|
return response()->json($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function rejectRequest(RejectRequest $request, Harim $harim): JsonResponse
|
public function rejectRequest(RejectRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::NO->value;
|
action:HarimAction::NO->value,
|
||||||
$harim->histories()->create([
|
description: $request->expert_description,
|
||||||
'expert_id' => auth()->user()->id,
|
data: [
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_id' => HarimStates::BARESI_TAVASOT_MOAVEN->value,
|
||||||
'previous_state_name' => $harim->state_name,
|
'state_name' => HarimStates::BARESI_TAVASOT_MOAVEN->label(),
|
||||||
'expert_description' => $request->expert_description,
|
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_TAVASOT_MOAVEN->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
'is_possible' => false,
|
'is_possible' => false,
|
||||||
]);
|
]
|
||||||
});
|
);
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function referRequest(ReferRequest $request, Harim $harim): JsonResponse
|
public function referRequest(ReferRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::REFER->value;
|
action:HarimAction::REFER->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::BARESI_EDARE_SHAHRESTAN->value,
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_name' => HarimStates::BARESI_EDARE_SHAHRESTAN->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'expert_description' => $request->expert_description,
|
);
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_EDARE_SHAHRESTAN->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function needRoadAccess(NeedRoadAccessRequest $request, Harim $harim): JsonResponse
|
public function needRoadAccess(NeedRoadAccessRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::YES->value;
|
action:HarimAction::YES->value,
|
||||||
$harim->histories()->create([
|
description: $request->expert_description,
|
||||||
'expert_id' => auth()->user()->id,
|
data: [
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_id' => HarimStates::BARESI_TAVASOT_MOAVEN->value,
|
||||||
'previous_state_name' => $harim->state_name,
|
'state_name' => HarimStates::BARESI_TAVASOT_MOAVEN->label(),
|
||||||
'expert_description' => $request->expert_description,
|
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_TAVASOT_MOAVEN->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
'is_possible' => true,
|
'is_possible' => true,
|
||||||
'need_access_road' => true,
|
'need_access_road' => true,
|
||||||
'need_payment' => $request->need_payment,
|
'need_payment' => $request->need_payment,
|
||||||
]);
|
]
|
||||||
});
|
);
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function withoutRoadAccess(WithoutRoadAccessRequest $request, Harim $harim): JsonResponse
|
public function withoutRoadAccess(WithoutRoadAccessRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::YES->value;
|
action:HarimAction::YES->value,
|
||||||
$harim->histories()->create([
|
description: $request->expert_description,
|
||||||
'expert_id' => auth()->user()->id,
|
data: [
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_id' => HarimStates::BARESI_TAVASOT_MOAVEN->value,
|
||||||
'previous_state_name' => $harim->state_name,
|
'state_name' => HarimStates::BARESI_TAVASOT_MOAVEN->label(),
|
||||||
'expert_description' => $request->expert_description,
|
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_TAVASOT_MOAVEN->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
'is_possible' => true,
|
'is_possible' => true,
|
||||||
'need_access_road' => false,
|
'need_access_road' => false,
|
||||||
'need_payment' => $request->need_payment,
|
'need_payment' => $request->need_payment,
|
||||||
]);
|
]
|
||||||
});
|
);
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function fileAccepted(FileAcceptedRequest $request, Harim $harim): JsonResponse
|
public function fileAccepted(FileAcceptedRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::YES->value;
|
action:HarimAction::YES->value,
|
||||||
$harim->histories()->create([
|
description: $request->expert_description,
|
||||||
'expert_id' => auth()->user()->id,
|
data: [
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_id' => HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MOAVEN->value,
|
||||||
'previous_state_name' => $harim->state_name,
|
'state_name' => HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MOAVEN->label(),
|
||||||
'expert_description' => $request->expert_description,
|
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MOAVEN->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
'access_road_allowed' => true,
|
'access_road_allowed' => true,
|
||||||
]);
|
]
|
||||||
});
|
);
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function fileRejected(FileRejectedRequest $request, Harim $harim): JsonResponse
|
public function fileRejected(FileRejectedRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::NO->value;
|
action:HarimAction::YES->value,
|
||||||
$harim->histories()->create([
|
description: $request->expert_description,
|
||||||
'expert_id' => auth()->user()->id,
|
data: [
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_id' => HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MOAVEN->value,
|
||||||
'previous_state_name' => $harim->state_name,
|
'state_name' => HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MOAVEN->label(),
|
||||||
'expert_description' => $request->expert_description,
|
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MOAVEN->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
'access_road_allowed' => false,
|
'access_road_allowed' => false,
|
||||||
]);
|
]
|
||||||
});
|
);
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function show(ShowRequest $request, Harim $harim): JsonResponse
|
public function show(ShowRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
return $this->successResponse($harim->load('histories'));
|
return $this->successResponse($harim->load('histories'));
|
||||||
@@ -230,34 +152,21 @@ class HarimOfficeController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function computingPayment(ComputingPaymentRequest $request, Harim $harim): JsonResponse
|
public function computingPayment(ComputingPaymentRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::CONFIRM->value;
|
action:HarimAction::CONFIRM->value,
|
||||||
$harim->histories()->create([
|
description: $request->expert_description,
|
||||||
'expert_id' => auth()->user()->id,
|
data: [
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_id' => HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MOAVEN->value,
|
||||||
'previous_state_name' => $harim->state_name,
|
'state_name' => HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MOAVEN->label(),
|
||||||
'expert_description' => $request->expert_description,
|
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MOAVEN->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'traffic' => $request->traffic,
|
'traffic' => $request->traffic,
|
||||||
'position' => $request->position,
|
'position' => $request->position,
|
||||||
'final_plan_space' => $request->final_plan_space,
|
'final_plan_space' => $request->final_plan_space,
|
||||||
'road_type' => $request->road_type,
|
'road_type' => $request->road_type,
|
||||||
'payment_amount' => $request->payment_amount,
|
'payment_amount' => $request->payment_amount,
|
||||||
'state_id' => $state,
|
]
|
||||||
'state_name' => HarimStates::name($state),
|
);
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,29 +34,17 @@ class ProvinceOfficeController extends Controller
|
|||||||
return response()->json($data);
|
return response()->json($data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function feedback(FeedBackRequest $request, Harim $harim): JsonResponse
|
public function feedback(FeedBackRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::FEEDBACK->value;
|
action:HarimAction::FEEDBACK->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->value,
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_name' => HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
|
||||||
'expert_description' => $request->expert_description,
|
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
'forbidden_area' => $request->input('forbidden_area'),
|
'forbidden_area' => $request->input('forbidden_area'),
|
||||||
]);
|
]
|
||||||
});
|
);
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ use App\Http\Traits\ApiResponse;
|
|||||||
use App\Models\Harim;
|
use App\Models\Harim;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
|
|
||||||
class TechnicalDeputyController extends Controller
|
class TechnicalDeputyController extends Controller
|
||||||
@@ -40,113 +38,58 @@ class TechnicalDeputyController extends Controller
|
|||||||
return response()->json($data);
|
return response()->json($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws \Throwable
|
|
||||||
*/
|
|
||||||
public function confirmRequest(ConfirmRequest $request, Harim $harim): JsonResponse
|
public function confirmRequest(ConfirmRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::CONFIRM->value;
|
action:HarimAction::CONFIRM->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::BARESI_TAVASOT_MODIR_KOL->value,
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_name' => HarimStates::BARESI_TAVASOT_MODIR_KOL->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'expert_description' => $request->expert_description,
|
);
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_TAVASOT_MODIR_KOL->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function referRequest(ReferRequest $request, Harim $harim): JsonResponse
|
public function referRequest(ReferRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::REFER->value;
|
action:HarimAction::REFER->value,
|
||||||
|
description: $request->expert_description,
|
||||||
$harim->histories()->create([
|
data: [
|
||||||
'expert_id' => auth()->user()->id,
|
'state_id' => HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->value,
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_name' => HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->label(),
|
||||||
'previous_state_name' => $harim->state_name,
|
]
|
||||||
'expert_description' => $request->expert_description,
|
);
|
||||||
'action_id' => $action,
|
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws \Throwable
|
|
||||||
*/
|
|
||||||
public function confirmRoadAccess(ConfirmRoadAccessRequest $request, Harim $harim): JsonResponse
|
public function confirmRoadAccess(ConfirmRoadAccessRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::CONFIRM->value;
|
action:HarimAction::CONFIRM->value,
|
||||||
$harim->histories()->create([
|
description: $request->expert_description,
|
||||||
'expert_id' => auth()->user()->id,
|
data: [
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_id' => HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MODIR_KOL->value,
|
||||||
'previous_state_name' => $harim->state_name,
|
'state_name' => HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MODIR_KOL->label(),
|
||||||
'expert_description' => $request->expert_description,
|
]
|
||||||
'action_id' => $action,
|
);
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_MODIR_KOL->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws \Throwable
|
|
||||||
*/
|
|
||||||
public function referRoadAccess(ReferRoadAccessRequest $request, Harim $harim): JsonResponse
|
public function referRoadAccess(ReferRoadAccessRequest $request, Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $harim) {
|
$harim->updateStateWithHistory(
|
||||||
$action = HarimAction::REFER->value;
|
action:HarimAction::REFER->value,
|
||||||
$harim->histories()->create([
|
description: $request->expert_description,
|
||||||
'expert_id' => auth()->user()->id,
|
data: [
|
||||||
'previous_state_id' => $harim->state_id,
|
'state_id' => HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM->value,
|
||||||
'previous_state_name' => $harim->state_name,
|
'state_name' => HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM->label(),
|
||||||
'expert_description' => $request->expert_description,
|
]
|
||||||
'action_id' => $action,
|
);
|
||||||
'action_name' => HarimAction::name($action),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$state = HarimStates::BARESI_RAHE_DASTRASI_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM->value;
|
|
||||||
|
|
||||||
$harim->update([
|
|
||||||
'state_id' => $state,
|
|
||||||
'state_name' => HarimStates::name($state),
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
@@ -155,4 +98,30 @@ class TechnicalDeputyController extends Controller
|
|||||||
{
|
{
|
||||||
return $this->successResponse($harim->load('histories'));
|
return $this->successResponse($harim->load('histories'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function referPayment(ReferPaymentRequest $request, Harim $harim): JsonResponse
|
||||||
|
{
|
||||||
|
$harim->updateStateWithHistory(
|
||||||
|
action:HarimAction::REFER->value,
|
||||||
|
description: $request->expert_description,
|
||||||
|
data: [
|
||||||
|
'state_id' => HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_DAFTAR_HARIM->value,
|
||||||
|
'state_name' => HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_DAFTAR_HARIM->label(),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
return $this->successResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function confirmPayment(ConfirmPaymentRequest $request, Harim $harim): JsonResponse
|
||||||
|
{
|
||||||
|
$harim->updateStateWithHistory(
|
||||||
|
action:HarimAction::CONFIRM->value,
|
||||||
|
description: $request->expert_description,
|
||||||
|
data: [
|
||||||
|
'state_id' => HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MODIR_KOL->value,
|
||||||
|
'state_name' => HarimStates::BARESI_ARSE_VA_AYAN_ERSAL_SHODE_TAVASOT_MODIR_KOL->label(),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
return $this->successResponse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,13 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use App\Enums\HarimStates;
|
||||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
class Harim extends Model
|
class Harim extends Model
|
||||||
{
|
{
|
||||||
@@ -23,4 +26,23 @@ class Harim extends Model
|
|||||||
get: fn($value) => json_decode($value)
|
get: fn($value) => json_decode($value)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Throwable
|
||||||
|
*/
|
||||||
|
public function updateStateWithHistory(int $action, string $description , array $data): void
|
||||||
|
{
|
||||||
|
DB::transaction(function () use ($action, $description, $data) {
|
||||||
|
$this->histories()->create([
|
||||||
|
'expert_id' => auth()->user()->id,
|
||||||
|
'previous_state_id' => $this->state_id,
|
||||||
|
'previous_state_name'=> $this->state_name,
|
||||||
|
'expert_description' => $description,
|
||||||
|
'action_id' => $action,
|
||||||
|
'action_name' => HarimAction::name($action),
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->update($data);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -552,6 +552,8 @@ Route::prefix('harim')
|
|||||||
Route::post('/file_rejected/{harim}', 'fileRejected')->name('fileRejected');
|
Route::post('/file_rejected/{harim}', 'fileRejected')->name('fileRejected');
|
||||||
Route::get('/{harim}', 'show')->name('show');
|
Route::get('/{harim}', 'show')->name('show');
|
||||||
Route::post('/refer_request/{harim}', 'referRequest')->name('referRequest');
|
Route::post('/refer_request/{harim}', 'referRequest')->name('referRequest');
|
||||||
|
Route::post('/computing_payment/{harim}', 'computingPayment')->name('computingPayment');
|
||||||
|
Route::post('/refer_to_city/{harim}', 'referToCity')->name('referToCity');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::prefix('technical_deputy')
|
Route::prefix('technical_deputy')
|
||||||
@@ -564,6 +566,8 @@ Route::prefix('harim')
|
|||||||
Route::post('/confirm_road_access/{harim}', 'confirmRoadAccess')->name('confirmRoadAccess');
|
Route::post('/confirm_road_access/{harim}', 'confirmRoadAccess')->name('confirmRoadAccess');
|
||||||
Route::post('/refer_road_access/{harim}', 'referRoadAccess')->name('referRoadAccess');
|
Route::post('/refer_road_access/{harim}', 'referRoadAccess')->name('referRoadAccess');
|
||||||
Route::get('/{harim}', 'show')->name('show');
|
Route::get('/{harim}', 'show')->name('show');
|
||||||
|
Route::post('/refer_payment/{harim}', 'referPayment')->name('referPayment');
|
||||||
|
Route::post('/confirm_payment/{harim}', 'confirmPayment')->name('confirmPayment');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::prefix('general_manager')
|
Route::prefix('general_manager')
|
||||||
@@ -579,6 +583,8 @@ Route::prefix('harim')
|
|||||||
Route::post('/confirm_road_access_edit_need/{harim}', 'confirmRoadAccessEditNeed')->name('confirmRoadAccessEditNeed');
|
Route::post('/confirm_road_access_edit_need/{harim}', 'confirmRoadAccessEditNeed')->name('confirmRoadAccessEditNeed');
|
||||||
Route::post('/confirm_guarantee_letter_need/{harim}', 'confirmGuaranteeLetterNeed')->name('confirmGuaranteeLetterNeed');
|
Route::post('/confirm_guarantee_letter_need/{harim}', 'confirmGuaranteeLetterNeed')->name('confirmGuaranteeLetterNeed');
|
||||||
Route::get('/{harim}', 'show')->name('show');
|
Route::get('/{harim}', 'show')->name('show');
|
||||||
|
Route::post('/refer_payment/{harim}', 'referPayment')->name('referPayment');
|
||||||
|
Route::post('/confirm_payment/{harim}', 'confirmPayment')->name('confirmPayment');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user