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

Commit 55edd60

Browse files
integrat withdraw status
1 parent 9808c79 commit 55edd60

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/constants/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ export const MY_GIG_PHASE = {
126126
PLACED: "Placed",
127127
NOT_SELECTED: "Not Selected",
128128
JOB_CLOSED: "Job Closed",
129+
WITHDRAWN: "Withdrawn",
129130
};
130131

131132
export const MY_GIG_PHASE_LABEL = {
@@ -139,6 +140,7 @@ export const MY_GIG_PHASE_LABEL = {
139140
PLACED: "PLACED",
140141
NOT_SELECTED: "NOT SELECTED",
141142
JOB_CLOSED: "JOB CLOSED",
143+
WITHDRAWN: "WITHDRAWN",
142144
};
143145

144146
export const MY_GIG_PHASE_STATUS = {
@@ -165,6 +167,8 @@ export const MY_GIGS_JOB_STATUS = {
165167
CLIENT_REJECTED_INTERVIEW: "client rejected - interview",
166168
CLIENT_REJECTED_SCREENING: "client rejected - screening",
167169
JOB_CLOSED: "job-closed",
170+
WITHDRAWN: "withdrawn",
171+
WITHDRAWN_PRESCREEN: "withdrawn-prescreen",
168172
};
169173
/**
170174
* Maps the status from API to gig status
@@ -183,6 +187,8 @@ export const JOB_STATUS_MAPPER = {
183187
[MY_GIGS_JOB_STATUS.CLIENT_REJECTED_INTERVIEW]: MY_GIG_PHASE.NOT_SELECTED,
184188
[MY_GIGS_JOB_STATUS.CLIENT_REJECTED_SCREENING]: MY_GIG_PHASE.NOT_SELECTED,
185189
[MY_GIGS_JOB_STATUS.JOB_CLOSED]: MY_GIG_PHASE.JOB_CLOSED,
190+
[MY_GIGS_JOB_STATUS.WITHDRAWN]: MY_GIG_PHASE.WITHDRAWN,
191+
[MY_GIGS_JOB_STATUS.WITHDRAWN_PRESCREEN]: MY_GIG_PHASE.WITHDRAWN,
186192
};
187193

188194
/**
@@ -207,6 +213,8 @@ export const JOB_STATUS_MESSAGE_MAPPER = {
207213
[MY_GIG_PHASE.NOT_SELECTED]: "You were not selected for this position.",
208214
[MY_GIG_PHASE.JOB_CLOSED]:
209215
"This position is no longer active. Please apply to other open gigs.",
216+
[MY_GIG_PHASE.WITHDRAWN]:
217+
"You withdrew your application for this gig or you have been placed in another gig.",
210218
};
211219

212220
export const ACTIONS_AVAILABLE_FOR_MY_GIG_PHASE = {
@@ -320,6 +328,8 @@ export const PHASES_FOR_JOB_STATUS = {
320328
MY_GIG_PHASE.NOT_SELECTED,
321329
],
322330
[MY_GIGS_JOB_STATUS.JOB_CLOSED]: [MY_GIG_PHASE.JOB_CLOSED],
331+
[MY_GIGS_JOB_STATUS.WITHDRAWN]: [MY_GIG_PHASE.WITHDRAWN],
332+
[MY_GIGS_JOB_STATUS.WITHDRAWN_PRESCREEN]: [MY_GIG_PHASE.WITHDRAWN],
323333
};
324334

325335
/**
@@ -337,6 +347,7 @@ export const SORT_STATUS_ORDER = [
337347
MY_GIG_PHASE.APPLIED,
338348
MY_GIG_PHASE.JOB_CLOSED,
339349
MY_GIG_PHASE.NOT_SELECTED,
350+
MY_GIG_PHASE.WITHDRAWN,
340351
];
341352

342353
export const PER_PAGE = 10;

src/containers/MyGigs/JobListing/JobCard/index.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ const JobCard = ({ job }) => {
129129
{![
130130
MY_GIGS_JOB_STATUS.JOB_CLOSED,
131131
MY_GIGS_JOB_STATUS.REJECTED_OTHER,
132+
MY_GIGS_JOB_STATUS.WITHDRAWN,
133+
MY_GIGS_JOB_STATUS.WITHDRAWN_PRESCREEN,
132134
].includes(job.status) && (
133135
<span styleName={`${expanded ? "show-less" : "show-more"}`}>
134136
<Button
@@ -149,6 +151,8 @@ const JobCard = ({ job }) => {
149151
{![
150152
MY_GIGS_JOB_STATUS.JOB_CLOSED,
151153
MY_GIGS_JOB_STATUS.REJECTED_OTHER,
154+
MY_GIGS_JOB_STATUS.WITHDRAWN,
155+
MY_GIGS_JOB_STATUS.WITHDRAWN_PRESCREEN,
152156
].includes(job.status) && (
153157
<div
154158
styleName="progress-bar"

0 commit comments

Comments
 (0)