diff --git a/src/helpers/constants.js b/src/helpers/constants.js index 9a4987625..4b10b14da 100644 --- a/src/helpers/constants.js +++ b/src/helpers/constants.js @@ -116,12 +116,18 @@ const OFFENCE_CATEGORY = { MIXED: 'mixed', }; +const TASK_QT_MAP = {}; +TASK_QT_MAP[TASK_TYPE.CRITICAL_ANALYSIS] = QUALIFYING_TEST.TYPE.CRITICAL_ANALYSIS; +TASK_QT_MAP[TASK_TYPE.SITUATIONAL_JUDGEMENT] = QUALIFYING_TEST.TYPE.SITUATIONAL_JUDGEMENT; +TASK_QT_MAP[TASK_TYPE.SCENARIO] = QUALIFYING_TEST.TYPE.SCENARIO; + export { STATUS, EXERCISE_STAGE, APPLICATION_STATUS, APPLICATION_SUCCESS_STATUSES, TASK_TYPE, + TASK_QT_MAP, SHORTLISTING, QUALIFYING_TEST, QUALIFYING_TEST_RESPONSE, diff --git a/src/store/qualifyingTest/qualifyingTest.js b/src/store/qualifyingTest/qualifyingTest.js index b2a96300b..a44f201e5 100644 --- a/src/store/qualifyingTest/qualifyingTest.js +++ b/src/store/qualifyingTest/qualifyingTest.js @@ -21,6 +21,9 @@ export default { bindQTs: firestoreAction(({ bindFirestoreRef, state }, params) => { let firestoreRef = collection .where('vacancy.id', '==', params.exerciseId); + if (params.type) { + firestoreRef = firestoreRef.where('type', '==', params.type); + } firestoreRef = tableQuery(state.records, firestoreRef, params); return bindFirestoreRef('records', firestoreRef, { serialize: vuexfireSerialize }); }), diff --git a/src/views/Exercise/Reports/MeritList.vue b/src/views/Exercise/Reports/MeritList.vue index ffaef2497..30158f2df 100644 --- a/src/views/Exercise/Reports/MeritList.vue +++ b/src/views/Exercise/Reports/MeritList.vue @@ -294,7 +294,7 @@ export default { // Default sort by total score (initially) columns.push({ title: 'Total Score', sort: 'totalScore', direction: 'desc', default: true, class: 'text-center' }); columns.push({ title: 'Female' }); - columns.push({ title: 'BAME' }); + columns.push({ title: 'Ethnic minority' }); columns.push({ title: 'Solicitor' }); columns.push({ title: 'Disability' }); return columns; diff --git a/src/views/Exercise/Tasks/Task/Data/AddMarkingSchemeItem.vue b/src/views/Exercise/Tasks/Task/Data/AddMarkingSchemeItem.vue new file mode 100644 index 000000000..5bd1b1574 --- /dev/null +++ b/src/views/Exercise/Tasks/Task/Data/AddMarkingSchemeItem.vue @@ -0,0 +1,82 @@ + + + diff --git a/src/views/Exercise/Tasks/Task/Data/Initialised.vue b/src/views/Exercise/Tasks/Task/Data/Initialised.vue index 7e5f76c42..a855f7129 100644 --- a/src/views/Exercise/Tasks/Task/Data/Initialised.vue +++ b/src/views/Exercise/Tasks/Task/Data/Initialised.vue @@ -1,3 +1,161 @@ + + diff --git a/src/views/Exercise/Tasks/Task/New.vue b/src/views/Exercise/Tasks/Task/New.vue index 385470cde..8b7e4beb8 100644 --- a/src/views/Exercise/Tasks/Task/New.vue +++ b/src/views/Exercise/Tasks/Task/New.vue @@ -12,11 +12,17 @@ import { beforeRouteEnter, getExpectedRouteName } from './helper'; import { TASK_TYPE } from '@/helpers/constants'; import defaultView from './New/default'; +import expired from './New/expired'; +import expiredQT from './New/expiredQT'; import qualifyingTest from './New/qualifyingTest'; +import { isDateInFuture } from '@jac-uk/jac-kit/helpers/date'; +import { getTimelineTasks } from '@/helpers/exerciseHelper'; export default { components: { defaultView, + expired, + expiredQT, qualifyingTest, }, beforeRouteEnter: beforeRouteEnter, @@ -27,12 +33,34 @@ export default { }, }, computed: { + exercise() { + return this.$store.state.exerciseDocument.record; + }, + timelineTasks() { + return getTimelineTasks(this.exercise, this.type); + }, + taskIsOverdue() { + const timelineTask = this.timelineTasks[0]; + if (!timelineTask) return false; + return !isDateInFuture(timelineTask.date); + }, newView() { - switch (this.type) { - case TASK_TYPE.QUALIFYING_TEST: - return 'qualifyingTest'; - default: - return 'defaultView'; + if (this.taskIsOverdue) { + switch (this.type) { + case TASK_TYPE.CRITICAL_ANALYSIS: + case TASK_TYPE.SITUATIONAL_JUDGEMENT: + case TASK_TYPE.SCENARIO: + return 'expiredQT'; + default: + return 'expired'; + } + } else { + switch (this.type) { + case TASK_TYPE.QUALIFYING_TEST: + return 'qualifyingTest'; + default: + return 'defaultView'; + } } }, }, diff --git a/src/views/Exercise/Tasks/Task/New/default.vue b/src/views/Exercise/Tasks/Task/New/default.vue index d03f3f20a..27bd1f075 100644 --- a/src/views/Exercise/Tasks/Task/New/default.vue +++ b/src/views/Exercise/Tasks/Task/New/default.vue @@ -27,6 +27,23 @@ Only '{{ entryStatus | lookup }}' applications will be included +
+ + + Warning + This task is overdue. Please change dates on the timeline if you wish to carry out the task.
Alternatively press continue to enter results data only. +
+
+ +
+

+ {{ type | lookup }} +

+
+ + + Warning + This task is overdue. Please change dates on the timeline if you wish to carry out the task. + +
+
+ + + diff --git a/src/views/Exercise/Tasks/Task/New/expiredQT.vue b/src/views/Exercise/Tasks/Task/New/expiredQT.vue new file mode 100644 index 000000000..1ddebd9d6 --- /dev/null +++ b/src/views/Exercise/Tasks/Task/New/expiredQT.vue @@ -0,0 +1,94 @@ + + +