Skip to content

Commit

Permalink
Fix the Facilties tab overflow in Organization Layout (#9778)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnveshNalimela authored Jan 16, 2025
1 parent b80fe43 commit 7857373
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
26 changes: 14 additions & 12 deletions src/pages/FacilityOrganization/FacilityOrganizationView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ export default function FacilityOrganizationView({ id, facilityId }: Props) {
return (
<FacilityOrganizationLayout id={id} facilityId={facilityId}>
<div className="space-y-6">
<div className="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
<div className="flex flex-col lg:flex-row justify-between item-start lg:items-center gap-4">
<h2 className="text-lg font-semibold">{t("organizations")}</h2>
<div className="flex items-center gap-4 w-full sm:w-auto">
<div className="w-full sm:w-72">
<div className="flex flex-col items-center md:flex-row sm:items-center gap-4 w-full lg:justify-end">
<div className="w-full lg:w-1/3">
<Input
placeholder="Search by name..."
value={searchQuery}
Expand All @@ -68,10 +68,12 @@ export default function FacilityOrganizationView({ id, facilityId }: Props) {
className="w-full"
/>
</div>
<CreateFacilityOrganizationSheet
facilityId={facilityId}
parentId={id}
/>
<div className="w-auto">
<CreateFacilityOrganizationSheet
facilityId={facilityId}
parentId={id}
/>
</div>
</div>
</div>

Expand Down Expand Up @@ -99,8 +101,8 @@ export default function FacilityOrganizationView({ id, facilityId }: Props) {
<Card key={org.id}>
<CardContent className="p-6">
<div className="space-y-4">
<div className="flex items-center justify-between">
<div className="space-y-1">
<div className="flex items-center justify-between flex-wrap">
<div className="space-y-1 mb-2">
<h3 className="text-lg font-semibold">
{org.name}
</h3>
Expand All @@ -113,7 +115,7 @@ export default function FacilityOrganizationView({ id, facilityId }: Props) {
<Link
href={`/facility/${facilityId}/organization/${org.id}`}
>
View Details
{t("view_details")}
<CareIcon
icon="l-arrow-right"
className="h-4 w-4"
Expand All @@ -134,8 +136,8 @@ export default function FacilityOrganizationView({ id, facilityId }: Props) {
<Card className="col-span-full">
<CardContent className="p-6 text-center text-gray-500">
{searchQuery
? `No organizations found matching "${searchQuery}"`
: "No sub-organizations found."}
? t("no_organizations_found_matching", { searchQuery })
: t("no_sub_organizations_found")}
</CardContent>
</Card>
)}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/Organization/OrganizationView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ export default function OrganizationView({ id, navOrganizationId }: Props) {
<Card key={orgChild.id}>
<CardContent className="p-6">
<div className="space-y-4">
<div className="flex items-center justify-between">
<div className="space-y-1">
<div className="flex items-center justify-between flex-wrap">
<div className="space-y-1 mb-2">
<h3 className="text-lg font-semibold">
{orgChild.name}
</h3>
Expand All @@ -110,7 +110,7 @@ export default function OrganizationView({ id, navOrganizationId }: Props) {
</div>
<Button variant="link" asChild>
<Link href={`${baseUrl}/children/${orgChild.id}`}>
View Details
{t("view_details")}
<CareIcon
icon="l-arrow-right"
className="h-4 w-4"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Organization/components/OrganizationLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export default function OrganizationLayout({
</Breadcrumb>
{/* Navigation */}
<div className="mt-4">
<Menubar>
<Menubar className="w-full h-full overflow-x-auto">
{navItems
.filter((item) => item.visibility)
.map((item) => (
Expand Down

0 comments on commit 7857373

Please sign in to comment.