Commit Graph

5702 Commits

Author SHA1 Message Date
Chris Hill-Scott
0fa378e26e Merge pull request #2154 from alphagov/hide-download-caseworking
Hide download all link in basic view
2018-07-10 16:56:28 +01:00
Chris Hill-Scott
199c699e11 Hide download all link in basic view
Can’t think of a good reason why someone who is only sending messages
would need a download of all the messages their entire team has sent.

Most of the ‘caseworking’ teams have been getting on fine without this
link; it’s only recently we brought it back.
2018-07-10 15:59:24 +01:00
Chris Hill-Scott
ce9c5ca892 Merge pull request #2151 from alphagov/add-basic-preview
Add a preview of basic view
2018-07-10 14:38:02 +01:00
Chris Hill-Scott
95d138b638 Add a preview of basic view
One of the big things we found in user research was that people were
uncertain what the effect of giving someone basic view was.

So in the spirit of ‘show don’t tell’, this commit adds a way for users
to preview basic view. They can go into the preview and click around as
much as they like, just as if they really had the basic view assigned to
them.

Once they have seen enough they can return to the settings page where
they can decide whether or not to switch basic view on for real.
2018-07-10 14:24:02 +01:00
Katie Smith
db42bb9291 Merge pull request #2143 from alphagov/5-letter-pages
Update documentation to refer 5 sheets of letters
2018-07-10 13:27:54 +01:00
Chris Hill-Scott
5b60620197 Merge pull request #2150 from alphagov/basic-view-2
Rename ‘caseworker’ to ‘basic view’ on team members
2018-07-10 12:33:05 +01:00
Chris Hill-Scott
0008d7cda7 Rename ‘caseworker’ to basic view on team members
Missed this in https://github.com/alphagov/notifications-admin/pull/2146
2018-07-10 12:17:22 +01:00
Chris Hill-Scott
70ba1bb7f2 Merge pull request #2148 from alphagov/add-basic-setting
Add a service setting to switch basic view on and off
2018-07-10 12:04:02 +01:00
Chris Hill-Scott
2f40ddae20 Remove platform admin toggle for basic view
Since platform admins can use the new settings page, this commit:
- links to that page
- removes the platform-admin-only endpoint that switches basic view on
  and off
2018-07-10 11:45:50 +01:00
Chris Hill-Scott
4d3a4ef9af Add form to let users switch basic view on and off
This commit adds radio buttons to the ‘basic view’ page. This will let
users choose whether basic view is on or off for their service.

As before, this page will only be linked to if a service already has
basic view, so this commit does not launch the new feature.
2018-07-10 11:44:40 +01:00
Chris Hill-Scott
a6662b3f59 Add basic view to the settings page
This commit adds:
- a row to the settings page…
- …which links to a page explaining what basic view is

The new row (and link) will only appear for services who already have
the feature switched on. This is because we are not launching the
feature yet, so it shouldn’t be available to just anyone.
2018-07-10 11:44:40 +01:00
Chris Hill-Scott
a35ce8eb89 Add Jinja macro for a row on the settings page
Often we show/hide these rows based on what permissions a service has.
This commits refactors that check into a reusable macro, rather than
having to write the same `if` statements all the time.
2018-07-10 11:44:40 +01:00
Chris Hill-Scott
c30b86714e Merge pull request #2147 from alphagov/manage-not-modify
Relabel ‘modify service’ to ‘manage service’
2018-07-10 11:42:20 +01:00
Chris Hill-Scott
1d1dc02203 Merge pull request #2149 from alphagov/hants.gov.uk
Mark agreement signed by Hampshire County Council
2018-07-10 11:00:12 +01:00
Chris Hill-Scott
112098096b Merge pull request #2146 from alphagov/basic-view
Rename ‘caseworker’ to ‘basic view’
2018-07-10 10:59:53 +01:00
Chris Hill-Scott
8571cc9389 Mark agreement signed by Hampshire County Council 2018-07-10 10:38:35 +01:00
Chris Hill-Scott
08dc248abc Relabel ‘modify service’ to ‘manage service’
We are not consistent about this. We use ‘manage service’ on:
- the page listing all the users
- the request to go live checklist

We use modify service on:
- the page where you edit a team member’s permissions
- the page where you invite a new team member

