Commit Graph

3208 Commits

Author SHA1 Message Date
Katie Smith
b9b9a138f9 Replace grid-row with govuk-grid-row
Replaced all instances of `grid-row` in the HTML and JavaScript with
`govuk-grid-row`, which is the new GOV.UK Frontend class.
2020-03-06 11:11:41 +00:00
Chris Hill-Scott
be48f3bac5 Merge pull request #3354 from alphagov/recently-not-yet
Say ‘recently’ not ‘yet’ because jobs aren’t forever
2020-03-06 10:35:59 +00:00
Chris Hill-Scott
3ad00adfb3 Reverse chronologically sort scheduled jobs
Now that scheduled jobs are mixed in with regular jobs it looks weird
for the sort order to be different. This makes the sort order
consistently go from furthest in the future to furthest in the past.

The old sort order made sense when scheduled jobs were displayed
separately on the dashboard.
2020-03-06 10:15:51 +00:00
Chris Hill-Scott
cfe18dd52a Merge pull request #3351 from alphagov/pluralise-org-usage
Don’t pluralise counts of one on org usage page
2020-03-06 09:52:20 +00:00
Chris Hill-Scott
3c3355536e Say ‘recently’ not ‘yet’ because jobs aren’t forever
We’re going to change the jobs page so that it only shows jobs within
the last n days (your data retention)<sup>1</sup>.

This will match how long uploaded letters stick around for.

Therefore it’s not accurate to say ‘yet’, because that implies all-time.
Since the data retention for different channels could be different it’s
hard and maybe unhelpful to give an exact time period. ‘Recently’ is
content we used here before, but then changed.

1. https://www.pivotaltracker.com/story/show/171623239
2020-03-06 09:49:04 +00:00
Leo Hemsted
1558d05be7 ensure highlighting div size always matches the relevant textarea 2020-03-05 16:38:26 +00:00
Chris Hill-Scott
e8c3a49812 Don’t pluralise counts of one on org usage page
1 email sent.

1 free text message sent.
2020-03-05 14:40:32 +00:00
Pea M. Tyczynska
8ecccca6c2 Merge pull request #3348 from alphagov/no-embedded-images-in-SVG-logo-files
Do not allow to upload SVG logos with embedded raster images in them
2020-03-04 15:41:03 +00:00
Pea Tyczynska
44519fcf8e Do not allow to upload SVG logos with embedded raster images in them
Those are for example png or jpg images. They do not render properly.
2020-03-04 15:35:12 +00:00
Chris Hill-Scott
b64c5ae78a Merge pull request #3344 from alphagov/uploads-navigation
Fix navigation around uploads and jobs
2020-03-04 12:14:08 +00:00
Leo Hemsted
8ccf97b029 Merge pull request #3339 from alphagov/remove-png-letter-logos
don't convert letter logo svgs to pngs
2020-03-04 10:18:19 +00:00
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
3df3db1609 Fix navigation around uploads and jobs
The uploads and jobs page should start showing in the _Uploads_ menu on
the left hand side.

If you’ve navigated to a job from the uploads page (ie you haven’t got
to that page because you’ve just sent the job) then you should see a
link back to the uploads page.
2020-03-03 14:33:20 +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
Leo Hemsted
a3ccd9660b don't convert letter logo svgs to pngs
https://github.com/alphagov/notifications-template-preview/pull/371
stops using png logos when rendering png previews of templated letters.

when that is merged we no longer need to convert to pngs when we upload
a new letter logo.
2020-03-02 18:00:26 +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