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

Commit 5b819fe

Browse files
committed
feat: remove extra statuses for resource booking
1 parent 6a4bd96 commit 5b819fe

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

src/constants/index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,25 @@ export const RESOURCE_TYPE_OPTIONS = [
279279
];
280280

281281
/**
282-
* status options
282+
* job status options
283283
*/
284-
export const STATUS_OPTIONS = [
284+
export const JOB_STATUS_OPTIONS = [
285285
{ value: "sourcing", label: "sourcing" },
286286
{ value: "in-review", label: "in-review" },
287287
{ value: "assigned", label: "assigned" },
288288
{ value: "closed", label: "closed" },
289289
{ value: "cancelled", label: "cancelled" },
290290
];
291291

292+
/**
293+
* resource booking status options
294+
*/
295+
export const RESOURCE_BOOKING_STATUS_OPTIONS = [
296+
{ value: "assigned", label: "assigned" },
297+
{ value: "closed", label: "closed" },
298+
{ value: "cancelled", label: "cancelled" },
299+
];
300+
292301
/*
293302
* show error message below the markdown editor when the markedown editor is disabled
294303
*/

src/routes/JobForm/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { hasPermission } from "utils/permissions";
66
import { DISABLED_DESCRIPTION_MESSAGE } from "constants";
77
import {
88
RATE_TYPE_OPTIONS,
9-
STATUS_OPTIONS,
9+
JOB_STATUS_OPTIONS,
1010
WORKLOAD_OPTIONS,
1111
RESOURCE_TYPE_OPTIONS,
1212
FORM_ROW_TYPE,
@@ -120,7 +120,7 @@ export const getEditJobConfig = (
120120
isRequired: true,
121121
validationMessage: "Please, select Status",
122122
name: "status",
123-
selectOptions: STATUS_OPTIONS,
123+
selectOptions: JOB_STATUS_OPTIONS,
124124
disabled: !hasPermission(PERMISSIONS.UPDATE_JOB_STATUS),
125125
},
126126
],

src/routes/ResourceBookingForm/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import moment from "moment";
77
import _ from "lodash";
88
import {
9-
STATUS_OPTIONS,
9+
RESOURCE_BOOKING_STATUS_OPTIONS,
1010
FORM_ROW_TYPE,
1111
FORM_FIELD_TYPE,
1212
} from "../../constants";
@@ -95,7 +95,7 @@ export const getEditResourceBookingConfig = (onSubmit) => {
9595
isRequired: true,
9696
validationMessage: "Please, select Status",
9797
name: "status",
98-
selectOptions: STATUS_OPTIONS,
98+
selectOptions: RESOURCE_BOOKING_STATUS_OPTIONS,
9999
},
100100
],
101101
onSubmit: onSubmit,

0 commit comments

Comments
 (0)