From 395d4bc464d5fd5e6cb9dc2f26a9ad36c6c2b05d Mon Sep 17 00:00:00 2001 From: Sumit Dhanania Date: Fri, 19 Apr 2024 21:57:44 +0530 Subject: [PATCH] fix: update scheduler type for manual interval (#67) --- ui/src/views/Activate/Syncs/EditSync/EditSync.tsx | 4 ++-- ui/src/views/Activate/Syncs/EditSync/ScheduleForm.tsx | 4 ++-- .../Activate/Syncs/SyncForm/FinaliseSync/FinaliseSync.tsx | 6 +++--- ui/src/views/Activate/Syncs/types.ts | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/src/views/Activate/Syncs/EditSync/EditSync.tsx b/ui/src/views/Activate/Syncs/EditSync/EditSync.tsx index 6f552dfa..30685996 100644 --- a/ui/src/views/Activate/Syncs/EditSync/EditSync.tsx +++ b/ui/src/views/Activate/Syncs/EditSync/EditSync.tsx @@ -71,7 +71,7 @@ const EditSync = (): JSX.Element | null => { sync_mode: 'full_refresh', sync_interval: 0, sync_interval_unit: 'minutes', - schedule_type: 'automated', + schedule_type: 'interval', }, onSubmit: async (data) => { setIsEditLoading(true); @@ -147,7 +147,7 @@ const EditSync = (): JSX.Element | null => { sync_interval: syncData?.sync_interval ?? 0, sync_interval_unit: syncData?.sync_interval_unit ?? 'minutes', sync_mode: syncData?.sync_mode ?? 'full_refresh', - schedule_type: syncData?.schedule_type ?? 'automated', + schedule_type: syncData?.schedule_type ?? 'interval', }); if (Array.isArray(syncFetchResponse.data.attributes.configuration)) { diff --git a/ui/src/views/Activate/Syncs/EditSync/ScheduleForm.tsx b/ui/src/views/Activate/Syncs/EditSync/ScheduleForm.tsx index 71172474..661fe6a9 100644 --- a/ui/src/views/Activate/Syncs/EditSync/ScheduleForm.tsx +++ b/ui/src/views/Activate/Syncs/EditSync/ScheduleForm.tsx @@ -46,7 +46,7 @@ const ScheduleForm = ({ formik, isEdit }: ScheduleFormProps) => { { - {formik.values.schedule_type === 'automated' ? ( + {formik.values.schedule_type === 'interval' ? ( <> Schedule Configuration diff --git a/ui/src/views/Activate/Syncs/SyncForm/FinaliseSync/FinaliseSync.tsx b/ui/src/views/Activate/Syncs/SyncForm/FinaliseSync/FinaliseSync.tsx index 0421d19c..de48691e 100644 --- a/ui/src/views/Activate/Syncs/SyncForm/FinaliseSync/FinaliseSync.tsx +++ b/ui/src/views/Activate/Syncs/SyncForm/FinaliseSync/FinaliseSync.tsx @@ -36,7 +36,7 @@ const FinaliseSync = (): JSX.Element => { sync_mode: 'full_refresh', sync_interval: 0, sync_interval_unit: 'minutes', - schedule_type: 'automated', + schedule_type: 'interval', }, onSubmit: async (data) => { setIsLoading(true); @@ -134,7 +134,7 @@ const FinaliseSync = (): JSX.Element => { { - {formik.values.schedule_type === 'automated' ? ( + {formik.values.schedule_type === 'interval' ? ( <> Schedule Configuration diff --git a/ui/src/views/Activate/Syncs/types.ts b/ui/src/views/Activate/Syncs/types.ts index b6829f92..d62b3242 100644 --- a/ui/src/views/Activate/Syncs/types.ts +++ b/ui/src/views/Activate/Syncs/types.ts @@ -62,7 +62,7 @@ export type ConfigSync = { source_id: string; destination_id: string; model_id: string; - schedule_type: 'automated'; + schedule_type: 'interval'; configuration: FieldMapType[]; stream_name: string; }; @@ -89,7 +89,7 @@ export type CreateSyncResponse = { configuration: Record; destination_id: number; model_id: number; - schedule_type: 'automated'; + schedule_type: 'interval'; source_id: string; status: string; stream_name: string; @@ -127,7 +127,7 @@ export type FinalizeSyncFormFields = { sync_mode: 'full_refresh'; sync_interval: number; sync_interval_unit: 'minutes'; - schedule_type: 'automated'; + schedule_type: 'interval'; }; export type SyncRunsResponse = {