Commit Graph

2541 Commits

Author SHA1 Message Date
Chris Hill-Scott
22d1b353d5 Merge pull request #3341 from alphagov/hide-postage-validation-failed
Don’t show the postage when validation has failed
2020-03-03 14:37:14 +00:00
Chris Hill-Scott
e155794cbc Merge pull request #3333 from alphagov/uploads-page-ready
Redesign the uploads page to accommodate different kinds of uploads
2020-03-03 13:44:38 +00:00
Chris Hill-Scott
b236df523c Don’t show the postage when validation has failed
The postage covers up some of the letter, so it can hide the problem. It
also implies that the letter has been put in an envelope, which will
never happen if it fails validation.

This matches what we do for uploaded letters.
2020-03-03 12:57:43 +00:00
Chris Hill-Scott
d2d5510376 Add a search as you type form
As in other places where we have a long list of things where you might
want to jump to a specific thing. We use this pattern where there are
more than 7 things, per the magical number 7[1]

1. https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two
2020-02-28 16:24:42 +00:00
Chris Hill-Scott
408fcf05eb Add financial year filter
Otherwise this page will become less useful come April 1st…
2020-02-28 12:46:50 +00:00
Chris Hill-Scott
bd9e127e57 Sum up usage for an whole organisation
We invoice on a per organisation basis, so it’s useful to know the per
organisation figures without needing to do any spreadsheet-fu.
2020-02-28 12:17:49 +00:00
Chris Hill-Scott
63f704c64f Fix accidental switch of previous and next
We were showing the previous page link when we meant to show the next
page link because the variables were swapped round in the code.
2020-02-27 17:51:01 +00:00
Chris Hill-Scott
eed5e0fdd7 Combine scheduled and already-sent jobs
I’m hoping that if I can design something that clearly differentiates
them then we won’t need to do so by putting them in separate tables,
which then need labelling, which would clutter up the page.
2020-02-27 17:33:41 +00:00
Pea M. Tyczynska
b6e0b7f97d Merge pull request #3307 from alphagov/send-by-email-setting
Users now able to set the send by email setting by themselves
2020-02-27 16:15:16 +00:00
Pea Tyczynska
a601d6e700 Send files by email on for everyone and only depending on service
having contact details set up.

Display not set up yet for send files by email row when contact_link not set up
2020-02-27 13:36:27 +00:00
Pea Tyczynska
02b2a890e8 Get rid of on/off page send file by email setting 2020-02-27 13:35:08 +00:00
Pea Tyczynska
b2e6d14958 Enable users to turn send file by email setting on and off 2020-02-27 11:55:09 +00:00
Rebecca Law
4b11d776ee Add usage stats to organisation page. 2020-02-26 13:24:18 +00:00
Tom Byers
9f2e1498fc Update links missed in previous work
Includes those in:
- the static 5xx error page
- validation messaging
- guidance page about trial mode
- links used in tests

Issues raised in https://github.com/alphagov/notifications-admin/pull/3303#issuecomment-589572715
2020-02-25 10:52:03 +00:00
Chris Hill-Scott
3dab9c2915 Refactor to make it logic clearer
The logic around what gets shown on the uploads page was hard to follow.
This commit makes three changes to hopefully make it easier:
- remove the passing-around of a string containing the contents of a
  rendered partial
- encapsulate everything in one `show_scheduled_jobs` variable, rather
  than mixing between `scheduled_jobs` and
  `current_service.scheduled_jobs`
- adds a comment to explain why we still render `_jobs.html` even when
  we know we have no jobs
2020-02-24 16:38:09 +00:00
Chris Hill-Scott
c20ec82cd2 Show scheduled jobs on page one of the uploads page
This is the same thing we do for caseworking users who don’t have the
dashboard. Since we’re going to summarise scheduled jobs on the
dashboard instead of listing them they need to be listed here instead
(which is where we’ll link to from the dashboard).

Design of this will probably evolve as we work out how to style single
letter uploads and letter jobs, but that’s OK for now because no-one
has the uploads page at the moment.
2020-02-24 16:38:07 +00:00
karlchillmaid
e13dba3763 Merge pull request #3324 from alphagov/change-forgot-to-forgotten
Change forgot to forgotten
2020-02-24 12:45:17 +00:00
karlchillmaid
a51cc5d4b5 Change 'forgot' to 'forgotten' 2020-02-24 11:59:07 +00:00
Tom Byers
5b306dde4d Revert "Convert all links to govuk frontend" 2020-02-24 11:56:38 +00:00
Tom Byers
97172cca30 Merge branch 'master' into convert-all-links-to-govuk-frontend 2020-02-24 10:12:58 +00:00
Tom Byers
1513cfa9e6 Update links missed in previous work
Includes those in:
- the static 5xx error page
- validation messaging
- guidance page about trial mode
- links used in tests

Issues raised in https://github.com/alphagov/notifications-admin/pull/3303#issuecomment-589572715
2020-02-21 13:59:04 +00:00
Leo Hemsted
106228ed09 Merge pull request #3320 from alphagov/remove-generic-400-error-page
remove admin 400 error handler
2020-02-21 13:08:53 +00:00
Leo Hemsted
d83250c7c2 remove the generic 400 error page handler
it just shows a h1, so isn't helpful for people. We can re-use the 500
error page, which includes instructings "Try again later" and
instructions on what to do next (check the status page, email notify
support).

