Commit Graph

2056 Commits

Author SHA1 Message Date
Chris Hill-Scott
ca3fdfd907 Check for team members on request to go live page
One of the things that we want to check before a service goes live is
that they have at least two team members with the manage service
permission. Anyone who can make a request to go live has this
permission, so that means one additional user is needed. This is what we
can automatically communicate to the user.

Under the hood this makes use of the logic added in
https://github.com/alphagov/notifications-admin/pull/1891
2018-02-27 15:17:31 +00:00
chrisw
22bbc0d6d8 invite-team-members 2018-02-23 11:43:13 +00:00
kentsanggds
b7b25c7d16 Merge pull request #1894 from alphagov/ken-add-precompiled-letter-button
Add button to toggle precompiled letters on/off
2018-02-22 11:40:43 +00:00
Ken Tsang
df41fcfdd0 Add button to toggle precompiled letters on/off 2018-02-21 17:41:19 +00:00
Chris Hill-Scott
7dc278c959 Split into two pages
A lot of users aren’t reading or paying attention to the checklist on
the request to go live page. We think that we can get more people to
read it by putting it on its own page, where users won’t jump straight
to filling in the form.

This will, later on, let us make this page smarter by automatically
detecting if they’ve done the necessary things.
2018-02-20 12:28:32 +00:00
Chris Hill-Scott
4e2b4b5ac7 Rename endpoint
Every endpoint in this file is to do with a service. Putting service in
the name is redundant.
2018-02-20 12:27:53 +00:00
chrisw
14b80622b7 link-service-to-organisations-tweaks 2018-02-20 11:30:46 +00:00
chrisw
dd2231056d organisation dashboard page 2018-02-19 16:56:16 +00:00
Ken Tsang
c1e3658a8f Add load org before request to allow current_org to be accessible from request context 2018-02-19 16:56:16 +00:00
chrisw
96b66829a1 organisation-dashboard 2018-02-19 16:56:16 +00:00
Rebecca Law
6bd99e0599 Added a validation for a minimum of 3 character.
If the SMS sender is less than 3 characters one of our providers will return an error.
2018-02-15 16:06:44 +00:00
Rebecca Law
3f52454691 Remove allow/stop send pdf letters button.
Now that we only use the pdf letter flow, we can remove the button for the platform admin users.
2018-02-14 17:09:13 +00:00
Chris Hill-Scott
56969c2379 Merge pull request #1865 from alphagov/no-slash-dashboard
Remove dashboard from dashboard URL
2018-02-14 16:30:17 +00:00
Leo Hemsted
31a4cc15c9 validate email addresses in one-off flow
previously we were just using the wtforms builtin email validator,
which is much more relaxed than our own one. It'd catch bad emails when
POSTing to the API, resulting in an ugly error message. It's easy work
to make sure we validate email addresses as soon as they're entered.
2018-02-14 14:35:16 +00:00
Chris Waszczuk
34f1b40dbc Merge pull request #1858 from gov-cjwaszczuk/link-service-to-organisation
Link services to organisations (Admin)
2018-02-14 12:30:15 +00:00
Chris Hill-Scott
95482363aa Remove dashboard from dashboard URL
It’s weird that `/services/<service_id>` returns `404`. The home page
for every service is the dashboard – should be possible to get there
from any other page just by stemming the URL.

Also makes it consistent with organisations, which will have
`/organisations/<org_id>`.
2018-02-14 10:39:44 +00:00
Katie Smith
84d810b981 Pass service_id through to API '/service/unique' endpoint
Notifications-api now needs the service_id to check the uniqueness of
the service name when trying to change it. This is to allow a user to
successfully change the pluralization or the case of their service name.
2018-02-13 15:57:19 +00:00
chrisw
1450138b9c link-services-to-organisations 2018-02-13 12:49:57 +00:00
Ken Tsang
11a7fc49b7 Renamed create to add for organisations 2018-02-12 12:27:06 +00:00
Ken Tsang
a200f1a17e Go to organisation stub page which will eventually show list of services 2018-02-12 12:27:06 +00:00
Ken Tsang
f0e8661e34 Add organisations pages to show orgs and create/edit them 2018-02-12 12:27:06 +00:00
chrisw
5d26d4457f manage api keys permission should be able to see senders 2018-02-08 11:25:49 +00:00
chrisw
9ad4435d94 Change organisations to email branding 2018-02-07 17:41:23 +00:00
Chris Hill-Scott
edac271dbf Update request to go live form too
We have an MOU and a contract now, not just an MOU.
2018-02-05 11:14:20 +00:00
Rebecca Law
5dedeaa89c Remove reversed in favour of reverse=True 2018-02-01 13:43:16 +00:00
Rebecca Law
07e5e67bd0 The performance of the inbox page had degraded to the point of failing to load.
We pin pointed the problem to a bad loop that was calling the format_phone_number_human_readable 216 for 25 rows, yikes.

This PR fixes that performance problem.
2018-02-01 13:26:28 +00:00
Chris Hill-Scott
934a271322 Allow full stops in SMS senders
We have a team who want their (short) web address as the text message
sender. This commit updates the validation of text message senders to
allow `.` as a valid character, which is currently blocking them from
doing this.

We can be fairly confident this works because:

- the team are sending large volumes of messages already with their
  existing provider
- we’ve tested it with all combinations of
  - both our text message providers
  - an Android phone and n iPhone
