Commit Graph

3045 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
7a780d115e Test that addresses display on uploads page
We didn’t have a test that checked for the first two lines of the
address being displayed when rendering one-off letters on the uploads
page.

I double checked in the database and we store addresses in the `to`
field with newlines, not commas.
2020-03-03 10:50:07 +00:00
Chris Hill-Scott
58176d5fa0 State when organisation has no live services
The page looks broken otherwise.
2020-03-03 10:34:20 +00:00
Chris Hill-Scott
39c3d14350 Fix incorrect numbers for free text message count
We were looking at the wrong field in the JSON.
2020-02-28 16:38:35 +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
3c140ecdbf Add some subheadings
This helps differentiate the totals from the rest of the page, and it
harmonises it with the per-service usage page.
2020-02-28 15:41:59 +00:00
Chris Hill-Scott
fa6a59915c Make each service name a <h2> 2020-02-28 13:43:17 +00:00
Chris Hill-Scott
519176f903 Use new grid classes from GOV.UK frontend 2020-02-28 13:40:07 +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
4d89d36847 Use big numbers for organisation usage
This is the pattern we use to display counts of things on the dashboard
and usage pages. It does some nice stuff like dealing with
comma-separating and formatting monetary amounts.

This commit also adds some logic to show the free allowance used if the
service hasn’t spent anything on text messages yet.
2020-02-28 12:16:33 +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
e638b68af1 Add some more content to the empty page state
We think that we need to make it clear what the difference between
uploading a letter and uploading a spreadsheet is, and where you go to
do each.

We get some confusion about uploading being behind the ‘Send’ button on
the template page. There’s some concern that launching the upload page
will increase this confusion, unless we head it off with some messaging.
2020-02-27 17:36:31 +00:00
Chris Hill-Scott
ee8436ca85 Differentiate between different kinds of uploads
Knowing what kind of upload a thing is is useful.

And the information that is useful to show about each upload depends on
what kind of upload it is.
2020-02-27 17:34:51 +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
Chris Hill-Scott
f9310dd2ed Use template_type property directly from API
It’s included in the job/upload response now[1]. So we don’t need to
fetch the template every time we want to access it.

1. https://github.com/alphagov/notifications-api/pull/2728
2020-02-27 16:46:51 +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
Rebecca Law
4b11d776ee Add usage stats to organisation page. 2020-02-26 13:24:18 +00:00
Tom Byers
07e7d98407 Merge pull request #3331 from alphagov/convert-all-links-to-govuk-frontend-2nd-attempt
Convert all links to govuk frontend 2nd attempt
2020-02-25 15:50:54 +00:00
Chris Hill-Scott
519b340c1a Merge pull request #3328 from alphagov/hide-jobs-from-dashboard
Hide jobs on dashboard for users with uploads page
2020-02-25 11:33:00 +00:00
Tom Byers
7808c55869 Change how link is referenced in user profile test
Co-Authored-By: Katie Smith <klssmith@users.noreply.github.com>
2020-02-25 10:52:03 +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
Tom Byers
efa892423a Fix issues raised on pull request
Includes:
- make 'remove team member' link, on edit member
  permissions page, destructive
- convert missed links on /features pages
- convert missed links on /using-notify/guidance and sub pages
- give links in browse-lists back their size and
  weight (needed for lists of live and trial
  services on Platform Admin)
- give links on Platform Admin inbound numbers
  page back their size and weight
- update links in JS tests
2020-02-25 10:52:03 +00:00
Tom Byers
16c1c34588 Fix tests broken by changes to HTML 2020-02-25 10:52:03 +00:00
Chris Hill-Scott
8914755b1e Hide jobs on dashboard for users with uploads page
They can see them there instead. We can tidy this up later once we’ve
migrated everyone onto having the permission.
2020-02-24 18:06:22 +00:00
Chris Hill-Scott
f2f531a7e6 Summarise scheduled jobs on the dashboard
Scheduled jobs push everything else on the dashboard down, which makes
them very prominent. This is exacerbated by people scheduling more jobs
simultaneously than we expected when we originally designed the feature.

