From 6e824d58a3d676ecfd70bb32f8f0bcb08c9ae95e Mon Sep 17 00:00:00 2001 From: Spandan-Mishra Date: Thu, 6 Mar 2025 12:20:07 +0530 Subject: [PATCH] Fixed proposed changes in PR Added UI feedback when lists are empty, added accessibilty attributes and fixed some typos --- public/locale/en.json | 4 +- src/pages/UserDashboard.tsx | 248 +++++++++++++++++++++--------------- 2 files changed, 145 insertions(+), 107 deletions(-) diff --git a/public/locale/en.json b/public/locale/en.json index 11e8bbe02ea..90564eb5141 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -736,9 +736,9 @@ "cylinders_per_day": "Cylinders/day", "daily_rounds": "Daily Rounds", "dashboard": "Dashboard", - "dashboard_tab_administrations": "These are the Local Self-Government (LSG) networks or groups you're affiliated with, including State, District, Block, Municipality, Corporation, Panchayat, and Ward-level governance bodies", "dashboard_tab_associations": "These are the professional or role-based groups - such as doctors, nurses, technicians, volunteers, or staff - that you are affiliated with", "dashboard_tab_facilities": "These are the clinics, hospitals, or health centers you manage or belong to", + "dashboard_tab_governance": "These are the Local Self-Government (LSG) networks or groups you're affiliated with, including State, District, Block, Municipality, Corporation, Panchayat, and Ward-level governance bodies", "date": "Date", "date_and_time": "Date and Time", "date_and_time_of_death": "Date and Time of Death", @@ -1536,6 +1536,7 @@ "no_address_provided": "No address provided", "no_allergies_recorded": "No allergies recorded", "no_appointments": "No appointments found", + "no_associations_found": "No associations found", "no_attachments_found": "This communication has no attachments.", "no_availabilities_yet": "No availabilities yet", "no_bed_asset_linked_allocated": "No bed/asset linked allocated", @@ -1561,6 +1562,7 @@ "no_facilities": "No Facilities found", "no_facilities_found": "No facilities found", "no_files_found": "No {{type}} files found", + "no_governance_found": "No governance found", "no_home_facility": "No home facility", "no_home_facility_found": "No home facility found", "no_image_found": "No image found", diff --git a/src/pages/UserDashboard.tsx b/src/pages/UserDashboard.tsx index 17ff9a5a515..f739ed1917f 100644 --- a/src/pages/UserDashboard.tsx +++ b/src/pages/UserDashboard.tsx @@ -28,11 +28,11 @@ export default function UserDashboard() { const organizations = user.organizations || []; const associations = organizations.filter((org) => org.org_type === "role") || []; - const administrations = + const governance = organizations.filter((org) => org.org_type === "govt") || []; const [activeTab, setActiveTab] = useState("My Facilities"); - const tabs = ["My Facilities", "Associations", "Administrations"]; + const tabs = ["My Facilities", "Associations", "Governance"]; return (
@@ -109,8 +109,8 @@ export default function UserDashboard() { @@ -126,11 +126,14 @@ export default function UserDashboard() { {/* Tabs Section */}
{/* Tabs Headings */} -
+
{tabs.map((tab) => (