|
|
@ -24,7 +24,7 @@ module LocationsHelper |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def display_location_attributes(location) |
|
|
|
def display_location_attributes(location) |
|
|
|
[ |
|
|
|
base_attributes = [ |
|
|
|
{ name: "Postcode", value: location.postcode }, |
|
|
|
{ name: "Postcode", value: location.postcode }, |
|
|
|
{ name: "Local authority", value: location.location_admin_district }, |
|
|
|
{ name: "Local authority", value: location.location_admin_district }, |
|
|
|
{ name: "Location name", value: location.name, edit: true }, |
|
|
|
{ name: "Location name", value: location.name, edit: true }, |
|
|
@ -33,7 +33,12 @@ module LocationsHelper |
|
|
|
{ name: "Mobility type", value: location.mobility_type }, |
|
|
|
{ name: "Mobility type", value: location.mobility_type }, |
|
|
|
{ name: "Code", value: location.location_code }, |
|
|
|
{ name: "Code", value: location.location_code }, |
|
|
|
{ name: "Availability", value: "Available from #{location.available_from.to_formatted_s(:govuk_date)}" }, |
|
|
|
{ name: "Availability", value: "Available from #{location.available_from.to_formatted_s(:govuk_date)}" }, |
|
|
|
{ name: "Status", value: location.status }, |
|
|
|
|
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if FeatureToggle.location_toggle_enabled? |
|
|
|
|
|
|
|
base_attributes.append({ name: "Status", value: location.status }) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
base_attributes |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|