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

#730 QT response reset and confirmation modal #1227

Merged
merged 2 commits into from
Jul 23, 2021
Merged

#730 QT response reset and confirmation modal #1227

merged 2 commits into from
Jul 23, 2021

Conversation

tomlovesgithub
Copy link
Contributor

@tomlovesgithub tomlovesgithub commented Mar 22, 2021

What's included?

The ability to reset a QT response via the admin portal

Who should test?

✅ Product owner
✅ Developers
✅ UTG

How to test?

  • Find an exercise with a past QT, which has responses.
  • Select completed (finished) response.
  • Observe the 'reset' button on the response page (only available for authorised digital accounts)
  • Clicking the reset button should open a modal
  • Warning appears in modal
    ⎿Clicking cancel closes the modal and prevents reset
    ⎿Clicking confirm resets the QT
  • Once reset, a QT will be able to be marked as completed.

Risk - how likely is this to impact other areas?

🟠 Medium risk - this does change code that is shared with other areas.


image

video: here

730-qt-reset.mov

PREVIEW:DEVELOP
can be OFF, DEVELOP or STAGING

@github-actions
Copy link

github-actions bot commented Mar 22, 2021

Visit the preview URL for this PR (updated for commit e455474):

https://jac-admin-develop--pr1227-1226-qt-reset-3te2peck.web.app

(expires Sat, 21 Aug 2021 10:44:42 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@tomlovesgithub tomlovesgithub marked this pull request as draft March 25, 2021 10:18
Copy link
Contributor

@HalcyonJAC HalcyonJAC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether the JAC admin portal is used on mobile phones or not, but the modal popup is not mobile-friendly

image

@HalcyonJAC
Copy link
Contributor

HalcyonJAC commented Apr 6, 2021

It would appear that the code in file src\helpers\authUsers.js is related to identifying system administrators. For reference, here is the code contained in the helpers\authUsers.js file:

const authorisedUsers = [
  'maria.brookes@judicialappointments.digital',
  'warren.searle@judicialappointments.digital',
  'tom.russell@judicialappointments.digital',
  'kate.malone@judicialappointments.digital',
  'joy.adeagbo@judicialappointments.digital',
];

const authorisedToPerformAction = async (email) => {
  return authorisedUsers.includes(email);
};

export {
  authorisedToPerformAction
};

Consider refactoring the code above as follows:

  • Rename the file to src\helpers\sysAdmins.js
  • Rename authorisedUsers to sysAdmins
  • Rename authorisedToPerformAction() to isSysAdmin()
  • Update references in the system to reflect the above changes. Note: References exist in the following files:
    • src\store\qualifyingTest\qualifyingTestResponses.js
    • src\views\Exercises\Tasks\QualifyingTests\QualifyingTest\Response\View.vue
    • tests\unit\store\qualifyingTest\qualifyingTestResponses.spec.js

@mbrookeswebdev
Copy link
Contributor

As per comment above re: authUsers.js - as soon as we'll implement user roles (hopefully soon!), we won't need this file.

@mbrookeswebdev mbrookeswebdev self-requested a review April 20, 2021 15:32
Copy link
Contributor

@mbrookeswebdev mbrookeswebdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested it and it works.

@KateMJAC
Copy link

Ticket to be discussed at Friday stand-up on 2 July. Advised by Tom that we have the option to proceed with this work or roll what has been done back.

We need consensus as to the value of the work and whether its felt we should proceed.

@tomlovesgithub tomlovesgithub temporarily deployed to develop July 6, 2021 16:33 Inactive
@tomlovesgithub tomlovesgithub marked this pull request as ready for review July 7, 2021 10:49
@tomlovesgithub tomlovesgithub requested review from a team as code owners July 7, 2021 10:49
@HalcyonJAC
Copy link
Contributor

Hi @tomlovesgithub please could you provide some info on how to test? Thanks!

@tomlovesgithub
Copy link
Contributor Author

Hi @tomlovesgithub please could you provide some info on how to test? Thanks!

@HalcyonJAC
Apologies!
Added some directions for testing.

@tomlovesgithub tomlovesgithub temporarily deployed to develop July 8, 2021 15:44 Inactive
@tomlovesgithub tomlovesgithub temporarily deployed to production July 12, 2021 16:09 Inactive
@tomlovesgithub tomlovesgithub temporarily deployed to develop July 13, 2021 11:31 Inactive
@tomlovesgithub tomlovesgithub marked this pull request as draft July 14, 2021 16:17
@tomlovesgithub tomlovesgithub removed the request for review from warrensearle July 14, 2021 16:18
@tomlovesgithub tomlovesgithub temporarily deployed to production July 14, 2021 16:21 Inactive
@londonprojects
Copy link
Contributor

@tomlovesgithub Is this ready for testing?

@tomlovesgithub tomlovesgithub changed the title qt statusLog reset field and modal #730 QT response reset and confirmation modal Jul 19, 2021
@tomlovesgithub tomlovesgithub marked this pull request as ready for review July 19, 2021 13:50
@tomlovesgithub tomlovesgithub temporarily deployed to production July 19, 2021 13:51 Inactive
@tomlovesgithub tomlovesgithub temporarily deployed to develop July 19, 2021 13:51 Inactive
@tomlovesgithub tomlovesgithub temporarily deployed to develop July 20, 2021 13:59 Inactive
Copy link
Contributor

@mbrookeswebdev mbrookeswebdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@tomlovesgithub tomlovesgithub temporarily deployed to develop July 21, 2021 10:34 Inactive
@tomlovesgithub tomlovesgithub temporarily deployed to develop July 21, 2021 10:34 Inactive
@tomlovesgithub tomlovesgithub temporarily deployed to develop July 21, 2021 14:08 Inactive
@tomlovesgithub tomlovesgithub temporarily deployed to develop July 21, 2021 15:00 Inactive
@HalcyonJAC HalcyonJAC requested a review from warrensearle July 21, 2021 15:11
Copy link
Member

@warrensearle warrensearle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good just there appears to be a lot of boilerplate styling for the Modal. Please check if it's all needed... if it is then we should create a new ticket to refine the Modal component so it's more streamlined/easier to use.

@tomlovesgithub tomlovesgithub temporarily deployed to develop July 22, 2021 10:39 Inactive
@warrensearle warrensearle requested a review from joy-ade July 22, 2021 11:01
@warrensearle warrensearle assigned joy-ade and unassigned warrensearle Jul 22, 2021
Copy link

@joy-ade joy-ade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out to UTG 22/7/2021

Copy link

@joy-ade joy-ade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by product team and UTG

@joy-ade joy-ade merged commit be3ef48 into main Jul 23, 2021
@joy-ade joy-ade deleted the 1226-qt-reset branch July 23, 2021 11:17
tomlovesgithub added a commit that referenced this pull request Jul 28, 2021
* update application to use new editablefields (#1329)

* update application to use new editablefields

* use new editablefield component

Co-authored-by: HalcyonJAC <79906532+HalcyonJAC@users.noreply.github.com>

* 1351 character issues (#1352)

* Bug Fix - when editing an independent assessor for an application the form fields are not validated at all

* Bug Fix - when editing a leadership judge for an application the form fields are not validated at all

* Independant Assessments - show invalid email addresses if applicable

* Report - Character Issues - Can now optionally filter by stage and status

* Report - Character Issues - fixed bug where character info not being present would prevent table data from rendering

* Report - Character Issues - removed table search feature as didn't work and is not compatible with status dropdowns anyway

* Character Issues - issue summary and details now populated by back-end

* use reload() function of Table component

* character issues - filter dropdowns are now side-by-side

* Revert "Independant Assessments - show invalid email addresses if applicable"

This reverts commit 9ba62be.

* undo changes accidentally checked into this branch

* Fix paging on character issues report

* character issues report - removed custom CSS

Co-authored-by: Warren Searle <warren@precise-minds.co.uk>

* #465 Validate independent assessor details (#1340)

* Bug Fix - when editing an independent assessor for an application the form fields are not validated at all

* Bug Fix - when editing a leadership judge for an application the form fields are not validated at all

* Independant Assessments - show invalid email addresses if applicable

* use save(isValid) instead of this.validate()

* Fix form validation change - introduced bug.

* eligibility issues - renamed filename (#1358)

* Events (display logged events) (#1246)

* WIP

* WIP

* Events - hide all details blocks initially

* Events - Only allow super admins to view the Events page

* Make Halycon a super admin

Co-authored-by: warrensearle <warren.searle@judicialappointments.digital>

* Enable GitHub Code Scanning (#1339)

* Create codeql-analysis.yml

* Changed branch from develop to main

* [Snyk] Upgrade @ministryofjustice/frontend from 0.0.17-alpha to 0.2.2 (#1334)

* fix: upgrade @ministryofjustice/frontend from 0.0.17-alpha to 0.2.2

Snyk has created this PR to upgrade @ministryofjustice/frontend from 0.0.17-alpha to 0.2.2.

See this package in npm:
https://www.npmjs.com/package/@ministryofjustice/frontend

See this project in Snyk:
https://app.snyk.io/org/halcyonjac/project/4dc883ab-c3f8-415b-9633-ac68cd41b384?utm_source=github&utm_medium=upgrade-pr

* bug fix - tableQuery

Co-authored-by: HalcyonJAC <79906532+HalcyonJAC@users.noreply.github.com>
Co-authored-by: HalyconJAC <halcyon@judicialappointments.digital>

* [Snyk] Upgrade @vue/compiler-sfc from 3.0.7 to 3.0.11 (#1335)

* fix: upgrade @vue/compiler-sfc from 3.0.7 to 3.0.11

Snyk has created this PR to upgrade @vue/compiler-sfc from 3.0.7 to 3.0.11.

See this package in npm:
https://www.npmjs.com/package/@vue/compiler-sfc

See this project in Snyk:
https://app.snyk.io/org/halcyonjac/project/4dc883ab-c3f8-415b-9633-ac68cd41b384?utm_source=github&utm_medium=upgrade-pr

* bug fix - tableQuery

Co-authored-by: HalcyonJAC <79906532+HalcyonJAC@users.noreply.github.com>
Co-authored-by: HalyconJAC <halcyon@judicialappointments.digital>

* only authorised user can edit

* Hotfix/0.65.1 (#1377)

* Update auth.js

* Added microsoft login

* remove check for emailverified

* Hide the google log in button until you press Escape

* remove .digital wording

* lint

Co-authored-by: Adam Lewis <halcyon@judicialappointments.digital>

* Hotfix/0.65.1 (#1382)

* Update auth.js

* Added microsoft login

* remove check for emailverified

* Hide the google log in button until you press Escape

* remove .digital wording

* lint

* bump version number

* allow justice.gov.uk

* allow select justice.gov access

Co-authored-by: Adam Lewis <halcyon@judicialappointments.digital>

* #1054 Added a new component to enable change of candidates login address (#1370)

* #1054 Added a new component to enable change of candidates login address

* #1054 Adjusted margin

* #1054 Removed unnecessary component

* #1054 Adjusted margin size

* #1054 Fixed minor issues with email display

* #1054 Status message minor change

* #1271 rich text input for ASC (#1292)

* RTF on ASC

* v-html to show RTF on ASC

* v-html for ASC on review pages

* v-html for ASC on review pages

* address PR comments

* resolve merge conflict

* point asc titles to vacancy not application

Co-authored-by: warrensearle <warren.searle@judicialappointments.digital>

* #1324 Made changes to display correct number of days in Full Information view (#1373)

* Bump version number to 0.67.0

* #1347 Enable application process to be configured (#1362)

* Update readme.md

* Move edit forms and improve navigation

* Navigation changes

* Update navigation

* Fix create exercise journey

* Only show relevant application parts

- Include local filters

* Store applicationContent in map instead of array

* Update PR workflow

* Update package-lock.json

* Temporarily turn off tests

* Ensure application content stays up to date

* Update save application content

* Fix some bugs

* Make use of exercise store getter methods

* #1346 Change exercise state

* Only approved exercises should allow state changes

* #1347 Enable application content to be assigned to exercise state

* Refine function names

* Fix backwards compatibility

* Refactor to use new exerciseHelper module

* Fix exercise helper

* Capture current step/stage and dates

* Tidy exercise helper

* Fix. Timeline. SJ end time not being retained

* Update package version

* Update readme

* Fix missing dependency

* Undo change to package-lock

* Patch fix tests (#1392)

* Display extra pupilage details (#1291)

* display pupilage details

* only show pupilage notes when necessary

* remove unnecessary check

* correct pupilage on review page

* correct pupilage reveiw

* correct pupilage reveiw

* show no further details if date provided

Co-authored-by: Warren Searle <warren@precise-minds.co.uk>

* Hot fix for recommended to handover (#1405)

* Bump version number to 0.68.0

* #1399 - repair candidate list on panel packs - sift and selection (#1406)

* qt statusLog reset field and modal

* fix isSift and isSelection

* remove unneeded changes

* remove unneeded changes

* #1445 Statement of eligibility fix (#1446)

* Bump version number to 0.69.0

* #1077 Display responses provided in a previous test  (#1379)

* 1077 allow the responses to show even when the test haven't started or completed

* Update package lock with version on develop

* [1077] Display responses provided in a previous test
- Deal with edge cases scenario

* Reset package-lock so same as main branch

Co-authored-by: Warren Searle <warren@precise-minds.co.uk>

* Added modals for setting cut off score and updating status of selected applications within the QT report (#1383)

Co-authored-by: Adam Lewis <adam@anlewis.co>

* Changed IA hard limit time (#1439)

* update jac-kit

* #730 QT response reset and confirmation modal (#1227)

* qt statusLog reset field and modal

* modal styling

* Bump version number to 0.70.0

* wip

* merged-needs test

* remove commented code

* fix tests

Co-authored-by: HalcyonJAC <79906532+HalcyonJAC@users.noreply.github.com>
Co-authored-by: Warren Searle <warren@precise-minds.co.uk>
Co-authored-by: warrensearle <warren.searle@judicialappointments.digital>
Co-authored-by: Snyk bot <github+bot@snyk.io>
Co-authored-by: HalyconJAC <halcyon@judicialappointments.digital>
Co-authored-by: Maria Brookes <40855898+mbrookeswebdev@users.noreply.github.com>
Co-authored-by: Lisias (Lee) Loback <lloback@users.noreply.github.com>
Co-authored-by: Adam Lewis <adam@anlewis.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants