Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add count to resource and encounter page #10700

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading