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

@@ -17,6 +17,7 @@ use App\Http\Traits\ApiResponse;
use App\Models\Harim;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Throwable;
class TechnicalDeputyController extends Controller
{
@@ -37,6 +38,9 @@ class TechnicalDeputyController extends Controller
return response()->json($data);
}
/**
* @throws Throwable
*/
public function confirmRequest(ConfirmRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -51,6 +55,9 @@ class TechnicalDeputyController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function referRequest(ReferRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -65,6 +72,9 @@ class TechnicalDeputyController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function confirmRoadAccess(ConfirmRoadAccessRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -79,6 +89,9 @@ class TechnicalDeputyController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function referRoadAccess(ReferRoadAccessRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -95,9 +108,12 @@ class TechnicalDeputyController extends Controller
public function show(ShowRequest $request, Harim $harim): JsonResponse
{
return $this->successResponse($harim->load('histories'));
return $this->successResponse($harim);
}
/**
* @throws Throwable
*/
public function referPayment(ReferPaymentRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(
@@ -112,6 +128,9 @@ class TechnicalDeputyController extends Controller
return $this->successResponse();
}
/**
* @throws Throwable
*/
public function confirmPayment(ConfirmPaymentRequest $request, Harim $harim): JsonResponse
{
$harim->updateStateWithHistory(