diff --git a/wrenchboard/email/JOB/job_offer_invidual.mailfile b/wrenchboard/email/JOB/job_offer_invidual.mailfile index e3bf3750..c46ca62a 100644 --- a/wrenchboard/email/JOB/job_offer_invidual.mailfile +++ b/wrenchboard/email/JOB/job_offer_invidual.mailfile @@ -56,7 +56,7 @@ Subject: {{subject}} - {{title}}
- WrenchBoard + WrenchBoard
@@ -101,7 +101,7 @@ Subject: {{subject}} - {{title}} -You have received a job offer from a {{site_name}} user with details below. +You have received a job offer from a {{site_name}} user with details below. @@ -134,7 +134,7 @@ You have received a job offer from a - {{offer_code}} + {{offer_code}} @@ -188,7 +188,7 @@ You have received a job offer from a login into your account to accept this offer. +

Please login into your account to accept this offer.

@@ -218,7 +218,7 @@ You have received a job offer from a ® {{site_name}} 2022
- You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please
contact us. + You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please contact us. @@ -227,12 +227,12 @@ You have received a job offer from a - Facebook + Facebook - Twitter + Twitter @@ -251,8 +251,5 @@ You have received a job offer from a diff --git a/wrenchboard/src/include/wrenchboard_api.h b/wrenchboard/src/include/wrenchboard_api.h index 7689564d..8446a00d 100644 --- a/wrenchboard/src/include/wrenchboard_api.h +++ b/wrenchboard/src/include/wrenchboard_api.h @@ -21,6 +21,7 @@ enum { PARTNER_STRIPE }; #define OFFER_EXTEND 555 #define OFFER_SENDTOME 777 +#define OFFER_RESEND 888 #define WEBSITE_LOGIN 1100 #define MOBILE_LOGIN 1101 diff --git a/wrenchboard/src/shared_tool/jobs.cc b/wrenchboard/src/shared_tool/jobs.cc index 1c71fc49..677ffd21 100644 --- a/wrenchboard/src/shared_tool/jobs.cc +++ b/wrenchboard/src/shared_tool/jobs.cc @@ -372,6 +372,18 @@ long WrenchConcludeJobsOffer(CVars in, CVars &out) { const PGresult *res = pgsql_query("SELECT * FROM members_jobs_offer WHERE offer_code='%s' AND status = 1", in["offer_code"].c_str()); if (res != NULL && pgsql_num_rows(res) > 0) { + // now job is valid + + if( offer_result == OFFER_RESEND){ + if (load_db_record(outx, "SELECT o.id AS offer_id, o.*,to_char(o.expire, 'Day Mon dd, yyyy HH:MI AM') AS expire2,j.title,j.description,j.timeline_days,j.price FROM members_jobs_offer o LEFT JOIN members_jobs j ON j.id =o.job_id WHERE o.offer_code='%s' AND o.email IS NOT NULL", in["offer_code"].c_str())) { + job_email(JOBS_INDIVIDUAL_OFFER_MAIL, outx, out); // make sure job went to individual + out["result"] = "OK"; + } + + return PHP_CREATED_OK; + } + + load_db_record(out, "SELECT jo.member_id AS owner_member_id,jo.id AS offer_id, j.id AS job_id,jo.added::date AS added_date,j.title,j.description, j.timeline_days, j.price,jo.offer_code,jo.job_description,jo.expire FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id WHERE jo.expire > now() AND jo.status = 1 AND jo.client_id = %lu AND jo.offer_code='%s'", in["member_id"].Long(), in["offer_code"].c_str()); @@ -392,6 +404,8 @@ long WrenchConcludeJobsOffer(CVars in, CVars &out) { break; + + case OFFER_SENDTOME: job_email(JOBS_OFFER_SENDTOME_MAIL, in, out); // the email will come from break;