From f0a888bdc33dd1c7f279392859ade6f194535767 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Fri, 10 Nov 2023 20:07:01 +0530 Subject: [PATCH] refresh administrations upon archive --- .../AdministrationEventCell.tsx | 3 ++ .../AdministrationTableRow.tsx | 36 ++++++++++--------- .../Medicine/PrescrpitionTimeline.tsx | 7 +++- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx index 9869b677cd2..1bcfc24a80a 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx @@ -11,12 +11,14 @@ interface Props { administrations: MedicineAdministrationRecord[]; interval: { start: Date; end: Date }; prescription: Prescription; + refetch: () => void; } export default function AdministrationEventCell({ administrations, interval: { start, end }, prescription, + refetch, }: Props) { const [showTimeline, setShowTimeline] = useState(false); // Check if cell belongs to an administered prescription @@ -55,6 +57,7 @@ export default function AdministrationEventCell({ interval={{ start, end }} prescription={prescription} showPrescriptionDetails + onRefetch={refetch} />