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

Epic #2141 Embedding Pre-Selection Day Questionnaires on the Platform #2222

Merged
merged 45 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
250ac16
Add extra tasks
warrensearle Oct 10, 2023
3234f43
Merge branch 'main' into feature/1868
warrensearle Oct 10, 2023
c56cee6
#1868 Selection Day MVP
warrensearle Oct 13, 2023
7872688
Updates to task views and user journey
warrensearle Oct 16, 2023
5e09782
Merge branch 'main' into feature/1868
warrensearle Nov 6, 2023
32d2ce8
Support for EMP tie-breaker
warrensearle Nov 7, 2023
32aaf4a
BugFix: Changing advert type should not change exercise state
warrensearle Nov 7, 2023
6d90ce8
Bugfix: Panel pack search improvement
warrensearle Nov 7, 2023
11190bb
Bugfix: Create an exercise from clipboard not working
warrensearle Nov 7, 2023
ee488f8
Bugfix: Applications list layout. Reduce margin
warrensearle Nov 7, 2023
923207b
Bugfix: Task list. Application process not showing as Done
warrensearle Nov 7, 2023
82754ad
Bugfix: Exercise overview broken when unlocked
warrensearle Nov 7, 2023
c8667d2
Bugfix: Stages search should include hint
warrensearle Nov 7, 2023
800c47e
Data entry. Layout tweaks
warrensearle Nov 7, 2023
252d594
Fix lint
warrensearle Nov 7, 2023
e2eb9dc
Support for shortlisting outcome
warrensearle Nov 13, 2023
8aab227
#2191 Configure Pre-selection day workflow
warrensearle Nov 14, 2023
9911c3d
Add form validation
warrensearle Nov 14, 2023
f30513a
Text change
warrensearle Nov 14, 2023
d3c81d2
Added module for candidateForm.
drieJAC Nov 16, 2023
eb12080
Create candidateForm document on save
warrensearle Nov 16, 2023
24f5a93
Fix naming and typo
warrensearle Nov 17, 2023
29da777
Fixed incorrect send date
drieJAC Nov 20, 2023
4d25710
Update task first page to be called 'Overview'
warrensearle Nov 20, 2023
469bab3
Include constants
warrensearle Nov 21, 2023
74d4572
Merge branch 'main' into epic/2141-pre-selection-day-questionnaire
warrensearle Nov 21, 2023
00695b5
fix lints
HalcyonJAC Nov 27, 2023
b747e49
Fix name change of date fields
warrensearle Nov 27, 2023
6929dd6
Feature/2192 Monitor candidate data (#2223)
HalcyonJAC Nov 29, 2023
40e7928
#2226 Configure Candidate Availability (#2227)
warrensearle Nov 29, 2023
b27d586
Fix timeline dates
warrensearle Nov 29, 2023
55eadd0
Fix save error
warrensearle Nov 29, 2023
abdb3a9
Open candidate form when requests are sent (for now)
warrensearle Nov 30, 2023
3fdcd12
Store panellist id and name rather than just id
warrensearle Nov 30, 2023
a868da1
Ensure date fields have a validation message
warrensearle Dec 12, 2023
406dc82
Show parts that are relevant to exercise
warrensearle Dec 12, 2023
d466228
Merge branch 'main' into epic/2141-pre-selection-day-questionnaire
warrensearle Dec 13, 2023
a59687e
Merge branch 'main' into feature/1868
warrensearle Dec 19, 2023
7e7583d
Merge branch 'feature/1868' into epic/2141-pre-selection-day-question…
warrensearle Dec 19, 2023
78d3e87
Close and continue button
warrensearle Dec 19, 2023
d49f97e
Merge branch 'main' into feature/1868
warrensearle Dec 19, 2023
2192853
Merge branch 'feature/1868' into epic/2141-pre-selection-day-question…
warrensearle Dec 19, 2023
20e5ae3
Update PSDQ wording
warrensearle Dec 22, 2023
a0a45fc
Remove configuration of form parts
warrensearle Dec 22, 2023
ab5bd06
Merge branch 'main' into epic/2141-pre-selection-day-questionnaire
warrensearle Dec 22, 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 changes: 11 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,17 @@
Candidates
</RouterLink>
</li>

<li
v-if="hasPermissions([PERMISSIONS.panellists.permissions.canManagePanellists.value])"
class="govuk-header__navigation-item"
>
<RouterLink
:to="{ name: 'panellists-list' }"
class="govuk-header__link"
>
Panellists
</RouterLink>
</li>
<li
v-if="hasPermissions([PERMISSIONS.users.permissions.canReadUsers.value])"
class="govuk-header__navigation-item"
Expand Down
137 changes: 137 additions & 0 deletions src/components/ModalViews/CandidateFormNotification.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<template>
<div>
<div class="modal__title govuk-!-padding-2 govuk-heading-m">
{{ $filters.lookup(type) }} consent form {{ notificationType }}
</div>
<div class="modal__content govuk-!-margin-6">
<div class="govuk-grid-row">
<form
ref="formRef"
>
<div class="govuk-!-margin-bottom-5">
<span class="govuk-body-m">Before proceeding, please confirm that you wish to send a {{ notificationType }} to </span>
<span class="govuk-body-m govuk-!-font-weight-bold">{{ numberOfCandidates }} candidate(s) </span>
<span class="govuk-body-m">and the email template contains all required information</span>
</div>
<ActionButton
v-if="hasPermissions([
PERMISSIONS.applications.permissions.canReadApplications.value,
PERMISSIONS.applications.permissions.canUpdateApplications.value,
PERMISSIONS.notifications.permissions.canCreateNotifications.value
])"
type="primary"
class="govuk-!-margin-right-3 govuk-!-top-3"
:action="send"
>
{{ buttonText }}
</ActionButton>
<button
class="govuk-button govuk-button--secondary govuk-!-margin-right-3"
@click.prevent="closeModal"
>
Cancel
</button>
</form>
</div>
</div>
</div>
</template>

