-
Notifications
You must be signed in to change notification settings - Fork 0
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
Show "Worked, Pending" status #45
Conversation
Codecov Report
@@ Coverage Diff @@
## main #45 +/- ##
=======================================
Coverage 89.80% 89.80%
=======================================
Files 22 22
Lines 569 569
=======================================
Hits 511 511
Misses 31 31
Partials 27 27 Continue to review full report at Codecov.
|
dc8208b
to
dcd29b0
Compare
{{ define "status-tag" }} | ||
<strong class="govuk-tag govuk-tag--{{ statusColour .Status }}"> | ||
{{ if and (eq .Status "Pending") (.Worked) }} | ||
Worked, {{ .Status }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will only ever be "Worked, Pending" so better to be explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or you could have done this as
{{ if and (eq .Status "Pending") (.Worked) }}Worked, {{ end }{{ .Status }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took the simpler first option
* Add status-tag template * Use status-tag template * Set "Worked, Pending" text explicitly
* Add `User()` endpoint to sirius package To get user details by ID * Add userPendingCases handler To show a user's pending cases, based on their ID * Link to user's pending cases from team dashboard * Add userPendingCases cypress tests And rename existing file * Add jQuery and expose on `window` `MOJFrontend` requires this to initialise the Multi select component There's [an issue in moj-frontend](ministryofjustice/moj-frontend#134) to remove the jQuery dependency, but it's dependent on unit tests * Restrict userPendingCases to Managers Other users shouldn't be able to see each others' dashboards * Add all caseworker info pages Adds all cases and tasks pages, with inter-linking and tests * Remove unused CSS classes * Expect API user details to include a team * Add back links to team * Re-enable codecov-action They claim to have fixed the issue now * Add `User()` endpoint to sirius package To get user details by ID * Add userPendingCases handler To show a user's pending cases, based on their ID * Link to user's pending cases from team dashboard * Add userPendingCases cypress tests And rename existing file * Add jQuery and expose on `window` `MOJFrontend` requires this to initialise the Multi select component There's [an issue in moj-frontend](ministryofjustice/moj-frontend#134) to remove the jQuery dependency, but it's dependent on unit tests * Restrict userPendingCases to Managers Other users shouldn't be able to see each others' dashboards * Bump cypress from 7.4.0 to 7.5.0 (#35) Bumps [cypress](https://github.com/cypress-io/cypress) from 7.4.0 to 7.5.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](cypress-io/cypress@v7.4.0...v7.5.0) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * VEGA-867 Sort pending cases by workedDate (#44) * Use CanRequestCase on all caseworker pages (#43) Wherever the "Request next cases" button appears, only show it to users with the "Self Allocation User" role * Show "Worked, Pending" status (#45) * Add status-tag template * Use status-tag template * Set "Worked, Pending" text explicitly * Use status-tag template So that we see "Worked, Pending" everywhere Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joshua Hawxwell <m@hawx.me>
When a case is pending—but worked—then the status should be shown as "Worked, Pending" instead of Pending.
This is done through a new template called
status-tag
which, when passed a case, will show the status with the appropriate colour.Fixes VEGA-866