From c9dada8d89bfe1af32f1d0cdf63b06fdeadcbf09 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Tue, 8 Nov 2022 18:12:10 +0000 Subject: [PATCH] feat: wip update scheme summary page --- app/helpers/tag_helper.rb | 2 ++ app/models/scheme.rb | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/app/helpers/tag_helper.rb b/app/helpers/tag_helper.rb index 1937394b0..08b6180b3 100644 --- a/app/helpers/tag_helper.rb +++ b/app/helpers/tag_helper.rb @@ -6,6 +6,7 @@ module TagHelper cannot_start_yet: "Cannot start yet", in_progress: "In progress", completed: "Completed", + active: "Active", }.freeze COLOUR = { @@ -13,6 +14,7 @@ module TagHelper cannot_start_yet: "grey", in_progress: "blue", completed: "green", + active: "green", }.freeze def status_tag(status, classes = []) diff --git a/app/models/scheme.rb b/app/models/scheme.rb index 83899f494..f25b22df1 100644 --- a/app/models/scheme.rb +++ b/app/models/scheme.rb @@ -168,6 +168,8 @@ class Scheme < ApplicationRecord { name: "Secondary client group", value: secondary_client_group }, { name: "Level of support given", value: support_type }, { name: "Intended length of stay", value: intended_stay }, + { name: "Availability", value: "Available from #{available_from.to_formatted_s(:govuk_date)}" }, + { name: "Status", value: "" }, ] if arrangement_type_same? @@ -230,4 +232,8 @@ class Scheme < ApplicationRecord end end end + + def available_from + created_at + end end