From d6c860c1792d5e12629c8836586ee85e5ae907e6 Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Wed, 24 Jan 2024 17:38:15 +0100 Subject: [PATCH] fix(ui): show frequency in connection's sync page (#1559) --- packages/shared/lib/services/sync/sync.service.ts | 1 + packages/webapp/src/pages/ConnectionDetails.tsx | 5 ++++- packages/webapp/src/types.ts | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/shared/lib/services/sync/sync.service.ts b/packages/shared/lib/services/sync/sync.service.ts index d6041d3970..dfe1cd4af8 100644 --- a/packages/shared/lib/services/sync/sync.service.ts +++ b/packages/shared/lib/services/sync/sync.service.ts @@ -270,6 +270,7 @@ export const getSyncs = async (nangoConnection: Connection): Promise => .from(TABLE) .select( `${TABLE}.*`, + `${TABLE}.frequency as frequency_override`, `${SYNC_SCHEDULE_TABLE}.schedule_id`, `${SYNC_SCHEDULE_TABLE}.frequency`, `${SYNC_SCHEDULE_TABLE}.offset`, diff --git a/packages/webapp/src/pages/ConnectionDetails.tsx b/packages/webapp/src/pages/ConnectionDetails.tsx index 3381bac457..27b5755c90 100644 --- a/packages/webapp/src/pages/ConnectionDetails.tsx +++ b/packages/webapp/src/pages/ConnectionDetails.tsx @@ -571,7 +571,10 @@ We could not retrieve and/or refresh your access token due to the following erro {interpretNextRun(sync.futureActionTimes) === '-' ? (
  • -
  • ) : ( - + + {interpretNextRun(sync.futureActionTimes, sync.latest_sync?.updated_at)[1]} +
    + Frequency: {sync.frequency_override || sync.frequency}{sync.frequency_override && <> (override)}} type="dark">
  • {interpretNextRun(sync.futureActionTimes, sync.latest_sync?.updated_at)[0]}
  • )} diff --git a/packages/webapp/src/types.ts b/packages/webapp/src/types.ts index 15fcf7bcfd..593e4bafe5 100644 --- a/packages/webapp/src/types.ts +++ b/packages/webapp/src/types.ts @@ -61,6 +61,7 @@ export interface SyncResponse { nango_connection_id: number; name: string; frequency: string; + frequency_override: string | null; futureActionTimes: number[]; offset: number; schedule_status: 'RUNNING' | 'PAUSED' | 'STOPPED';