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

Use CanRequestCase on all caseworker pages #43

Merged
merged 2 commits into from
Jun 15, 2021

Conversation

gregtyler
Copy link
Contributor

Wherever the "Request next cases" button appears, only show it to users with the "Self Allocation User" role

Fixes VEGA-855

@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2021

Codecov Report

Merging #43 (e9572c7) into main (3d778a7) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   89.77%   89.80%   +0.03%     
==========================================
  Files          22       22              
  Lines         567      569       +2     
==========================================
+ Hits          509      511       +2     
  Misses         31       31              
  Partials       27       27              
Impacted Files Coverage Δ
internal/server/all_cases.go 90.00% <100.00%> (+0.52%) ⬆️
internal/server/tasks.go 90.00% <100.00%> (+0.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d778a7...e9572c7. Read the comment docs.

@gregtyler gregtyler force-pushed the VEGA-855-case-worker-permissions branch from e9572c7 to 811c30a Compare June 14, 2021 15:32
@@ -5,7 +5,9 @@
{{ define "main" }}
<h1 class="govuk-heading-xl">Your cases</h1>

{{ template "request-next-case" . }}
{{ if .CanRequestCase }}
Copy link
Contributor

Choose a reason for hiding this comment

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

could just move the if to the template?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's much better 🙈 Done!

Wherever the "Request next cases" button appears, only show it to users with the "Self Allocation User" role
@gregtyler gregtyler force-pushed the VEGA-855-case-worker-permissions branch from 811c30a to fdde9fb Compare June 15, 2021 08:42
@gregtyler gregtyler merged commit 3c1204b into main Jun 15, 2021
@gregtyler gregtyler deleted the VEGA-855-case-worker-permissions branch June 15, 2021 09:18
gregtyler added a commit that referenced this pull request Jun 15, 2021
Wherever the "Request next cases" button appears, only show it to users with the "Self Allocation User" role
gregtyler added a commit that referenced this pull request Jun 15, 2021
* 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>
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.

3 participants