From 49fd3fa3cdf26bf1b457914af33c9133b9479a37 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 30 Sep 2024 11:26:09 -0400 Subject: [PATCH] php parts --- www-api/app/Config/Constants.php | 1 + www-api/app/Config/RoutesV1.php | 3 +++ www-api/app/Controllers/WrenchJobs.php | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/www-api/app/Config/Constants.php b/www-api/app/Config/Constants.php index c917258e..e28dc18d 100644 --- a/www-api/app/Config/Constants.php +++ b/www-api/app/Config/Constants.php @@ -301,6 +301,7 @@ define('WRENCHBOARD_JOB_USERACTIVE',13009); define('WRENCHBOARD_JOB_CREATEJOB',13010 ); define('WRENCHBOARD_JOB_DELETEJOB',13011 ); +define('WRENCHBOARD_JOB_RECENTPASTDUE',13019 ); define('WRENCHBOARD_JOB_GROUP_MEMBER', 13015) ; define('WRENCHBOARD_JOB_DELETE_GROUPMEMBER',13017); diff --git a/www-api/app/Config/RoutesV1.php b/www-api/app/Config/RoutesV1.php index 6c33b7a2..221d5d6f 100644 --- a/www-api/app/Config/RoutesV1.php +++ b/www-api/app/Config/RoutesV1.php @@ -49,6 +49,9 @@ $routes->post('/en/wrench/api/v1/dashdata', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/getjobsdata', 'WrenchJobs::getJobsData'); //WrenchJobs WrenchApi apigate $routes->post('/en/wrench/api/v1/verifycompleted', 'WrenchJobs::verifyCompletedHx'); +$routes->post('/en/wrench/api/v1/recentpastdue', 'WrenchJobs::recentPastDueJobs'); + + $routes->post('/en/wrench/api/v1/offerslist', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/offersresponse', 'WrenchApi::apigate'); diff --git a/www-api/app/Controllers/WrenchJobs.php b/www-api/app/Controllers/WrenchJobs.php index bca7b194..915a277f 100644 --- a/www-api/app/Controllers/WrenchJobs.php +++ b/www-api/app/Controllers/WrenchJobs.php @@ -105,6 +105,27 @@ class WrenchJobs extends BaseController return $this->respond( $this->summaryReturnData($in,$out), 3000); } + + public function recentPastDueJobs(){ + $raw_json = file_get_contents('php://input'); + $in = json_decode($raw_json, true); + $in["action"] = WRENCHBOARD_JOB_RECENTPASTDUE; + $in["nocache"] = $in["nocache"] ?? false; + $out =[]; + + //$wrenchboard = new \App\Models\BackendModel(); + + $in["limit"] = 10; + $in["page"] = 0; + $in["offset"] = 0; + $in["allstatus"] =0; + $ret= $this->wrenchboard->wrenchboard_api($in, $out); + $out['internal_return'] = $ret; + + $res = ( new \App\Models\ResultFormatter() )->processOutJson($in, $out); + return $res['result_list']; + } + public function sendJobInterest(){ $raw_json = file_get_contents('php://input'); $in = json_decode($raw_json, true);