From 5b9c61848ddc8b729802e9099fd4ccfa5ad5ea2f Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Fri, 10 Nov 2023 20:35:44 +0530 Subject: [PATCH 1/7] refresh administrations upon archive (#6586) --- .../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} />