Skip to content

Commit

Permalink
refactor: editedStatuses -> overriddenStatuses
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsOveTen committed Sep 22, 2023
1 parent 4134d50 commit 7410d7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/features/concept-statuses/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const prepareStatusList = (conceptStatuses: ReferenceDataCode[]) => {
}
} as ReferenceDataCode;

const editedStatuses = conceptStatuses.map(code => {
const overriddenStatuses = conceptStatuses.map(code => {
if (code.code === 'WAITING') {
code.label = {
en: 'waiting',
Expand All @@ -21,13 +21,13 @@ export const prepareStatusList = (conceptStatuses: ReferenceDataCode[]) => {
}
return code;
});
editedStatuses.push(rejected);
overriddenStatuses.push(rejected);

const utilizedCodes: ReferenceDataCode[] = [];

['DRAFT', 'CANDIDATE', 'WAITING', 'CURRENT', 'RETIRED', 'REJECTED'].forEach(
code => {
const utilized = editedStatuses.find(status => status.code === code);
const utilized = overriddenStatuses.find(status => status.code === code);
if (utilized) utilizedCodes.push(utilized);
}
);
Expand Down

0 comments on commit 7410d7a

Please sign in to comment.