This commit changes the latter to be consistent with the former.
2018-07-09 10:58:35 +01:00
Chris Hill-Scott
5794a54385 Rename ‘caseworker’ to ‘basic view’
‘Caseworker’ was a bad name because it:
- suggested that Notify might be expanding into case management
- may or may not map to someone’s actual role, in a confusing way (this
  is why ‘manager’ is also a bad name)

‘Basic view’ is the best name we could come up with because:
- it describes the purpose of feature, not the user
- a ‘view’ changes what you can _see_ as much as it changes what you can
  do

Admin remains a good word – in research users self-describe their use
of Notify in using it. This commit makes the name ‘admin view’ to match
‘basic view’.

This also means we can hide the legend for this fieldset because the
choices are self-explanatory.
2018-07-09 10:39:09 +01:00
Chris Hill-Scott
b1aac841f4 Merge pull request #2042 from alphagov/allow-remove-callback
Allow callbacks to be removed
2018-07-06 14:52:07 +01:00
Pete Herlihy
93cb98eadd Merge pull request #2145 from alphagov/276-292
Services up to 292 and Orgs up to 96
2018-07-06 13:53:54 +01:00
Leo Hemsted
f10794e8cf Merge pull request #2144 from alphagov/leohemsted-patch-2
Pin wtforms==2.1
2018-07-06 13:38:14 +01:00
Pete Herlihy
e9f77777ae Services up to 292 and Orgs up to 96 2018-07-06 13:37:27 +01:00
Leo Hemsted
4d4424657f allow you to remove URL without removing bearer token 2018-07-06 11:47:35 +01:00
Leo Hemsted
0566e89aee Pin wtforms==2.1
Tests fail with `wtforms==2.2.1`.  We're not sure of the reason but on
production this version is used and locally it's not, because we only
require flask-wtforms, which doesn't pin its requirements at all. We
should probably pin all requirements from jenkins onwards to prevent
this kind of thing happening again.
2018-07-05 17:44:23 +01:00
Chris Hill-Scott
cb434db663 Merge pull request #2114 from alphagov/caseworking-one-off
Let caseworkers send one off messages and see sent messages
2018-07-05 17:05:43 +01:00
Katie Smith
23a313b79c Update documentation to refer 5 sheets of letters
Letters can now be 4 or 5 sheets -
* Updated the pricing page with the new prices
* Updated the using Notify page with the new letter length
2018-07-05 15:48:42 +01:00
Chris Hill-Scott
b21c0da683 Make sure caseworking users clear their invite
There was a bug where caseworking users skipped the part of the invite
flow where their invite was cleared from the session. This caused
a 500 if they later tried to create another service.

This commit makes sure that both types of user have the invite cleared
from the session after accepting it.
2018-07-05 13:40:40 +01:00
Chris Hill-Scott
9da9e85293 Remove letters from caseworking view
Because one-off letters aren’t a thing yet there’s no way for
caseworkers to send letters. So showing them letter templates will just
confuse them.
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
0018ecd765 Hide ‘Use my email address/phone number link’
This link is useful for people who are setting up templates and want to
test out how they look/how Notify works.

‘Caseworker’ users shouldn’t need to send themselves messages on a
regular basis, so this link is another thing we can take away.
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
883f51b823 Fix page title on sent messages 2018-07-05 11:53:42 +01:00
Chris Hill-Scott
5b14ca45a5 Remove inbound from caseworking for now 2018-07-05 11:53:42 +01:00
Chris Hill-Scott
e3e9333840 Remove counts from sent
Counts of sending/failed/delivered are ‘management information’ or
‘reporting’. We don’t think that caseworkers need to see this
information.

The idea of the caseworking view is to remove stuff that caseworkers
don’t need to see.
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
b0cb9ff58e Add sent notifications page for caseworkers
The other task that caseworkers have to do (much less often than sending
messages) is look at the messages which they’ve sent. The reason for
doing this is usually to find a specific message which someone has
complained about.

This commit adds:
- a page where they can do that
- a navigation item so they can get to that page

We reckon that because this is about finding specific messages, not
reporting that it’s fine to mush all the channels (email, text, letter)
into one table.
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
f7b58c844c Don’t let caseworkers download CSV files
No-one can at the moment, but when we bring the links back we should
only bring them back for users who care about reporting and management
information, ie those with the `view_activity` permission.
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
57ad1a0f7c Don’t send caseworkers back to template page
Caseworkers skip the template page in their message sending journey.
Instead they go straight from picking a template to the first step of
sending. So the ‘Back’ link should send them straight back to the
picking a template page, skipping the individual template page (which
they don’t have permission to view).
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
7c849dccb7 Redirect caseworking users off dashboard
They don’t have permission to see it; their home page is the list of
templates.
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
84de1c5625 Let caseworkers send one off messages
The main task that we think ‘caseworker’ users do is send one off
messages.

