Skip to content

Commit

Permalink
update passed SD
Browse files Browse the repository at this point in the history
  • Loading branch information
HalcyonJAC committed Oct 11, 2024
1 parent 088d267 commit ccc40aa
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/views/Exercise/Reports/Diversity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ export default {
},
tabs() {
// exclude shortlisted tab
const stages = this.availableStages.filter(stage => ![EXERCISE_STAGE.SHORTLISTED, EXERCISE_STAGE.SELECTION].includes(stage));
const stages = this.availableStages.filter(stage => ![EXERCISE_STAGE.SHORTLISTED, EXERCISE_STAGE.SELECTION, EXERCISE_STAGE.SCC].includes(stage));
const tabs = stages.map((stage) => {
const tab = {};
tab.ref = stage;
Expand All @@ -621,9 +621,6 @@ export default {
case EXERCISE_STAGE.SELECTION:
tab.title = 'Shortlisted';
break;
case EXERCISE_STAGE.SCC:
tab.title = 'Passed SD';
break;
case EXERCISE_STAGE.RECOMMENDATION:
tab.title = 'Recommended to JO';
break;
Expand All @@ -638,26 +635,32 @@ export default {
});
// add additional tabs based on shortlisting methods
const additionalTabs = this.additionalTabs.map(ref => ({ ref, title: this.$filters.lookup(ref) }));
return [tabs[0], ...additionalTabs, ...tabs.slice(1)];
return [tabs[0], ...this.additionalTabs, ...tabs.slice(1)];
},
additionalTabs() {
const shortlistingMethods = this.exercise.shortlistingMethods;
const tabs = [];
// qt
if (shortlistingMethods.some(method => ['situational-judgement-qualifying-test', 'critical-analysis-qualifying-test'].includes(method))) {
const ref = this.isProcessingVersion2 ? APPLICATION_STATUS.QUALIFYING_TEST_PASSED : APPLICATION_STATUS.PASSED_FIRST_TEST;
tabs.push(ref);
tabs.push({ ref, title: this.$filters.lookup(ref) });
}
// scenario test
if (shortlistingMethods.includes('scenario-test-qualifying-test')) {
const ref = this.isProcessingVersion2 ? APPLICATION_STATUS.SCENARIO_TEST_PASSED : APPLICATION_STATUS.PASSED_SCENARIO_TEST;
tabs.push(ref);
tabs.push({ ref, title: this.$filters.lookup(ref) });
}
// sift
if (shortlistingMethods.some(method => ['name-blind-paper-sift', 'paper-sift'].includes(method))) {
const ref = this.isProcessingVersion2 ? APPLICATION_STATUS.SIFT_PASSED : APPLICATION_STATUS.PASSED_SIFT;
tabs.push(ref);
tabs.push({ ref, title: this.$filters.lookup(ref) });
}
// passed SD
if (this.isProcessingVersion2) {
tabs.push({ ref: APPLICATION_STATUS.SELECTION_DAY_PASSED, title: 'Passed SD' });
} else {
tabs.push({ ref: APPLICATION_STATUS.PASSED_SELECTION, title: 'Passed SD' });
}
return tabs;
Expand Down

0 comments on commit ccc40aa

Please sign in to comment.