this required refactoring to ensure we can show the 500 error page while
still returning the required status code
2020-02-21 11:58:37 +00:00
Chris Hill-Scott
74e70ed8bc Refactor summaries into model
This lets us encapsulate some of the logic that’s currently cluttering
up the view/template layer.
2020-02-20 11:58:57 +00:00
Chris Hill-Scott
3bbd5381c6 Revert "Revert "Restyle template statistics and received text messages"" 2020-02-18 16:16:51 +00:00
Pea M. Tyczynska
a8ca8c1835 Merge pull request #3311 from alphagov/revert-3295-restyle-template-stats
Revert "Restyle template statistics and received text messages"
2020-02-18 15:04:59 +00:00
Pea M. Tyczynska
e97f9f7fa4 Merge pull request #3310 from alphagov/fix-reset-password
Fix reset password flow
2020-02-18 15:03:11 +00:00
Chris Hill-Scott
6bdd776780 Revert "Restyle template statistics and received text messages" 2020-02-18 14:58:33 +00:00
Pea Tyczynska
3a93fe6892 Fix reset password flow
It was broken because of mismatch in update password argument
2020-02-18 14:50:27 +00:00
Chris Hill-Scott
a86f0a6efc Merge pull request #3295 from alphagov/restyle-template-stats
Restyle template statistics and received text messages
2020-02-18 14:30:06 +00:00
Pea Tyczynska
7d460fe483 Move date-checking logic to utils and unit test it 2020-02-17 11:34:25 +00:00
Pea Tyczynska
caf77341b3 Send 2fa email and move user to waiting page when they need to re-validate email access 2020-02-17 11:34:24 +00:00
Chris Hill-Scott
42373e3615 Always use smaller font size for totals
This means the font size matches the counts on the usage section, and on
the new received text messages banner.
2020-02-17 10:31:59 +00:00
Katie Smith
a26e8c55ef Remove unused pages with buttons
We had two templates that contained a link styled as an old style
button but that weren't being used anywhere (one would actually give a
`500` if you tried to visit it). This removes them and the view function
for one of them (the other no longer had a view function).
2020-02-17 08:05:05 +00:00
Chris Hill-Scott
4f32258a7b Merge pull request #3293 from alphagov/cache-returned-letter-summary
Cache returned letter summary in Redis
2020-02-12 13:48:51 +00:00
karlchillmaid
38fd842d33 Merge pull request #3213 from alphagov/add-guidance-content
Add first iteration of guidance content, including updating navigation menus and footer.
2020-02-12 11:43:07 +00:00
Chris Hill-Scott
af8395956e Cache returned letter summary in Redis
We’re going to start using the returned letters summary to show some
info on the dashboard.

This means we will be accessing it more often than it changes. And we
know exactly when it changes because it’s us manually submitting the
references we get from DVLA.

This makes it a good candidate for being cached, and Redis is where we
cache stuff that we’d otherwise go to the API for.
2020-02-12 11:42:06 +00:00
Rebecca Law
b242467d77 Change the content for the delete template confirmation dialog.
As per https://www.pivotaltracker.com/story/show/170796514 we want to make the delete template confirmation dialog box more consistent and clear.
The API has been updated with a new endpoint that only returns the last-used date, this date is more accurate since it goes to the ft_notification_status table, if the notification table is empty.
2020-02-06 10:16:00 +00:00
Rebecca Law
143564c7f0 Update message seen when deleting a template. 2020-02-04 16:00:51 +00:00
karlchillmaid
5314ba72cc Remove 'Upload a letter'
Remove 'Upload a letter' from navigation because it's not available to all users yet.
2020-02-04 13:48:45 +00:00
Rebecca Law
8a19d9496a Check if user is authenticated before signing out, this will prevent a 500 if the user is an AnonymousUser.
I ended up creating a new test user and logged_in_client, which isn't really great. But I tried adding a current_session_id to the active user in the test, but that broke all other tests.
I tried setting current_session_id in all the users being tested but that didn't work either. I'd like to come back to fixing the tests and reducing the number of conftest methods in another PR. For now this fixes the bug.
2020-02-04 12:16:58 +00:00
karlchillmaid
b37560ebe8 Remove Send messages link 2020-02-03 16:06:32 +00:00
Rebecca Law
0e1ee504ac - Add unit test for when case when the cookie doesn't match the db.
- Move code into User.signout method to further encapsulate the code.
2020-02-03 15:08:55 +00:00
Rebecca Law
937c9f2adc Ensure that the session is logged out server side, not just client side.
Anytime a user clicks "sign out" we should be signing them out server side as well. This can be accomplished by setting the Users.current_session_id = null.
I found that the method User.logged_in_elsewhere doesn't need to check if the current_session_id is None. The current_session_ids in the cookie and db (redis or postgres) then the user should be forced to log in again.
2020-02-03 12:24:02 +00:00
Tom Byers
a4ba99b748 Redo send_messages as create_and_send_messages
Reverts changes in the following commits:
- 1e8ba88b4d
- 133a62022c
- b76066dd76

These changes `main.create_and_send_messages` to
`main.send_messages` but this name was already
taken.

Further details on Github:

https://github.com/alphagov/notifications-admin/pull/3213#pullrequestreview-348548476
2020-01-27 11:51:24 +00:00
karlchillmaid
b76066dd76 Update link 2020-01-27 08:54:05 +00:00
karlchillmaid
133a62022c Update link 2020-01-27 08:53:29 +00:00
karlchillmaid
6d9e19a013 Update navigation links 2020-01-27 08:47:47 +00:00
Chris Hill-Scott
d29f23bfc8 Add left hand navigation
Due to the way the navigation dictionaries are built this mean being
less smart about the view method for the guidance pages.
2020-01-24 16:25:32 +00:00
Chris Hill-Scott
da2bc29b40 Merge pull request #3263 from alphagov/fix-new-jobs-showing-as-deleted
Use time to determine why notifications don’t exist
2020-01-24 15:27:29 +00:00