Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 832f173

Browse files
adjusting APIs
1 parent 1470310 commit 832f173

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/api/app-constants.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const MY_GIGS_JOB_STATUS = {
3030
const JOB_APPLICATION_STATUS_MAPPER = {
3131
open_jobs: {
3232
statuses: [
33+
MY_GIGS_JOB_STATUS.APPLIED,
3334
MY_GIGS_JOB_STATUS.SKILLS_TEST,
3435
MY_GIGS_JOB_STATUS.PHONE_SCREEN,
3536
MY_GIGS_JOB_STATUS.SCREEN_PASS,
@@ -44,6 +45,7 @@ const JOB_APPLICATION_STATUS_MAPPER = {
4445
},
4546
archived_jobs: {
4647
statuses: [
48+
MY_GIGS_JOB_STATUS.APPLIED,
4749
MY_GIGS_JOB_STATUS.SKILLS_TEST,
4850
MY_GIGS_JOB_STATUS.PHONE_SCREEN,
4951
MY_GIGS_JOB_STATUS.SCREEN_PASS,

src/api/common/helper.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ async function handlePlacedJobCandidates(jobCandidates, userId) {
339339
);
340340
if (jc) {
341341
// jc.completed = (new Date(rb.endDate) <= new Date()) && rb.status == 'placed'
342-
jc.completed = new Date(rb.endDate) <= new Date();
342+
jc.completed = endDate ? new Date(rb.endDate) <= new Date() : false;
343343
}
344344
});
345345
return;
@@ -371,6 +371,7 @@ function handleArchivedJobCandidates(jobCandidates, jobs) {
371371
});
372372

373373
const openJobs = [
374+
constants.MY_GIGS_JOB_STATUS.APPLIED,
374375
constants.MY_GIGS_JOB_STATUS.SKILLS_TEST,
375376
constants.MY_GIGS_JOB_STATUS.PHONE_SCREEN,
376377
constants.MY_GIGS_JOB_STATUS.SCREEN_PASS,
@@ -382,7 +383,7 @@ function handleArchivedJobCandidates(jobCandidates, jobs) {
382383
if (openJobs.indexOf(jobCandidate.status) >= 0) {
383384
jobCandidate.withdraw = assignWithDraw;
384385
} else if (jobCandidate.status == constants.MY_GIGS_JOB_STATUS.PLACED) {
385-
jobCandidate.withdraw = !!jobCandidate.completed;
386+
jobCandidate.withdraw = false;
386387
} else {
387388
jobCandidate.withdraw = true;
388389
}

0 commit comments

Comments
 (0)