2018-01-31 11:11:44 +00:00
Chris Hill-Scott
b11653fe08 Refactor to use validator class
Using a separate validator class to check for appropriate characters in
a text message sender means that we’re not doing this validation in a
different way from the other checks (length and required). So the code
is cleaner.
2018-01-31 11:11:32 +00:00
Chris Hill-Scott
eaaca9dd96 Add search bar to team member list
Another thing we did for templates, when they started to get
unmanageable, was add a find-as-you type search. We’ve observed real
users interacting with this to great effect, so I think it makes sense
for users too.

Like for templates, it only shows up when there are more than 7, so that
it’s not clutter for teams who don’t have a lot of members.
2018-01-27 09:42:28 +00:00
Chris Hill-Scott
959490ea85 Sort users by email address
Some teams have a lot of users now (I think the record is 172). So we
should make it easier for teams to manage large numbers of users.

This is the same change we made for templates (from most recent to
alphabetical) when the number of templates was getting unmanageable.

Sorted on email address because invited users don’t have a name (and
not sorted on both, because a lot of departments have a
`lastname.firstname` scheme for email addresses, but people generally
enter their names as `Firstname Lastname`).
2018-01-27 09:38:49 +00:00
Chris Hill-Scott
79ddf657bf Combine invited and active team members
Right now these are two separate lists. Which makes it harder to add
improvements that will make large numbers of users easier to manage.
2018-01-27 09:35:13 +00:00
Chris Hill-Scott
86e21f2b4b Remove platform admin letter/international buttons
Users can choose whether to have these features on or off now. And
a platform admin can still use the same controls to switch the features
on or off on behalf of a user. There’s no need for the separate buttons.
2018-01-24 11:49:39 +00:00
Chris Hill-Scott
555392b5da Allows services to choose if they can send letters
Our support ticket analysis shows that the most common action request
after going live is turning on letters.

We just do this for any team that requests it – there’s no gatekeeping.
So we should just allow people to make the change themselves.

This will be a better experience for our users, and less work for us.
The design of the page replicates roughly what we have for international
text messaging.
2018-01-24 11:49:39 +00:00
Leo Hemsted
e6400c43c4 Merge branch 'master' into bank-hols 2018-01-18 15:47:21 +00:00
Alexey Bezhan
a23efc9a93 Replace Deskpro ad-hoc requests with a client from utils
Moves the duplicated calls to Deskpro to notification_utils and
rewrites feedback and service go-live requests to use the shared
client.
2018-01-17 14:31:27 +00:00
Rebecca Law
9cf392ed7f Merge branch 'master' into enable-download-link 2018-01-17 11:08:39 +00:00
Leo Hemsted
2edb1eb704 remove free sms fragment limit from go live flow 2018-01-16 17:40:31 +00:00
Leo Hemsted
f297beb9bc add 2018 and 2019 bank holidays
also refactor to use iso timestamps
2018-01-16 12:46:46 +00:00
Chris Hill-Scott
3b564b4f29 Add option for one off in request to go live
When we first made this form you couldn’t send one off messages with
Notify. It’s interesting to us because it might help identity teams who
would benefit from email auth, or other features that we build in the
future for caseworkers.
2018-01-16 11:41:47 +00:00
Chris Hill-Scott
48106f22a3 Include organisation type in request to go live
This is so we can catch organisations that are going live with the wrong
free text message allowance.
2018-01-16 11:41:47 +00:00
Chris Hill-Scott
f2418c171c Move roles to models file
Any time we can keep code out of the view files is good. This user stuff
seems like a sensible place to put it, since we’re going to use it
there.
2018-01-16 11:23:48 +00:00
Chris Hill-Scott
d9a63c07a9 Refactor user permissions to use args, not list
This makes the interface a bit cleaner and less verbose.
2018-01-16 11:22:57 +00:00
Chris Hill-Scott
072f8e0f87 Make row in URL match displayed row
Spreadsheets start at row 1 (the header row), and the values don’t start
until row 2. The row numbers in our URLs start at 0, which is a concept
that only makes sense to programmers.

It’s more predictable and consistent to make the number in the URL match
the row number displayed on the page when previewing the spreadsheet.
2018-01-15 14:45:38 +00:00
Chris Hill-Scott
ba0a010d64 Link each row in the spreadsheet
We’ve heard from some users, especially those sending letters, that
they’d like to check that a spreadsheet they’ve uploaded has populated
the template correctly.

My reckon is that seeing just one row of the spreadsheet populate the
template isn’t enough to give people confidence that everything’s
working properly.

This commit adds links to all but the currently-previewed row. Clicking
that link will populate the preview with values from that row. These
pages already exist; they were created in this PR:
https://github.com/alphagov/notifications-admin/pull/1696
2018-01-15 14:45:37 +00:00
Rebecca Law
8a026dfdeb The downloading of the CSV is working for as many as 190, 000 notifications.
This PR re-enables the download link and filters the notifications by templates type.
2018-01-15 12:29:03 +00:00
Rebecca Law
08e5f68461 A little refactoring 2018-01-12 12:06:07 +00:00
Rebecca Law
6070e2e197 Merge branch 'master' into download_link-activity-page 2018-01-10 16:06:40 +00:00
chrisw
7271d4fbde Allow letter templates to select the default contact block from the list 2018-01-10 11:20:40 +00:00
Chris Hill-Scott
22de67fa19 Show all pages of a sent letter
Because we weren’t specifying how many pages the letter has, it was
defaulting to only showing the first page. This looked broken.
2018-01-05 12:19:55 +00:00
Rebecca Law
1fccb3da5e Merge branch 'master' into download_link-activity-page 2018-01-03 12:48:02 +00:00