Skip to content

Commit

Permalink
Responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
amjithtitus09 committed Mar 4, 2025
1 parent 20a5c49 commit 763db34
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/pages/Facility/locations/LocationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ function LocationSummary({ locations }: { locations: LocationListType[] }) {
</Badge>
)}
{summary.totalBeds > 0 && (
<>
<div className="flex gap-2">
<Badge className="bg-green-100 text-green-800 hover:bg-green-100 flex items-center gap-2 px-2 font-medium">
<span>{t("available_beds")}</span>
<span>{summary.availableBeds}</span>
Expand All @@ -560,7 +560,7 @@ function LocationSummary({ locations }: { locations: LocationListType[] }) {
<span>{t("occupied_beds")}</span>
<span>{summary.occupiedBeds}</span>
</Badge>
</>
</div>
)}
</div>
);
Expand Down Expand Up @@ -610,13 +610,13 @@ export default function LocationList({ facilityId }: { facilityId: string }) {
}, [allLocations?.results]);

return (
<div className="flex h-[calc(100vh-4rem)] px-4 space-x-4">
<div className="flex px-4 space-x-4">
{/* Left sidebar - Location tree */}
<div className="w-64 shadow-lg bg-white rounded-lg">
<div className="w-64 shadow-lg bg-white rounded-lg hidden md:block">
<div className="p-4">
<h2 className="text-lg font-semibold">{t("locations")}</h2>
</div>
<ScrollArea className="h-[calc(100vh-8rem)]">
<ScrollArea>
<div className="p-2">
{isLoadingLocations ? (
<div className="p-4">
Expand All @@ -640,7 +640,7 @@ export default function LocationList({ facilityId }: { facilityId: string }) {
</div>

{/* Main content area */}
<div className="flex-1 p-6 space-y-4 rounded-lg bg-white">
<div className="flex-1 p-6 space-y-4 rounded-lg bg-white shadow-lg">
<div className="flex flex-col gap-4">
{selectedLocation && (
<Breadcrumbs
Expand All @@ -649,7 +649,7 @@ export default function LocationList({ facilityId }: { facilityId: string }) {
t={t}
/>
)}
<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 items-start lg:items-center gap-4">
<div className="flex flex-col sm:flex-row items-start sm:items-center gap-4 flex-1">
<h2 className="text-lg font-semibold whitespace-nowrap">
{selectedLocation ? selectedLocation.name : t("locations")}
Expand Down

0 comments on commit 763db34

Please sign in to comment.