Skip to content

Commit

Permalink
Add count to resource and encounter page (#10700)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahendar0701 authored Feb 20, 2025
1 parent b6aa5d9 commit ac6ba9c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
17 changes: 16 additions & 1 deletion src/components/Resource/ResourceList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,22 @@ export default function ResourceList({ facilityId }: { facilityId: string }) {
const resources = queryResources?.results || [];

return (
<Page title={t("resource")}>
<Page
title={t("resource")}
componentRight={
<Badge
className="bg-purple-50 text-purple-700 ml-2 text-sm font-medium rounded-xl px-3 m-3 w-max"
variant="outline"
>
{isLoading
? t("loading")
: t("entity_count", {
count: queryResources?.count ?? 0,
entity: "Resource",
})}
</Badge>
}
>
<div className="space-y-4 mt-2">
<div className="rounded-lg border bg-card shadow-sm">
<div className="flex flex-col">
Expand Down
17 changes: 16 additions & 1 deletion src/pages/Encounters/EncounterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,22 @@ export function EncounterList({
const { t } = useTranslation();

return (
<Page title={t("encounters")}>
<Page
title={t("encounters")}
componentRight={
<Badge
className="bg-purple-50 text-purple-700 ml-2 text-sm font-medium rounded-xl px-3 m-3 w-max"
variant="outline"
>
{isLoading
? t("loading")
: t("entity_count", {
count: queryEncounters?.count ?? 0,
entity: "Encounter",
})}
</Badge>
}
>
<div className="space-y-4 mt-2 flex flex-col">
<div className="rounded-lg border bg-card shadow-sm flex flex-col">
<div className="flex flex-col">
Expand Down

0 comments on commit ac6ba9c

Please sign in to comment.