Browse Source

feat: wip update scheme summary page

pull/980/head
natdeanlewissoftwire 2 years ago
parent
commit
c9dada8d89
  1. 2
      app/helpers/tag_helper.rb
  2. 6
      app/models/scheme.rb

2
app/helpers/tag_helper.rb

@ -6,6 +6,7 @@ module TagHelper
cannot_start_yet: "Cannot start yet", cannot_start_yet: "Cannot start yet",
in_progress: "In progress", in_progress: "In progress",
completed: "Completed", completed: "Completed",
active: "Active",
}.freeze }.freeze
COLOUR = { COLOUR = {
@ -13,6 +14,7 @@ module TagHelper
cannot_start_yet: "grey", cannot_start_yet: "grey",
in_progress: "blue", in_progress: "blue",
completed: "green", completed: "green",
active: "green",
}.freeze }.freeze
def status_tag(status, classes = []) def status_tag(status, classes = [])

6
app/models/scheme.rb

@ -168,6 +168,8 @@ class Scheme < ApplicationRecord
{ name: "Secondary client group", value: secondary_client_group }, { name: "Secondary client group", value: secondary_client_group },
{ name: "Level of support given", value: support_type }, { name: "Level of support given", value: support_type },
{ name: "Intended length of stay", value: intended_stay }, { 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? if arrangement_type_same?
@ -230,4 +232,8 @@ class Scheme < ApplicationRecord
end end
end end
end end
def available_from
created_at
end
end end

Loading…
Cancel
Save