Formted jobs list

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-03-18 21:26:56 -04:00
parent 87b07b4d6b
commit 32b94e8ee5
3 changed files with 15 additions and 4 deletions
+4 -3
View File
@@ -317,10 +317,11 @@ long account_calls(CVars in, CVars &out) {
}
break;
// case WRENCHBOARD_START_JOBLIST:
// return WrenchReturnStartJobList(in, out);
// break;
//
case WRENCHBOARD_START_JOBLIST:
return WrenchReturnStartJobList(in, out);
break;
case WRENCHBOARD_ACCOUNT_JOBLIST:
return WrenchReturnJobList(in, out);
break;
+9 -1
View File
@@ -433,7 +433,9 @@ long WrenchReturnJobList(CVars in, CVars &out) {
const PGresult *res;
res = pgsql_query("SELECT j.title,j.description,m.id AS job_id,m.expire,m.job_description,j.price,m.offer_code,j.timeline_days, to_char(m.expire, 'Day Mon dd, yyyy HH:MI AM') AS expire2 "
res = pgsql_query("SELECT j.title,j.description,m.id AS job_id,m.expire,m.job_description,j.price, "
"m.offer_code,j.timeline_days, to_char(m.expire, 'Day Mon dd, yyyy HH:MI AM') AS expire2,"
"m.uid AS offer_uid,j.uid AS job_uid "
"FROM members_jobs_offer m "
"LEFT JOIN members_jobs j ON j.id=m.job_id "
"WHERE m.status = 1 AND m.client_id=0 "
@@ -473,6 +475,12 @@ long WrenchReturnJobList(CVars in, CVars &out) {
snprintf(vname, sizeof (vname), "id_%05d", i);
out[vname] = rec["job_id"];
snprintf(vname, sizeof (vname), "offer_uid_%05d", i);
out[vname] = rec["offer_uid"];
snprintf(vname, sizeof (vname), "job_uid_%05d", i);
out[vname] = rec["job_uid"];
}
}
ret = PHP_API_OK;
+2
View File
@@ -159,6 +159,8 @@ function processOutJson($in, $out) {
"title" => $out["title_${key}"],
"description" => $out["description_${key}"],
"id" => $out["id_${key}"],
"offer_uid" => $out["offer_uid_${key}"],
"job_uid" => $out["job_uid_${key}"],
"job_description" => cleanUpDescription($out["job_description_${key}"]),
"price" => $out["price_${key}"],
"timeline_days" => $out["timeline_days_${key}"],