From df7f31f41f32674250ec1ff869efef3417a5c26c Mon Sep 17 00:00:00 2001
From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com>
Date: Wed, 5 Mar 2025 15:02:39 +0000
Subject: [PATCH] Add values to about this organisation page

---
 app/helpers/organisations_helper.rb | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/app/helpers/organisations_helper.rb b/app/helpers/organisations_helper.rb
index 19c77b357..8cf7f4ea6 100644
--- a/app/helpers/organisations_helper.rb
+++ b/app/helpers/organisations_helper.rb
@@ -10,17 +10,26 @@ module OrganisationsHelper
   end
 
   def display_organisation_attributes(organisation)
-    [
+    attributes = [
       { name: "Organisation ID", value: "ORG#{organisation.id}", editable: false },
       { name: "Address", value: organisation.address_string, editable: true },
       { name: "Telephone number", value: organisation.phone, editable: true },
       { name: "Registration number", value: organisation.housing_registration_no || "", editable: false },
       { name: "Type of provider", value: organisation.display_provider_type, editable: false },
       { name: "Owns housing stock", value: organisation.holds_own_stock ? "Yes" : "No", editable: false },
-      { name: "Rent periods", value: organisation.rent_period_labels, editable: true, format: :bullet },
-      { name: "Data Sharing Agreement" },
-      { name: "Status", value: status_tag(organisation.status) + delete_organisation_text(organisation), editable: false },
+      { name: "Part of group", value: organisation.group_member ? "Yes" : "No", editable: current_user.support? },
     ]
+
+    if organisation.group_member
+      attributes << { name: "Group number", value: organisation.group, editable: current_user.support? }
+    end
+
+    attributes << { name: "For profit", value: organisation.profit_status, editable: current_user.support? }
+    attributes << { name: "Rent periods", value: organisation.rent_period_labels, editable: true, format: :bullet }
+    attributes << { name: "Data Sharing Agreement" }
+    attributes << { name: "Status", value: status_tag(organisation.status) + delete_organisation_text(organisation), editable: false }
+
+    attributes
   end
 
   def organisation_name_row(user:, organisation:, summary_list:)
@@ -64,6 +73,7 @@ module OrganisationsHelper
   def organisation_details_link_message(attribute)
     text = lowercase_first_letter(attribute[:name])
     return "Add #{text}" if attribute[:name] == "Rent periods"
+    return "Select profit status" if attribute[:name] == "For profit"
 
     "Enter #{text}"
   end