This commit is contained in:
2025-11-26 09:46:17 +03:30
parent d47b23f368
commit 6a8d27b2c3
12 changed files with 102 additions and 18 deletions

View File

@@ -26,6 +26,7 @@ use App\Http\Traits\ApiResponse;
use App\Models\Harim;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Throwable;
class GeneralManagerController extends Controller
{
@@ -46,6 +47,9 @@ class GeneralManagerController extends Controller
return response()->json($data);
}
/**
* @throws Throwable
*/
public function rejectRequest(RejectRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -62,6 +66,9 @@ class GeneralManagerController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function referRequest(ReferRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -76,6 +83,9 @@ class GeneralManagerController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function referFile(ReferFileRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -90,6 +100,9 @@ class GeneralManagerController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function confirmRoadAccessNeed(ConfirmRoadAccessNeedRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -106,6 +119,9 @@ class GeneralManagerController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function confirmNoRoadAccessNeed(ConfirmNoRoadAccessNeedRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -122,6 +138,9 @@ class GeneralManagerController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function confirmRoadAccessEditNeed(ConfirmRoadAccessEditNeedRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -138,6 +157,9 @@ class GeneralManagerController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function confirmGuaranteeLetterNeed(ConfirmGuaranteeLetterNeedRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -159,6 +181,9 @@ class GeneralManagerController extends Controller
return $this->successResponse($harim->load('histories'));
}
/**
* @throws Throwable
*/
public function referPayment(ReferPaymentRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -173,6 +198,9 @@ class GeneralManagerController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function confirmPayment(ConfirmPaymentRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(