-
Notifications
You must be signed in to change notification settings - Fork 649
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0b3a82
commit 96f04f8
Showing
3 changed files
with
39 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/components/Patient/PatientDetailsTab/patientUpdates.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Link } from "raviger"; | ||
import { useTranslation } from "react-i18next"; | ||
|
||
import CareIcon from "@/CAREUI/icons/CareIcon"; | ||
|
||
import { Button } from "@/components/ui/button"; | ||
|
||
import QuestionnaireResponsesList from "@/components/Facility/ConsultationDetails/QuestionnaireResponsesList"; | ||
|
||
import { PatientProps } from "."; | ||
|
||
export const Updates = (props: PatientProps) => { | ||
const { patientId, facilityId } = props; | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<div className="mt-4 px-3 md:px-0"> | ||
<div className="flex justify-between items-center mb-4"> | ||
<h2 className="text-2xl font-semibold leading-tight">{t("updates")}</h2> | ||
<Button asChild variant="outline_primary"> | ||
<Link | ||
href={ | ||
facilityId | ||
? `/facility/${facilityId}/patient/${patientId}/questionnaire` | ||
: `/patient/${patientId}/questionnaire` | ||
} | ||
> | ||
<CareIcon icon="l-plus" className="mr-2" /> | ||
{t("add_patient_updates")} | ||
</Link> | ||
</Button> | ||
</div> | ||
<QuestionnaireResponsesList patientId={patientId} /> | ||
</div> | ||
); | ||
}; |