assign create

This commit is contained in:
CHIEFSOFT\ameye
2023-07-07 12:10:16 -04:00
parent 5d3212234b
commit c9d3f71fbe
2 changed files with 31 additions and 4 deletions
+5 -4
View File
@@ -34,10 +34,11 @@ enum { PARTNER_STRIPE };
#define LOGIN_MODE_GENERAL 1100
#define LOGIN_MODE_FAMILY 1105
#define ASSIGN_MODE_FAMILY 110011
#define ASSIGN_MODE_INDIVIDUAL 110022
#define ASSIGN_MODE_EMAIL 110033
#define ASSIGN_MODE_GROUP 110044
#define ASSIGN_MODE_FAMILY 110011
#define ASSIGN_MODE_INDIVIDUAL 110022
#define ASSIGN_MODE_EMAIL 110033
#define ASSIGN_MODE_GROUP 110044
#define ASSIGN_MODE_CREATEASSIGN 110055
#define CONTRACT_CANCEL_CONTRACT 7
#define CONTRACT_EXTEND_TIMELINE 9
+26
View File
@@ -28,6 +28,7 @@ long WrenchJobPostNotifyOffer(CVars in, CVars &out);
long WrenchJobPostCancelOffer(CVars in, CVars &out);
long WrenchJobOfferSystems(CVars in, CVars &out);
long WrenchSendJobsOfferFamily(CVars in, CVars &out);
long WrenchSendJobsOfferCreateAssign(CVars in, CVars &out);
long WrenchJobsOfferInterestList(CVars in, CVars &out);
long WrenchUserJobsInterestList(CVars in, CVars &out);
@@ -166,6 +167,10 @@ long WrenchJobOfferSystems(CVars in, CVars &out){
logfmt(logINFO, "WrenchJobOfferSystems()->ASSIGN_MODE_FAMILY");
return WrenchSendJobsOfferFamily(in, out);
break;
case ASSIGN_MODE_CREATEASSIGN:
logfmt(logINFO, "WrenchJobOfferSystems()->ASSIGN_MODE_CREATEASSIGN");
return WrenchSendJobsOfferCreateAssign(in, out);
break;
case ASSIGN_MODE_INDIVIDUAL:
logfmt(logINFO, "WrenchJobOfferSystems()->ASSIGN_MODE_INDIVIDUAL");
return WrenchSendJobsOfferPublic(in, out);
@@ -185,6 +190,27 @@ long WrenchJobOfferSystems(CVars in, CVars &out){
return ret;
}
long WrenchSendJobsOfferCreateAssign(CVars in, CVars &out){
logfmt(logINFO, "******* ~~~~ WrenchSendJobsOfferCreateAssign()");
long ret = PHP_API_BAD_PARAM;
try {
CVars xx;
long member_id = REQ_LONG(in, "member_id", 1, -1);
REQ_LONG(in, "job_id", 1, -1);
// REQ_STRING(in, "job_uid", 1, 59, "(.*)");
REQ_STRING(in, "family_uid", 1, 59, "(.*)");
// REQ_STRING(in, "job_description", 1, 5500, "(.*)");
if ( WrenchCreateJobs(in, xx) == PHP_CREATED_OK ){
in["job_uid"] = xx["job_uid"]; xx["job_uid"].set_valid( true );
in["job_description"] = xx["job_detail"]; xx["job_description"].set_valid( true );
ret = WrenchSendJobsOfferFamily(in, out);
}
} catch (bad_parameter) {
out["log_status"] = "error...";
}
logfmt(logINFO, "/******* ~~~~ WrenchSendJobsOfferCreateAssign()");
return ret;
}
long WrenchJobPostExtendTime(CVars in, CVars &out){
long ret = PHP_API_BAD_PARAM;