From 374c4bb4a060ee89056e18d5ab60dd6097373fe1 Mon Sep 17 00:00:00 2001 From: warrensearle Date: Tue, 28 Feb 2023 12:40:51 +0000 Subject: [PATCH] #1911 Enable QTs to be set up while exercise is still open (#1920) * #1911 Enable QTs to be set up whilst exercise is still open * Tidy up wording and font size --- src/views/Exercise/Tasks/Task/New/default.vue | 70 +++++++++++-------- .../Exercise/Tasks/Task/TestActivated.vue | 8 ++- .../Exercise/Tasks/Task/TestInitialised.vue | 14 ++-- 3 files changed, 52 insertions(+), 40 deletions(-) diff --git a/src/views/Exercise/Tasks/Task/New/default.vue b/src/views/Exercise/Tasks/Task/New/default.vue index 8a7bd2983..d03f3f20a 100644 --- a/src/views/Exercise/Tasks/Task/New/default.vue +++ b/src/views/Exercise/Tasks/Task/New/default.vue @@ -5,45 +5,32 @@

- Please check the following details before continuing + Please confirm the following

-
-
-
-
- Applications ({{ entryStatus | lookup }}) -
-

- {{ totalApplications }} -

-
-
+ + {{ timelineTask.entry }} will happen on {{ timelineTask.dateString }} + -
-
- {{ timelineTask.entry }} -

- {{ timelineTask.dateString }} -

-
-
-
+ + Only '{{ entryStatus | lookup }}' applications will be included + Continue @@ -56,11 +43,13 @@ import { btnNext } from '../helper'; import { TASK_TYPE } from '@/helpers/constants'; import { taskEntryStatus, previousTaskType, getTimelineTasks } from '@/helpers/exerciseHelper'; import ActionButton from '@jac-uk/jac-kit/draftComponents/ActionButton'; +import Checkbox from '@jac-uk/jac-kit/draftComponents/Form/Checkbox'; import { functions } from '@/firebase'; export default { components: { ActionButton, + Checkbox, }, props: { type: { @@ -68,6 +57,14 @@ export default { type: String, }, }, + data() { + return { + formData: { + entryStatus: null, + timelineTasks: [], + }, + }; + }, computed: { exercise() { return this.$store.state.exerciseDocument.record; @@ -97,6 +94,17 @@ export default { } return 0; }, + isFormCompleted() { + let expectedLength = 0; + let actualLength = 0; + if (this.entryStatus) { + expectedLength += 1; + if (this.formData.entryStatus === true) actualLength += 1; + } + expectedLength += this.timelineTasks.length; + actualLength += this.formData.timelineTasks.length; + return expectedLength === actualLength; + }, }, methods: { btnNext, diff --git a/src/views/Exercise/Tasks/Task/TestActivated.vue b/src/views/Exercise/Tasks/Task/TestActivated.vue index acc049c21..e4c5a3ab0 100644 --- a/src/views/Exercise/Tasks/Task/TestActivated.vue +++ b/src/views/Exercise/Tasks/Task/TestActivated.vue @@ -3,13 +3,15 @@

{{ type | lookup }}

-

- This test is hosted on the +

+ Please log in to the - QT Platform. + QT Platform to run and manage the {{ type | lookup }}. +

+

When the test and mop-ups have been completed you may continue.

{{ type | lookup }} -

- This test is hosted on the +

+ Please log in to the - QT Platform. + QT Platform to set up the {{ type | lookup }}. +

+

When all applications are ready please transfer them to the QT Platform.

- Transfer {{ totalApplications }} applications to the QT Platform + Transfer applications to the QT Platform -
+