From 09675374cc44555355a5d2852d037dd2b5810691 Mon Sep 17 00:00:00 2001 From: davidtrussler Date: Thu, 30 May 2024 12:26:31 +0100 Subject: [PATCH] Add specific styles for status --- app/assets/stylesheets/components/table.scss | 44 ++++++++++++++++++++ app/views/components/_table.html.erb | 2 +- app/views/components/docs/table.yml | 13 +++++- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/components/table.scss b/app/assets/stylesheets/components/table.scss index c5e2c569c..b0067de91 100644 --- a/app/assets/stylesheets/components/table.scss +++ b/app/assets/stylesheets/components/table.scss @@ -42,6 +42,50 @@ } .govuk-table__row { + .govuk-table__cell { + .status { + display: inline-block; + padding: govuk-spacing(1) govuk-spacing(2); + + &--amends-needed { + background-color: #f4cdc6; + } + + &--archived { + background-color: #e5e6e7; + } + + &--draft { + background-color: #fef7bf; + } + + &--out-for-fact-check { + background-color: #efdfed; + } + + &--fact-check-received { + background-color: #fcd6c3; + } + + &--ready, + &--scheduled-for-publishing { + background-color: #d4ecea; + } + + &--published { + background-color: #cce2d8; + } + + &--awaiting-2i { + background-color: #bbd4ea; + } + + &--in-2i { + background-color: #e5e6e7; + } + } + } + &:nth-of-type(2) { background: govuk-colour("light-grey"); diff --git a/app/views/components/_table.html.erb b/app/views/components/_table.html.erb index 2494df2cf..bf1141412 100644 --- a/app/views/components/_table.html.erb +++ b/app/views/components/_table.html.erb @@ -55,7 +55,7 @@ <%= t.row do %> <%= t.cell sanitize("

#{row[:title]}Last updated: #{row[:updated]}

") %> <%= t.cell row[:assigned] %> - <%= t.cell row[:status] %> + <%= t.cell sanitize("#{row[:status]}") %> <%= t.cell "" %> <% end %> <%= t.row do %> diff --git a/app/views/components/docs/table.yml b/app/views/components/docs/table.yml index dd7aeb257..8ae0f7d5c 100644 --- a/app/views/components/docs/table.yml +++ b/app/views/components/docs/table.yml @@ -25,7 +25,18 @@ examples: href: https://draft-origin.integration.publishing.service.gov.uk/software-company-changes updated: 21 May 2024 assigned: Jane Regan - status: In review + status: Awaiting 2i + edition: 1 + format: Answer + note: Please leave for Hannah M, Gav and Sarah. Once 2i’d, send for FC to bdavies@companieshouse.gov.uk, jmoyle@companieshouse.gov.uk, asoullier@companieshouse.gov.uk + awaiting_review: 3 days + reviewer: Sarah Nicholson + - + title: Find software for filing company changes and registrations + href: https://draft-origin.integration.publishing.service.gov.uk/software-company-changes + updated: 21 May 2024 + assigned: Jane Regan + status: In 2i edition: 1 format: Answer note: Please leave for Hannah M, Gav and Sarah. Once 2i’d, send for FC to bdavies@companieshouse.gov.uk, jmoyle@companieshouse.gov.uk, asoullier@companieshouse.gov.uk