<script>
import { functions } from '@/firebase';
import permissionMixin from '@/permissionMixin';
import ActionButton from '@jac-uk/jac-kit/draftComponents/ActionButton.vue';

export default {
name: 'CandidateFormNotification',
components: {
ActionButton,
},
mixins: [permissionMixin],
props: {
type: {
type: String,
required: true,
default: '',
},
notificationType: {
type: String,
required: true,
default: '',
},
selectedItems: {
type: Array,
required: false,
default: () => [],
},
exercise: {
type: Object,
default: null,
},
dueDate: {
type: String,
required: true,
default: '',
},
},
emits: ['close', 'confirmed', 'setmessage', 'reset'],
data() {
return {
processing: false,
};
},
computed: {
exerciseMailbox() {
return this.exercise?.exerciseMailbox || '';
},
exerciseManagerName() {
return this.exercise?.emailSignatureName || '';
},
numberOfCandidates() {
return this.selectedItems.length;
},
buttonText() {
return `I confirm, please send ${this.notificationType}`;
},
},
methods: {
closeModal() {
this.$emit('close');
},
confirmModal() {
this.modalOpen = false;
this.$emit('confirmed');
document.body.style.overflow = '';
},
async send() {
try {
const response = await functions.httpsCallable('sendCandidateFormNotifications')({
type: this.type,
notificationType: this.notificationType,
items: this.selectedItems,
exerciseMailbox: this.exerciseMailbox,
exerciseManagerName: this.exerciseManagerName,
dueDate: this.dueDate,
});
if (response === false) {
this.$emit('setmessage', false, 'warning');
} else {
this.$emit('setmessage', true, this.notificationType, 'success');
}
} catch (error) {
this.$emit('setmessage', false, this.notificationType, 'warning');
}
this.closeModal();
this.$emit('reset');
},
},
};
</script>

<style scoped>
fieldset {
border: none;
padding: 0;
margin: 0;
}
</style>
2 changes: 1 addition & 1 deletion src/components/ModalViews/ChangeExerciseAdvertType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default {
const exercise = this.$store.state.exerciseDocument.record;
return {
formData: {
state: 'review',
advertType: null,
},
exerciseAdvertTypes: exerciseAdvertTypes(exercise),
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/Page/FullScreenButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<button
v-if="fullScreen"
type="button"
class="govuk-button govuk-button--secondary"
class="govuk-button govuk-button--secondary govuk-!-margin-bottom-0"
@click="exitFullScreen"
>
Exit full screen
</button>
<button
v-else
type="button"
class="govuk-button govuk-button--secondary"
class="govuk-button govuk-button--secondary govuk-!-margin-bottom-0"
@click="enterFullScreen"
>
Full screen
Expand Down
171 changes: 171 additions & 0 deletions src/components/Page/ProgressBar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
<template>
<div
class="progress-bar"
:class="{
'progress-bar--started': isStarted,
'progress-bar--completed': isCompleted
}"
>
<div
v-for="step in steps"
:key="step.id"
class="progress-bar-step"
:class="{
'progress-bar-step--completed': step.completed,
'progress-bar-step--current': step.id == currentStep.id
}"
>
<svg
v-if="step.completed"
class="progress-bar-step-icon"
viewBox="0 0 99.295 86.056"
>
<polygon
fill="currentColor"
points="36.371 86.056 0 54.594 9.793 43.287 34.554 64.728 87.76 0 99.295 9.49 36.371 86.056"
/>
</svg>
<div class="progress-bar-step-label govuk-caption-m">
{{ step.title }}
</div>
</div>
</div>
</template>

