add jib group

This commit is contained in:
CHIEFSOFT\ameye
2023-12-26 12:19:03 -05:00
parent a29d8fb6b5
commit 24ade2edc2
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -1885,6 +1885,7 @@ long WrenchCreateJobsGroup(CVars in, CVars &out) {
try { try {
if (load_db_record(out, "SELECT count(id) AS duplicate_name FROM members_job_group WHERE LOWER(group_name)=LOWER('%s') AND member_id =%lu AND status = 1", in["group_name"].c_str(), in["member_id"].Long())) { if (load_db_record(out, "SELECT count(id) AS duplicate_name FROM members_job_group WHERE LOWER(group_name)=LOWER('%s') AND member_id =%lu AND status = 1", in["group_name"].c_str(), in["member_id"].Long())) {
if (out["duplicate_name"].Long() > 0) { if (out["duplicate_name"].Long() > 0) {
out["error_status_message"] = "Duplicate Name";
return PHP_API_BAD_PARAM; return PHP_API_BAD_PARAM;
} // return no duplicate on any active name } // return no duplicate on any active name
} // this action blocks out duplicate } // this action blocks out duplicate
@@ -1905,7 +1906,7 @@ long WrenchCreateJobsGroup(CVars in, CVars &out) {
//JobAddedMail(x); //JobAddedMail(x);
load_db_record(out, "SELECT *,id AS group_id FROM members_job_group WHERE id = %lu ", group_id); load_db_record(out, "SELECT *,id AS group_id FROM members_job_group WHERE id = %lu ", group_id);
} else { } else {
out["status"] = "Uanble to create job group"; out["status"] = "Unable to create job group";
} }
} catch (bad_parameter) { } catch (bad_parameter) {
+2 -1
View File
@@ -216,7 +216,8 @@ class WrenchApi extends BaseController
// $in["action"] = 0; // $in["action"] = 0;
break; break;
case 'jobgroupadd': case 'jobgroupadd':
$in["action"] = WRENCHBOARD_JOB_JOBGROUPADD; // WRENCHBOARD_JOB_JOBGROUPADD
$in["action"] = WRENCHBOARD_JOB_CREATE_GROUP;
// $in["action"] = 0; // $in["action"] = 0;
break; break;
case 'homebanners': case 'homebanners':