From f8b1c6a3369f76465cb3c32fd0c654aa27da960b Mon Sep 17 00:00:00 2001 From: Findeton Date: Fri, 20 Mar 2026 17:21:48 +0000 Subject: [PATCH] wip --- .../dashboard/election/Dashboard.tsx | 19 +++++++++++++++++-- .../src/resources/Election/ElectionTabs.tsx | 14 ++++++++++---- .../ElectionEvent/ElectionEventTabs.tsx | 1 + 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/packages/admin-portal/src/components/dashboard/election/Dashboard.tsx b/packages/admin-portal/src/components/dashboard/election/Dashboard.tsx index a779d1bce27..9697067fb0b 100644 --- a/packages/admin-portal/src/components/dashboard/election/Dashboard.tsx +++ b/packages/admin-portal/src/components/dashboard/election/Dashboard.tsx @@ -27,7 +27,11 @@ const Container = styled(Box)` justify-content: space-between; ` -export default function DashboardElection() { +interface DashboardElectionProps { + refreshRef?: React.RefObject +} + +export default function DashboardElection({refreshRef}: DashboardElectionProps) { const {i18n} = useTranslation() const [tenantId] = useTenantStore() const {globalSettings} = useContext(SettingsContext) @@ -49,7 +53,11 @@ export default function DashboardElection() { // Ensure required parameters are set before running the query. const canQueryStats = Boolean(tenantId && record?.election_event_id && record?.id) - const {loading, data: dataStats} = useQuery(GET_ELECTION_STATS, { + const { + loading, + data: dataStats, + refetch: doRefetch, + } = useQuery(GET_ELECTION_STATS, { variables: { tenantId, electionEventId: record?.election_event_id, @@ -83,6 +91,13 @@ export default function DashboardElection() { return ( +