From f2742cf6d22fb8f5c4b268e832e7e59f11bc595f Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Thu, 20 Jun 2024 10:39:20 +0100 Subject: [PATCH 1/5] wip --- .../Exercise/Reports/EligibilityIssuesV2.vue | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/views/Exercise/Reports/EligibilityIssuesV2.vue b/src/views/Exercise/Reports/EligibilityIssuesV2.vue index aaf9aa257..ff1e685b9 100644 --- a/src/views/Exercise/Reports/EligibilityIssuesV2.vue +++ b/src/views/Exercise/Reports/EligibilityIssuesV2.vue @@ -53,6 +53,26 @@
+
+ +
+
Candidate comments: + {{ issue }} {{ issue.candidateComments || '' }}
@@ -225,6 +246,7 @@ import ActionButton from '@jac-uk/jac-kit/draftComponents/ActionButton.vue'; import { debounce } from 'lodash'; import Checkbox from '@jac-uk/jac-kit/draftComponents/Form/Checkbox.vue'; import { downloadBase64File } from '@/helpers/file'; +// import { APPLICATION_STATUS } from '@/helpers/constants'; export default { name: 'EligibilityIssuesV2', @@ -243,6 +265,7 @@ export default { unsubscribeEligibilityIssuesReport: null, applicationRecords: [], issueStatus: 'all', + filterStatus: 'all', unsubscribeApplicationRecords: null, tableColumns: [ { title: 'Candidate', sort: 'candidate.fullName', default: true }, @@ -251,6 +274,8 @@ export default { showNotMet: false, statutoryTypes: ['pq', 'pqe'], nonStatutoryTypes: ['pje', 'rls'], + applicationStatusOptions: ['shortlistingOutcomePassed'], + // APPLICATION_STATUS, }; }, computed: { @@ -262,6 +287,9 @@ export default { showNotMet: function () { this.$refs['issuesTable'].reload(); }, + filterStatus: function () { + this.$refs['issuesTable'].reload(); + }, }, created() { this.unsubscribeEligibilityIssuesReport = onSnapshot( @@ -297,6 +325,9 @@ export default { if (this.showNotMet) { firestoreRef = query(firestoreRef, where('flags.eligibilityIssuesMet', '==', false)); } + if (this.filterStatus !== 'all') { + firestoreRef = query(firestoreRef, where('status', '==', this.filterStatus)); + } const res = await tableAsyncQuery(this.applicationRecords, firestoreRef, params, null); firestoreRef = res.queryRef; this.total = res.total; From dfcd913dcb1803ade49265f7187685522b435f66 Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Thu, 20 Jun 2024 17:14:52 +0100 Subject: [PATCH 2/5] eligibility report updates --- src/views/Exercise/Reports/EligibilityIssuesV2.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/views/Exercise/Reports/EligibilityIssuesV2.vue b/src/views/Exercise/Reports/EligibilityIssuesV2.vue index ff1e685b9..aeb4d08d1 100644 --- a/src/views/Exercise/Reports/EligibilityIssuesV2.vue +++ b/src/views/Exercise/Reports/EligibilityIssuesV2.vue @@ -122,7 +122,11 @@
{{ row.referenceNumber }} - {{ row.candidate.fullName }} + {{ row.candidate.fullName }} + + {{ $filters.lookup(row.status) }} + +
@@ -135,7 +139,6 @@
-
Candidate comments: - {{ issue }} {{ issue.candidateComments || '' }}
@@ -352,7 +354,7 @@ export default { }, async gatherReportData() { // fetch data - const response = await httpsCallable(functions, 'exportApplicationEligibilityIssues')({ exerciseId: this.exercise.id, format: 'excel' }); + const response = await httpsCallable(functions, 'exportApplicationEligibilityIssues')({ exerciseId: this.exercise.id, format: 'annex', status: this.filterStatus === 'all' ? null : this.filterStatus }); const reportData = []; // get headers reportData.push(response.data.headers.map(header => header.title)); @@ -413,7 +415,7 @@ export default { async downloadSCCAnnexReport() { if (!this.exercise.referenceNumber) return; // abort if no ref try { - const result = await httpsCallable(functions, 'exportApplicationEligibilityIssues')({ exerciseId: this.exercise.id, format: 'annex' }); + const result = await httpsCallable(functions, 'exportApplicationEligibilityIssues')({ exerciseId: this.exercise.id, format: 'annex', status: this.filterStatus === 'all' ? null : this.filterStatus }); if (!result.data) return; downloadBase64File( 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', From dfc22a220897b69706b3de500a66de06f5f4a747 Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Fri, 21 Jun 2024 16:52:58 +0100 Subject: [PATCH 3/5] include all statuses --- src/views/Exercise/Reports/EligibilityIssuesV2.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/views/Exercise/Reports/EligibilityIssuesV2.vue b/src/views/Exercise/Reports/EligibilityIssuesV2.vue index aeb4d08d1..7f5825f75 100644 --- a/src/views/Exercise/Reports/EligibilityIssuesV2.vue +++ b/src/views/Exercise/Reports/EligibilityIssuesV2.vue @@ -248,7 +248,7 @@ import ActionButton from '@jac-uk/jac-kit/draftComponents/ActionButton.vue'; import { debounce } from 'lodash'; import Checkbox from '@jac-uk/jac-kit/draftComponents/Form/Checkbox.vue'; import { downloadBase64File } from '@/helpers/file'; -// import { APPLICATION_STATUS } from '@/helpers/constants'; +import { APPLICATION_STATUS } from '@/helpers/constants'; export default { name: 'EligibilityIssuesV2', @@ -276,8 +276,7 @@ export default { showNotMet: false, statutoryTypes: ['pq', 'pqe'], nonStatutoryTypes: ['pje', 'rls'], - applicationStatusOptions: ['shortlistingOutcomePassed'], - // APPLICATION_STATUS, + applicationStatusOptions: APPLICATION_STATUS, }; }, computed: { From 17f6188f40635e8e643c34021b38a47bd1d5d7bb Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Tue, 25 Jun 2024 17:57:28 +0100 Subject: [PATCH 4/5] address comments --- src/views/Exercise/Reports/EligibilityIssuesV2.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/Exercise/Reports/EligibilityIssuesV2.vue b/src/views/Exercise/Reports/EligibilityIssuesV2.vue index 7f5825f75..a7e125180 100644 --- a/src/views/Exercise/Reports/EligibilityIssuesV2.vue +++ b/src/views/Exercise/Reports/EligibilityIssuesV2.vue @@ -248,7 +248,7 @@ import ActionButton from '@jac-uk/jac-kit/draftComponents/ActionButton.vue'; import { debounce } from 'lodash'; import Checkbox from '@jac-uk/jac-kit/draftComponents/Form/Checkbox.vue'; import { downloadBase64File } from '@/helpers/file'; -import { APPLICATION_STATUS } from '@/helpers/constants'; +import { availableStatuses } from '@/helpers/exerciseHelper'; export default { name: 'EligibilityIssuesV2', @@ -276,10 +276,12 @@ export default { showNotMet: false, statutoryTypes: ['pq', 'pqe'], nonStatutoryTypes: ['pje', 'rls'], - applicationStatusOptions: APPLICATION_STATUS, }; }, computed: { + applicationStatusOptions(){ + return [...availableStatuses(this.exercise), ...'']; + }, exercise() { return this.$store.state.exerciseDocument.record; }, From 8e57fe09b8137c6431d00cdda72f3674dd74e7a3 Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Tue, 25 Jun 2024 17:58:58 +0100 Subject: [PATCH 5/5] address comments --- src/views/Exercise/Reports/EligibilityIssuesV2.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Exercise/Reports/EligibilityIssuesV2.vue b/src/views/Exercise/Reports/EligibilityIssuesV2.vue index a7e125180..d4db1094a 100644 --- a/src/views/Exercise/Reports/EligibilityIssuesV2.vue +++ b/src/views/Exercise/Reports/EligibilityIssuesV2.vue @@ -280,7 +280,7 @@ export default { }, computed: { applicationStatusOptions(){ - return [...availableStatuses(this.exercise), ...'']; + return availableStatuses(this.exercise); }, exercise() { return this.$store.state.exerciseDocument.record;