assign system

This commit is contained in:
CHIEFSOFT\ameye
2023-05-25 22:34:03 -04:00
parent d8d3619811
commit 26df9f3254
2 changed files with 32 additions and 2 deletions
@@ -34,6 +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 CONTRACT_CANCEL_CONTRACT 7
#define CONTRACT_EXTEND_TIMELINE 9
#define CONTRACT_NOTIFY_COMPLETE 4
+27 -2
View File
@@ -25,7 +25,7 @@ long WrenchJobPostAgree(CVars in, CVars &out);
long WrenchJobPostExtendTime(CVars in, CVars &out);
long WrenchJobPostNotifyOffer(CVars in, CVars &out);
long WrenchJobPostCancelOffer(CVars in, CVars &out);
long WrenchJobOfferSystems(CVars in, CVars &out);
long jobs_calls(CVars in, CVars &out) {
logfmt(logINFO, "jobs_calls()");
@@ -81,7 +81,7 @@ long jobs_calls(CVars in, CVars &out) {
break;
case WRENCHBOARD_JOB_OFFER_SYSTEM:
return WrenchJobOfferSystems(in, out);
break;
case WRENCHBOARD_JOB_OFFER_FAMILY:
@@ -140,6 +140,31 @@ long jobs_calls(CVars in, CVars &out) {
return 0;
}
long WrenchJobOfferSystems(CVars in, CVars &out){
long ret = PHP_API_BAD_PARAM;
try {
long assign_mode = REQ_LONG(in, "assign_mode", 1, -1);
switch(assign_mode){
case ASSIGN_MODE_FAMILY:
logfmt(logINFO, "WrenchJobOfferSystems()->ASSIGN_MODE_FAMILY");
break;
case ASSIGN_MODE_INDIVIDUAL:
logfmt(logINFO, "WrenchJobOfferSystems()->ASSIGN_MODE_INDIVIDUAL");
break;
case ASSIGN_MODE_EMAIL:
logfmt(logINFO, "WrenchJobOfferSystems()->ASSIGN_MODE_EMAIL");
break;
case ASSIGN_MODE_GROUP:
logfmt(logINFO, "WrenchJobOfferSystems()->ASSIGN_MODE_GROUP");
break;
}
} catch (bad_parameter) {
out["log_status"] = "error...";
}
return ret;
}
long WrenchJobPostExtendTime(CVars in, CVars &out){
long ret = PHP_API_BAD_PARAM;
try {