Admin Workflow - API code refactor to fetch information to display on workflow

This commit is contained in:
Dillon Ngo
2025-01-04 22:38:42 +08:00
parent abe1f3df2b
commit db36336484
9 changed files with 249 additions and 115 deletions
@@ -4,6 +4,8 @@ namespace App\Http\Controllers\Questionnaires;
use App\Classes\Modules\Questionnaires\ControllersLogic\FetchAdminWFBookingLogic;
use App\Classes\Modules\Questionnaires\ControllersLogic\FetchAdminWFModelAttributesLogic;
use App\Classes\Modules\Questionnaires\ControllersLogic\FetchAdminWFPendingApprovalPOLogic;
use App\Classes\Modules\Questionnaires\ControllersLogic\FetchAdminWFPendingFillPOLogic;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -12,7 +14,7 @@ class AdminWorkflowBaseController
{
/**
* @param Request $request
* @param FetchQuestionV1AdminWFLogic $logic
* @param FetchAdminWFBookingLogic $logic
* @return JsonResponse
*/
public function fetchBooking(Request $request, FetchAdminWFBookingLogic $logic): JsonResponse {
@@ -27,4 +29,22 @@ class AdminWorkflowBaseController
public function fetchModelAttributes(Request $request, FetchAdminWFModelAttributesLogic $logic): JsonResponse {
return $logic->execute($request);
}
/**
* @param Request $request
* @param FetchAdminWFPendingApprovalPOLogic $logic
* @return JsonResponse
*/
public function fetchPendingApprovalPO(Request $request, FetchAdminWFPendingApprovalPOLogic $logic): JsonResponse {
return $logic->execute($request);
}
/**
* @param Request $request
* @param FetchAdminWFPendingFillPOLogic $logic
* @return JsonResponse
*/
public function fetchPendingFillPO(Request $request, FetchAdminWFPendingFillPOLogic $logic): JsonResponse {
return $logic->execute($request);
}
}