Assign task

This commit is contained in:
CHIEFSOFT\ameye
2023-05-25 21:59:06 -04:00
parent 9e60c746e3
commit d8d3619811
7 changed files with 29 additions and 3 deletions
+2 -1
View File
@@ -244,7 +244,8 @@ enum { PARTNER_STRIPE };
#define WRENCHBOARD_JOB_CREATE_GROUP 13020
#define WRENCHBOARD_JOB_DELETE_GROUP 13023
#define WRENCHBOARD_JOB_OFFER_SYSTEM 13025
#define WRENCHBOARD_JOB_OFFER_FAMILY 13029
#define WRENCHBOARD_JOB_OFFER_INDVI 13030
#define WRENCHBOARD_JOB_OFFER_GROUP 13031
#define WRENCHBOARD_JOB_OFFER_PUBLIC 13032
+9 -1
View File
@@ -80,8 +80,16 @@ long jobs_calls(CVars in, CVars &out) {
return WrenchDeleteJobsGroupMember(in, out);
break;
case WRENCHBOARD_JOB_OFFER_SYSTEM:
break;
case WRENCHBOARD_JOB_OFFER_FAMILY:
break;
case WRENCHBOARD_JOB_OFFER_INDVI:
return WrenchSendJobsOfferIndividual(in, out);
return WrenchSendJobsOfferIndividual(in, out);
break;
case WRENCHBOARD_JOB_OFFER_GROUP:
+2
View File
@@ -233,6 +233,8 @@ define('WRENCHBOARD_JOB_DELETE_GROUPMEMBER',13017);
define('WRENCHBOARD_JOB_CREATE_GROUP', 13020);
define('WRENCHBOARD_JOB_DELETE_GROUP',13023);
define('WRENCHBOARD_JOB_OFFER_SYSTEM', 13025);
define('WRENCHBOARD_JOB_OFFER_FAMILY', 13029);
define('WRENCHBOARD_JOB_OFFER_INDVI',13030);
define('WRENCHBOARD_JOB_OFFER_GROUP',13031);
define('WRENCHBOARD_JOB_OFFER_PUBLIC',13032);
+3
View File
@@ -125,6 +125,9 @@ $routes->post('/en/wrench/api/v1/pendingjobextend', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/pendingjobsendtome','WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/pendingjobcancel', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/assigntask', 'WrenchApi::apigate');
//$routes->post('/en/wrench/api/v1/blogdata', 'WrenchBlog::apigate');
//$routes->post('/en/wrench/api/v1/blogitem', 'WrenchBlog::apigate');
+5
View File
@@ -97,12 +97,17 @@ class WrenchApi extends BaseController
'pendingjobextend' => ['POST'],
'pendingjobsendtome' => ['POST'],
'pendingjobcancel' => ['POST'],
'assigntask' => ['POST'],
];
return $endpoints;
}
private function prepareEndPointData($endpoint, $in, &$call_backend=true,&$local_out=[]){
switch ($endpoint) {
case 'assigntask':
$in["action"] = WRENCHBOARD_JOB_OFFER_SYSTEM;
break;
case 'pendingjobextend':
$in["action"] = WRENCHBOARD_JOB_EXTEND_EXPIRE;
break;
+3 -1
View File
@@ -138,8 +138,10 @@ define('WRENCHBOARD_JOB_DELETEJOB',13011 );
define('WRENCHBOARD_JOB_GROUP_MEMBER', 13015) ;
define('WRENCHBOARD_JOB_DELETE_GROUPMEMBER',13017);
define('WRENCHBOARD_JOB_CREATE_GROUP', 13020);
define('WRENCHBOARD_JOB_DELETE_GROUP',13023);
define('WRENCHBOARD_JOB_DELETE_GROUP',13023);
define('WRENCHBOARD_JOB_OFFER_SYSTEM', 13025);
define('WRENCHBOARD_JOB_OFFER_FAMILY', 13029);
define('WRENCHBOARD_JOB_OFFER_INDVI',13030);
define('WRENCHBOARD_JOB_OFFER_GROUP',13031);
define('WRENCHBOARD_JOB_OFFER_PUBLIC',13032);
+5
View File
@@ -76,6 +76,7 @@ $endpoints = array(
'pendingjobextend' => array('POST'),
'pendingjobsendtome' => array('POST'),
'pendingjobcancel' => array('POST'),
'assigntask' => array('POST'),
);
$call_backend = true; // sometimes we need to overwite the call to the extenstion API
@@ -138,6 +139,10 @@ if ($_SERVER["REQUEST_METHOD"] == "GET") {
}
$in["loc"] = $_SERVER["REMOTE_ADDR"];
switch ($endpoint) {
case 'assigntask':
$in["action"] = WRENCHBOARD_JOB_OFFER_SYSTEM;
break;
case 'pendingjobextend':
$in["action"] = WRENCHBOARD_JOB_EXTEND_EXPIRE;
break;