|
|
@ -31,6 +31,10 @@ class Organisation < ApplicationRecord |
|
|
|
%i[address_line1 address_line2 postcode].map { |field| public_send(field) }.join("\n") |
|
|
|
%i[address_line1 address_line2 postcode].map { |field| public_send(field) }.join("\n") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def data_protection_confirmed? |
|
|
|
|
|
|
|
!!data_protection_confirmations.order(created_at: :desc).first&.confirmed |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def display_attributes |
|
|
|
def display_attributes |
|
|
|
[ |
|
|
|
[ |
|
|
|
{ name: "name", value: name, editable: true }, |
|
|
|
{ name: "name", value: name, editable: true }, |
|
|
@ -38,9 +42,10 @@ class Organisation < ApplicationRecord |
|
|
|
{ name: "telephone_number", value: phone, editable: true }, |
|
|
|
{ name: "telephone_number", value: phone, editable: true }, |
|
|
|
{ name: "type", value: "Org type", editable: false }, |
|
|
|
{ name: "type", value: "Org type", editable: false }, |
|
|
|
{ name: "local_authorities_operated_in", value: local_authorities, editable: false }, |
|
|
|
{ name: "local_authorities_operated_in", value: local_authorities, editable: false }, |
|
|
|
{ name: "holds_own_stock", value: holds_own_stock, editable: false }, |
|
|
|
{ name: "holds_own_stock", value: holds_own_stock.to_s.humanize, editable: false }, |
|
|
|
{ name: "other_stock_owners", value: other_stock_owners, editable: false }, |
|
|
|
{ name: "other_stock_owners", value: other_stock_owners, editable: false }, |
|
|
|
{ name: "managing_agents", value: managing_agents, editable: false }, |
|
|
|
{ name: "managing_agents", value: managing_agents, editable: false }, |
|
|
|
|
|
|
|
{ name: "has_signed_data_protection_agreement?", value: data_protection_confirmed?.to_s.humanize, editable: false }, |
|
|
|
] |
|
|
|
] |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|