We also want to remove all jobs from the dashboard, in favour of putting
them on the uploads page.

So this commit replaces them with one of our new dashboard banners (used
for received text messages in returned letters) which summarises:
- how many scheduled jobs you have
- when the first one is going out (i.e. how long you have to stop it, if
  you need to)
2020-02-24 17:20:12 +00:00
Chris Hill-Scott
8345bbe0b3 Use pre-defined mock from conftest
Rather than manually writing it.
2020-02-24 16:38:10 +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
6c4013d207 Change 'forgot' to 'forgotten' 2020-02-24 12:00:26 +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
Chris Hill-Scott
0c8c4b80c9 Merge pull request #3319 from alphagov/fix-guidance-service-links
Fix links to current service pages from guidance
2020-02-21 14:25:12 +00:00
Tom Byers
fa03b786dc Change how link is referenced in user profile test
Co-Authored-By: Katie Smith <klssmith@users.noreply.github.com>
2020-02-21 14:05:34 +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
Chris Hill-Scott
60ea2eaa40 Merge pull request #3297 from alphagov/returned-letters-on-dashboard
Put a count of recently returned letters on the dashboard
2020-02-21 12:37:35 +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
75927a8d05 Fix links to current service pages from guidance
This wasn’t working because:
- macros don’t have access to `current_service` from within their scope
- there were no tests for this behaviour
2020-02-20 15:13:12 +00:00
Chris Hill-Scott
e49d665c44 Merge pull request #3304 from alphagov/day-of-week-on-letter-delivery
Put day of week on estimated letter delivery page
2020-02-20 14:00:43 +00:00
Chris Hill-Scott
0e8143da04 Remove ‘originally’ from returned letters report
We should remove Originally on the individual report pages.
It sounds like we're saying the letter has been sent more than once
since that date.

The dictionary definition for 'originally' as an adverb says:
> used to describe the situation that existed at the beginning of a
> particular period or activity, especially before something was changed

Examples given include:
> The book was originally published in 1935.
2020-02-20 11:58:58 +00:00
Chris Hill-Scott
64074eed03 Say ‘1 hour/month ago’ not ‘an hour/a month ago’
I think it read better without the indefinite article when it’s, for
example, placed alongside messages that read ‘2 hours ago’.
2020-02-20 11:58:57 +00:00
Chris Hill-Scott
9590643527 Use humanize for fuzzy time differences
It seems to do a bit better than ago (e.g. 4 months vs 146 days), and
looks like it’s maintained more often.
2020-02-20 11:58:57 +00:00
Chris Hill-Scott
f369f76ae4 Count recently-returned letters on the dashboard
Currently you have no way of getting to the returned letter page. This
commit adds a link to it from the dashboard, following the pattern of
the new received text messages banner.
2020-02-20 11:58:57 +00:00
Tom Byers
8a98c73b08 Make analytics send the same title for all pages
Sets it on the tracker which means this value gets
sent for each:
- pageview
- event

See: https://developers.google.com/analytics/devguides/collection/analyticsjs/pages

We can only test that this has been set on the
tracker, not how that effects what is sent to GA,
in the JS tests.

This change has been tested in-browser with the
Chrome Analytics Debugger. This revealed the
contents of what is in the beacon sent to GA and
allowed confirmation the title was being set
correctly.

See: https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna/related
2020-02-20 11:46:19 +00:00
Tom Byers
5459dd8c13 Fix issues raised on pull request
Includes:
- make 'remove team member' link, on edit member
  permissions page, destructive
- convert missed links on /features pages
- convert missed links on /using-notify/guidance and sub pages
- give links in browse-lists back their size and
  weight (needed for lists of live and trial
  services on Platform Admin)
- give links on Platform Admin inbound numbers
  page back their size and weight
- update links in JS tests
2020-02-20 09:19:06 +00:00