<script>
export default {
props: {
steps: {
required: true,
type: Array,
},
},
computed: {
completedSteps() {
return this.steps.filter(step => step.completed);
},
currentStep() {
if (this.completedSteps.length === 0) return this.steps[0];
if (this.isCompleted) return this.steps[this.steps.length - 1];
return this.steps[this.completedSteps.length];
},
isStarted() {
return this.completedSteps.length > 0;
},
isCompleted() {
return this.steps.length === this.completedSteps.length;
},
},
};
</script>

<style lang="scss">

.progress-bar {
width: 100%;
height: 3.5em;
margin-bottom: 1.5em;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
position: relative;
overflow: hidden;
&::after {
content: "";
display: block;
position: absolute;
bottom: 7.5px;
right: 0;
width: 3px;
height: 9px;
background-color: govuk-colour("mid-grey");
}
> .progress-bar-step {
flex-grow: 1;
height: 24px;
text-align: left;
align-self: flex-end;
&::before {
content: "";
display: block;
position:absolute;
width: 100%;
height: 3px;
margin-top: 10.5px;
background-color: govuk-colour("mid-grey");
}
&::after {
content: "";
position: absolute;
// margin-left: -3px;
margin-top: 7.5px;
width: 3px;
height: 9px;
background-color: govuk-colour("mid-grey");
}
> .progress-bar-step-icon {
display: none;
position: absolute;
z-index: 1;
width: 20px;
height: 20px;
margin-left: -10px;
margin-top: 2px;
background-color: govuk-colour("blue");
color: white;
border-radius: 10px;
padding: 3px;
}
> .progress-bar-step-label {
display: none;
position: absolute;
z-index: 1;
background-color: white;
width: 100%;
left: 0;
margin-left: 0;
margin-top: -30px;
}
&.progress-bar-step--completed {
&::before {
background-color: govuk-colour("blue");
}
&::after {
display: none;
}
> .progress-bar-step-icon {
display: inline;
}
> .progress-bar-step-label {
color: govuk-colour("blue");
}
}
&.progress-bar-step--current {
> .progress-bar-step-label {
z-index: 0;
display: block;
}
}
&:hover {
> .progress-bar-step-label {
display: block;
}
}
&:first-child {
> .progress-bar-step-icon {
margin-left: 0;
}
}
&:last-child {
flex-grow: 0;
> .progress-bar-step-icon {
margin-left: -20px;
}
}
}
&.progress-bar--completed::after {
display: none;
}
}

</style>
6 changes: 3 additions & 3 deletions src/components/PanelPacks/PanelPacks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Create New
</button>
<Table
v-if="hasPermissions([PERMISSIONS.panels.permissions.canReadPanels.value])"
v-if="hasPermissions([PERMISSIONS.panels.permissions.canReadPanels.value]) && panelsList.length"
data-key="id"
:data="panelsList"
:page-size="50"
Expand Down Expand Up @@ -45,7 +45,7 @@
:columns="tableColumnsCandidates"
multi-select
:page-size="50"
search-map="_search"
:search-map="$searchMap.applicationRecords"
@change="getTableDataCandidates"
>
<template #actions>
Expand Down Expand Up @@ -229,7 +229,7 @@ export default {
'applicationRecords/bind',
{
exerciseId: this.exerciseId,
stage: EXERCISE_STAGE.SELECTED,
stage: this.exercise && this.exercise._processingVersion >= 2 ? EXERCISE_STAGE.SHORTLISTED : EXERCISE_STAGE.SELECTED,
...params,
}
);
Expand Down
Loading
Loading