So this commit:
- makes sure users who don’t have the `view_activity` permission (ie
  not ‘admin’ users) can still send messages
- adds navigation so that these users have a place to go from which to
  start the process of sending a one off message
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
2855cf45c7 Style of conditional radios to match design system
Updated thickness of border and spacing to match
https://design-system.service.gov.uk/components/radios/#conditionally-revealing-content
2018-07-05 11:47:31 +01:00
Chris Hill-Scott
6452676b54 Remove show/hide behaviour from permissions form
In research we found that:
- people didn’t initially realise that the permissions expanded when the
  ‘admin’ option was selected
- not having all the options visible at once makes it hard to know what
  permissions you are (and more importantly aren’t) giving to people

This commit makes it so that:
- the options within the ‘admin’ option are always visible
- a bit of Javascript logic makes it so you can pick ‘caseworker’ and
  ‘manage service’, for example (by deselecting one when you pick the
  other)
2018-07-05 11:47:31 +01:00
Chris Hill-Scott
f4d2958d58 Allow setting of caseworking on a user
This commit changes the form that the user sees when inviting or editing
another user, if the service has the ‘caseworking’ permission set.

This will allow creating a new type of user, one who only has the
`send_messages` permission, without the `view_activity` permission.

We are doing this because we think there are a number of services with a
lot of users who don’t need to see the dashboard, or the other team
members, and that we can make a simpler interface for these users.
2018-07-05 11:47:30 +01:00
Chris Hill-Scott
d952b5ca3c Refactor radios for reuse
This commit splits up the radio buttons macro into a couple of different
macros which can be used independently of each other.

This makes this code easier to reuse when implementing custom radio
controls.
2018-07-05 11:47:30 +01:00
Chris Hill-Scott
39bb0ecbf7 Make permission checking a method
Having a function that takes an instance as its only argument suggests
that it should instead be a method on that instance.
2018-07-05 11:47:30 +01:00
Chris Hill-Scott
1f0003903f Refactor form classes for future reuse
There are three parts to a ‘user’ form:
- the email address
- the permissions
- the auth type setting

This commit breaks them up into abstract classes so that they can be
composed more flexibly in future commits.
2018-07-05 11:47:29 +01:00
Chris Hill-Scott
a220ab7877 Encapsulate view_activity logic within the form
This means that:
- we don’t have to manually set it after processing the form
- we can set it dynamically based on some other attribute later on
2018-07-05 11:47:29 +01:00
Chris Hill-Scott
650f4cc3d8 Add platform admin button to enable caseworking
Eventually the ability to have the caseworking view for your service
will be self-service. But while we’re still building it only we should
be able to enable it, for our own testing purposes.

So this commit adds platform admin functionality to switch the feature
on and off for our services.
2018-07-05 11:47:29 +01:00
Chris Hill-Scott
7397e808a8 Make expected behaviour clear in else case
It feels a bit slippery having an `if`/`elif` with no else; I think that
adding this comment makes the code clearer.
2018-07-05 11:41:43 +01:00
Chris Hill-Scott
c2dbc1934f Allow callbacks to be removed
We’ve had a user who’s said:

> Seems configured callbacks cannot be removed once they’re set as the
> fields have a presence check. Is that intentional?

This means it’s not working as they expect. Rather than have to go and
change stuff in the database for them, let’s make it work as they’d
expect.

Only lets you clear the form if you remove both the token and the URL.
2018-07-05 11:41:43 +01:00
Chris Hill-Scott
97d40028de Merge pull request #2142 from alphagov/pyup-update-pytest-3.6.2-to-3.6.3
Update pytest to 3.6.3
2018-07-05 11:02:48 +01:00
Chris Hill-Scott
e9fbf14f10 Merge pull request #2138 from alphagov/bump-utils-accessible-letters
Bump utils to make letters screenreader-accessible
2018-07-05 11:01:55 +01:00
Chris Hill-Scott
239a43127d Merge pull request #2137 from alphagov/save-same-service-name
Don’t error if a user keeps same service name
2018-07-05 11:01:48 +01:00