Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1864 QT platform integration #1872

Merged
merged 35 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4ce3d65
Merge from tasks
warrensearle Sep 27, 2022
436113d
Remove unused code
warrensearle Sep 27, 2022
b8ffe20
QT platform integration
warrensearle Oct 13, 2022
6e3544f
Include copy to clipboard button
warrensearle Oct 18, 2022
298dfb7
Merge main
warrensearle Oct 24, 2022
b802b10
Include diversity characteristics
warrensearle Oct 27, 2022
86e9b38
Merge branch 'main' into feature/qt-platform-integration
warrensearle Dec 30, 2022
40acc70
Merge branch 'main' into feature/qt-platform-integration
warrensearle Jan 18, 2023
bd13bcf
Fix vulnerability with json5 module
warrensearle Jan 18, 2023
3d836cc
Make new QT platform the default
warrensearle Jan 19, 2023
5542728
Hide sub navigation in full screen mode
warrensearle Jan 19, 2023
926102c
Restrict platform change to canApproveExercise
warrensearle Jan 19, 2023
f0d0fe3
Update usage of Table as page-size is now required
warrensearle Jan 19, 2023
62180fc
Set individual pass or fail
warrensearle Jan 23, 2023
da1d618
Enable status to be overidden at pass mark (-one)
warrensearle Jan 25, 2023
888a6ca
Include EMP Tie-breaker
warrensearle Jan 25, 2023
430cf5f
Data entry task
warrensearle Jan 26, 2023
3352205
Merge branch 'main' into feature/qt-platform-integration
warrensearle Jan 26, 2023
cf98d41
Data entry task
warrensearle Jan 27, 2023
3e3e492
Merge branch 'main' into feature/qt-platform-integration
warrensearle Feb 7, 2023
cac364e
Update store and fix lint error
warrensearle Feb 7, 2023
64db481
Link to QT should go to the Edit page
warrensearle Feb 9, 2023
6a4bc2f
Merge branch 'main' into feature/qt-platform-integration
warrensearle Feb 13, 2023
0b2f50f
Added candidate names to finalised screen.
drieJAC Feb 13, 2023
2b476b1
Updated to use latest jac-kit.
drieJAC Feb 13, 2023
210b175
Removed formatNumber tests as filter has now been moved to the jac-kit.
drieJAC Feb 13, 2023
e4ff8dd
Remove broken formatNumber
warrensearle Feb 13, 2023
4809356
Fix lint warnings
warrensearle Feb 13, 2023
3bd2f5f
Merge branch 'main' into feature/qt-platform-integration
warrensearle Feb 13, 2023
0c0feaa
Update package-lock
warrensearle Feb 13, 2023
e742755
Fix duplicate filter
warrensearle Feb 13, 2023
3b6d3b6
Remove candidate name from Finalised list
warrensearle Feb 14, 2023
d50ed70
Displaying candidate name instead of ref in the finalised view.
drieJAC Feb 14, 2023
ee2ca77
Score should be 2dp
warrensearle Feb 14, 2023
e7dc075
Allow pass mark to be 0
warrensearle Feb 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12,063 changes: 3,031 additions & 9,032 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@ckeditor/ckeditor5-build-classic": "^16.0.0",
"@ckeditor/ckeditor5-vue": "^1.0.3",
"@jac-uk/jac-kit": "^0.1.15",
"@jac-uk/jac-kit": "^0.1.18",
"@ministryofjustice/frontend": "0.2.4",
"@sentry/tracing": "^7.13.0",
"@sentry/vue": "^7.13.0",
Expand Down
4 changes: 4 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div
class="page-container"
:class="{ 'full-screen': fullScreen }"
@mouseenter="onMouseOver"
>
<header
Expand Down Expand Up @@ -229,6 +230,9 @@ export default {
hasClipboardData() {
return this.$store.state.clipboard.hasData;
},
fullScreen() {
return this.$store.state.ui.fullScreen;
},
},
watch: {
async isSignedIn() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/SubNavigation.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<nav
class="moj-sub-navigation govuk-!-margin-bottom-4"
class="sub-navigation moj-sub-navigation govuk-!-margin-bottom-4"
aria-label="Sub navigation"
>
<ul class="moj-sub-navigation__list">
Expand Down
79 changes: 79 additions & 0 deletions src/components/Page/Form.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<template>
<form
@submit.prevent="validateAndSave"
>
<ErrorSummary
:errors="errors"
:show-save-button="false"
@save="save"
/>

<slot />

<button
class="govuk-button govuk-!-margin-right-3"
>
Save
</button>
<button
class="govuk-button govuk-button--secondary govuk-!-margin-right-3"
type="button"
@click="cancel"
>
Cancel
</button>
<button
v-if="id"
class="govuk-button govuk-button--warning govuk-!-margin-right-3"
type="button"
@click="remove"
>
Delete
</button>
</form>
</template>

<script>
import Form from '@jac-uk/jac-kit/draftComponents/Form/Form';
import ErrorSummary from '@jac-uk/jac-kit/draftComponents/Form/ErrorSummary';

export default {
name: 'PanellistsForm',
components: {
ErrorSummary,
},
extends: Form,
props: {
data: {
type: Object,
required: false,
default: () => {},
},
id: {
type: String,
required: false,
default: '',
},
},
data() {
return {
formData: this.load(this.data),
};
},
methods: {
load(data) { // this method should be overriden with model-specific data
return { ...data };
},
save() {
this.$emit('save', this.formData);
},
cancel() {
this.formData = this.load(this.data);
this.$emit('cancel');
},
remove() {
this.$emit('delete');
},
},
};
</script>
36 changes: 36 additions & 0 deletions src/components/Page/FullScreenButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<template>
<button
v-if="fullScreen"
type="button"
class="govuk-button govuk-button--secondary"
@click="exitFullScreen"
>
Exit full screen
</button>
<button
v-else
type="button"
class="govuk-button govuk-button--secondary"
@click="enterFullScreen"
>
Full screen
</button>
</template>

<script>
export default {
computed: {
fullScreen() {
return this.$store.state.ui.fullScreen;
},
},
methods: {
enterFullScreen() {
this.$store.dispatch('ui/enterFullScreen');
},
exitFullScreen() {
this.$store.dispatch('ui/exitFullScreen');
},
},
};
</script>
5 changes: 5 additions & 0 deletions src/components/Page/TitleBar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<div class="govuk-!-padding-2 govuk-heading-m background-blue text--inverse">
<slot />
</div>
</template>
98 changes: 95 additions & 3 deletions src/filters.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as filters from '@jac-uk/jac-kit/filters/filters';
import { ADVERT_TYPES, OFFENCE_CATEGORY, INDEPENDENT_ASSESSMENTS_STATUS, ASSESSOR_TYPES } from '@/helpers/constants';
import { ADVERT_TYPES, EXERCISE_STAGE, APPLICATION_STATUS, TASK_TYPE, OFFENCE_CATEGORY, INDEPENDENT_ASSESSMENTS_STATUS, ASSESSOR_TYPES } from '@/helpers/constants';

const lookup = (value) => {
let returnValue;
Expand Down Expand Up @@ -29,7 +29,7 @@ const lookup = (value) => {
selfAssessmentCompetencies: 'Self assessment with competencies',
additionalInfo: 'Additional Information',

// exercise stages
// exercise states
registration: 'Registration',
shortlisting: 'Shortlisting',
selection: 'Selection',
Expand All @@ -41,6 +41,12 @@ const lookup = (value) => {
shortlisted: 'Shortlisted',
selected: 'Selected',
recommended: 'Recommended',
passedCA: 'Passed CA',
failedCA: 'Failed CA',
passedSJ: 'Passed SJ',
failedSJ: 'Failed SJ',
passedScenario: 'Passed Scenario Test',
failedScenario: 'Failed Scenario Test',

// Editable Application helpers
date: 'Date',
Expand Down Expand Up @@ -70,7 +76,6 @@ const lookup = (value) => {
bame: 'Black, Asian and minority ethnic',
male: 'Male',
female: 'Female',
other: 'Other',
applied: 'Applied',
no: 'No',
yes: 'Yes',
Expand All @@ -79,6 +84,39 @@ const lookup = (value) => {
'online-and-judge-led': 'Yes - online resources and judge-led discussion group course',
'online-only': 'Yes - online resources only',

// Panel types
'sift': 'Sift',
'scenario': 'Scenario',

// Panel roles
'chair': 'Chair',
'independent': 'Independent',
'judicial': 'Judicial',

// Selection categories
'leadership': 'Strategic Leadership Questions',
'roleplay': 'Role Play',
'situational': 'Situational Questions',
'interview': 'Interview',
'overall': 'Overall',

// Capabilities
'L': 'Leadership',
'EJ': 'Exercising Judgement',
'PBK': 'Possessing and Building Knowledge',
'ACI': 'Assimilating and Clarifying Information',
'WCO': 'Working and Communicating with Others',
'MWE': 'Managing Work Efficiently',
'OVERALL': 'Overall',
'L&J': 'Legal & Judicial Skills',
'PQ': 'Personal Qualities',

// Set pass/fail
'pass': 'Pass',
'fail': 'Fail',

'other': 'Other',

archived: 'Archived',

// Outreach report headers
Expand All @@ -105,6 +143,60 @@ const lookup = (value) => {
lookup[ADVERT_TYPES.FULL] = 'Full';
lookup[ADVERT_TYPES.EXTERNAL] = 'External';

lookup[EXERCISE_STAGE.APPLIED] = 'Applied';
lookup[EXERCISE_STAGE.SHORTLISTED] = 'Shortlisted';
lookup[EXERCISE_STAGE.SELECTABLE] = 'Selectable';
lookup[EXERCISE_STAGE.RECOMMENDED] = 'Recommended';
lookup[EXERCISE_STAGE.HANDOVER] = 'Handover';

lookup[APPLICATION_STATUS.PASSED_NOT_RECOMMENDED] = 'Passed but not recommended to SCC';
lookup[APPLICATION_STATUS.PASSED_RECOMMENDED] = 'Passed and recommended to SCC';
lookup[APPLICATION_STATUS.QUALIFYING_TEST_FAILED] = 'Failed qualifying test';
lookup[APPLICATION_STATUS.QUALIFYING_TEST_PASSED] = 'Passed qualifying test';
lookup[APPLICATION_STATUS.RECOMMENDED_FUTURE] = 'Recommended for future appointment';
lookup[APPLICATION_STATUS.RECOMMENDED_IMMEDIATE] = 'Recommended for immediate appointment';
lookup[APPLICATION_STATUS.RECONSIDER] = 'SCC to reconsider';
lookup[APPLICATION_STATUS.REJECTED_CHARACTER] = 'Rejected on character';
lookup[APPLICATION_STATUS.REJECTED_INELIGIBLE_ADDITIONAL] = 'Rejected as ineligible (ASC)';
lookup[APPLICATION_STATUS.REJECTED_INELIGIBLE_STATUTORY] = 'Rejected as ineligible (statutory requirements)';
lookup[APPLICATION_STATUS.SCENARIO_TEST_FAILED] = 'Failed scenario test';
lookup[APPLICATION_STATUS.SCENARIO_TEST_PASSED] = 'Passed scenario test';
lookup[APPLICATION_STATUS.SECOND_STAGE_INVITED] = 'Invited to EMP second stage assessment';
lookup[APPLICATION_STATUS.SELECTION_FAILED] = 'Failed selection';
lookup[APPLICATION_STATUS.SELECTION_INVITED] = 'Invited to selection';
lookup[APPLICATION_STATUS.SELECTION_PASSED] = 'Passed selection';
lookup[APPLICATION_STATUS.SIFT_FAILED] = 'Failed sift';
lookup[APPLICATION_STATUS.SIFT_PASSED] = 'Passed sift';
lookup[APPLICATION_STATUS.WITHDRAWN] = 'Withdrawn';

lookup[`${TASK_TYPE.CRITICAL_ANALYSIS}`] = 'Critical Analysis Test';
lookup[`${TASK_TYPE.CRITICAL_ANALYSIS}Passed`] = 'Passed CA';
lookup[`${TASK_TYPE.CRITICAL_ANALYSIS}Failed`] = 'Failed CA';
lookup[`${TASK_TYPE.SITUATIONAL_JUDGEMENT}`] = 'Situational Judgement Test';
lookup[`${TASK_TYPE.SITUATIONAL_JUDGEMENT}Passed`] = 'Passed SJ';
lookup[`${TASK_TYPE.SITUATIONAL_JUDGEMENT}Failed`] = 'Failed SJ';
lookup[`${TASK_TYPE.QUALIFYING_TEST}`] = 'CA + SJ Scoring';
lookup[`${TASK_TYPE.QUALIFYING_TEST}Passed`] = 'Passed CA + SJ';
lookup[`${TASK_TYPE.QUALIFYING_TEST}Failed`] = 'Failed CA + SJ';
lookup[`${TASK_TYPE.SCENARIO}`] = 'Scenario Test';
lookup[`${TASK_TYPE.SCENARIO}Passed`] = 'Passed scenario test';
lookup[`${TASK_TYPE.SCENARIO}Failed`] = 'Failed scenario test';
lookup[TASK_TYPE.TELEPHONE_ASSESSMENT] = 'Telephone Assessment';
lookup[`${TASK_TYPE.TELEPHONE_ASSESSMENT}Passed`] = 'Passed telephone assessment';
lookup[`${TASK_TYPE.TELEPHONE_ASSESSMENT}Failed`] = 'Failed telephone assessment';
lookup[TASK_TYPE.ELIGIBILITY_SCC] = 'Eligibility SCC';
lookup[`${TASK_TYPE.ELIGIBILITY_SCC}Passed`] = 'Passed eligibility SCC';
lookup[`${TASK_TYPE.ELIGIBILITY_SCC}Failed`] = 'Failed eligibility SCC';
lookup[TASK_TYPE.CHARACTER_AND_SELECTION_SCC] = 'Character and Selection SCC';
lookup[`${TASK_TYPE.CHARACTER_AND_SELECTION_SCC}Passed`] = 'Passed character and selection SCC';
lookup[`${TASK_TYPE.CHARACTER_AND_SELECTION_SCC}Failed`] = 'Failed character and selection SCC';
lookup[TASK_TYPE.STATUTORY_CONSULTATION] = 'Statutory Consultation';
lookup[`${TASK_TYPE.STATUTORY_CONSULTATION}Passed`] = 'Passed statutory consultation';
lookup[`${TASK_TYPE.STATUTORY_CONSULTATION}Failed`] = 'Failed statutory consultation';
lookup[TASK_TYPE.SHORTLISTING_OUTCOME] = 'Shortlisting Outcome';
lookup[TASK_TYPE.WELSH_ASSESSMENT] = 'Welsh Assessment';
lookup[TASK_TYPE.SELECTION_OUTCOME] = 'Selection Outcome';
lookup[TASK_TYPE.EMP_TIEBREAKER] = 'EMP Tie-breaker';
lookup[INDEPENDENT_ASSESSMENTS_STATUS.DRAFT] = 'Draft';
lookup[INDEPENDENT_ASSESSMENTS_STATUS.PENDING] = 'Pending';
lookup[INDEPENDENT_ASSESSMENTS_STATUS.COMPLETED] = 'Completed';
Expand Down
73 changes: 72 additions & 1 deletion src/helpers/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
STATUS,
EXERCISE_STAGE,
APPLICATION_STATUS,
// APPLICATION_STATUS,
SHORTLISTING,
QUALIFYING_TEST,
QUALIFYING_TEST_RESPONSE,
Expand All @@ -18,6 +18,75 @@ const ADVERT_TYPES = {
EXTERNAL: 'external',
};

// const EXERCISE_STAGE = {
// APPLIED: 'applied',
// SHORTLISTED: 'shortlisted',
// SELECTABLE: 'selectable',
// RECOMMENDED: 'recommended',
// HANDOVER: 'handover',
// };

const APPLICATION_STATUS = {
CRITICAL_ANALYSIS_PASSED: 'criticalAnalysisPassed',
CRITICAL_ANALYSIS_FAILED: 'criticalAnalysisFailed',
SITUATIONAL_JUDGEMENT_PASSED: 'situationalJudgementPassed',
SITUATIONAL_JUDGEMENT_FAILED: 'situationalJudgementFailed',
QUALIFYING_TEST_PASSED: 'qualifyingTestPassed',
QUALIFYING_TEST_FAILED: 'qualifyingTestFailed',
SCENARIO_TEST_PASSED: 'scenarioTestPassed',
SCENARIO_TEST_FAILED: 'scenarioTestFailed',
SIFT_PASSED: 'siftPassed',
SIFT_FAILED: 'siftFailed',
TELEPHONE_ASSESSMENT_PASSED: 'telephoneAssessmentPassed',
TELEPHONE_ASSESSMENT_FAILED: 'telephoneAssessmentFailed',
ELIGIBILITY_SCC_PASSED: 'eligibilitySCCPassed',
// SELECTION_INVITED: 'selectionInvited',
REJECTED_INELIGIBLE_STATUTORY: 'rejectedIneligibleStatutory',
REJECTED_INELIGIBLE_ADDITIONAL: 'rejectedIneligibleAdditional',
REJECTED_CHARACTER: 'rejectedCharacter',
WITHDRAWN: 'withdrawn',
SELECTION_PASSED: 'selectionPassed',
SELECTION_FAILED: 'selectionFailed',
PASSED_RECOMMENDED: 'passedRecommended',
PASSED_NOT_RECOMMENDED: 'passedNotRecommended',
RECOMMENDED_IMMEDIATE: 'recommendedImmediate',
RECOMMENDED_FUTURE: 'recommendedFuture',
RECONSIDER: 'reconsider',
SECOND_STAGE_INVITED: 'secondStageInvited',
};

const APPLICATION_SUCCESS_STATUSES = [
APPLICATION_STATUS.CRITICAL_ANALYSIS_PASSED,
APPLICATION_STATUS.SITUATIONAL_JUDGEMENT_PASSED,
APPLICATION_STATUS.QUALIFYING_TEST_PASSED,
APPLICATION_STATUS.SCENARIO_TEST_PASSED,
APPLICATION_STATUS.SIFT_PASSED,
APPLICATION_STATUS.TELEPHONE_ASSESSMENT_PASSED,
APPLICATION_STATUS.ELIGIBILITY_SCC_PASSED,
APPLICATION_STATUS.SELECTION_PASSED,
APPLICATION_STATUS.PASSED_RECOMMENDED,
APPLICATION_STATUS.RECOMMENDED_IMMEDIATE,
APPLICATION_STATUS.RECOMMENDED_FUTURE,
APPLICATION_STATUS.SECOND_STAGE_INVITED,
];

const TASK_TYPE = {
SIFT: 'sift',
SELECTION: 'selection',
SCENARIO: 'scenarioTest',
CRITICAL_ANALYSIS: 'criticalAnalysis',
SITUATIONAL_JUDGEMENT: 'situationalJudgement',
QUALIFYING_TEST: 'qualifyingTest',
TELEPHONE_ASSESSMENT: 'telephoneAssessment',
ELIGIBILITY_SCC: 'eligibilitySCC',
CHARACTER_AND_SELECTION_SCC: 'characterAndSelectionSCC',
STATUTORY_CONSULTATION: 'statutoryConsultation',
SHORTLISTING_OUTCOME: 'shortlistingOutcome',
WELSH_ASSESSMENT: 'welshAssessment',
SELECTION_OUTCOME: 'selectionOutcome',
EMP_TIEBREAKER: 'empTiebreaker',
};

const INDEPENDENT_ASSESSMENTS_STATUS = {
DRAFT: 'draft',
PENDING: 'pending',
Expand Down Expand Up @@ -51,6 +120,8 @@ export {
STATUS,
EXERCISE_STAGE,
APPLICATION_STATUS,
APPLICATION_SUCCESS_STATUSES,
TASK_TYPE,
SHORTLISTING,
QUALIFYING_TEST,
QUALIFYING_TEST_RESPONSE,
Expand Down
Loading