From 55b01485939aec8bcde76faffcd619a350412d20 Mon Sep 17 00:00:00 2001 From: Baruch Odem Date: Sun, 10 Nov 2024 07:33:31 +0200 Subject: [PATCH] format --- packages/main/src/backend/index.ts | 12 +++++++----- packages/preload/src/index.ts | 1 - packages/renderer/src/components/Body.tsx | 16 ++++++++-------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/packages/main/src/backend/index.ts b/packages/main/src/backend/index.ts index 4f733feb..c39aec4e 100644 --- a/packages/main/src/backend/index.ts +++ b/packages/main/src/backend/index.ts @@ -43,12 +43,14 @@ export async function scrapeAndUpdateOutputVendors(config: Config, optionalEvent const startDate = moment().subtract(config.scraping.numDaysBack, 'days').startOf('day').toDate(); - const nextAutomaticScrapeDate : Date | null = config.scraping.periodicScrapingIntervalHours ? moment().add(config.scraping.periodicScrapingIntervalHours, 'hours').toDate() : null; + const nextAutomaticScrapeDate: Date | null = config.scraping.periodicScrapingIntervalHours + ? moment().add(config.scraping.periodicScrapingIntervalHours, 'hours').toDate() + : null; - await eventPublisher.emit(EventNames.IMPORT_PROCESS_START, new Events.ImportStartEvent( - `Starting to scrape from ${startDate} to today`, - nextAutomaticScrapeDate, - )); + await eventPublisher.emit( + EventNames.IMPORT_PROCESS_START, + new Events.ImportStartEvent(`Starting to scrape from ${startDate} to today`, nextAutomaticScrapeDate), + ); const companyIdToTransactions = await scrapeFinancialAccountsAndFetchTransactions( config.scraping, diff --git a/packages/preload/src/index.ts b/packages/preload/src/index.ts index f72ccf78..33d7040c 100644 --- a/packages/preload/src/index.ts +++ b/packages/preload/src/index.ts @@ -3,4 +3,3 @@ */ export * from './eventsBridge'; - diff --git a/packages/renderer/src/components/Body.tsx b/packages/renderer/src/components/Body.tsx index d3358bcc..7bd92454 100644 --- a/packages/renderer/src/components/Body.tsx +++ b/packages/renderer/src/components/Body.tsx @@ -68,8 +68,12 @@ const Body = () => { closeModal(); }; - const shouldShowNextRunTime = !!(configStore.nextAutomaticScrapeDate && Number(configStore.config.scraping.periodicScrapingIntervalHours)); - const nextRunTimeString = configStore.nextAutomaticScrapeDate ? new Date(configStore.nextAutomaticScrapeDate).toLocaleTimeString() : null; + const shouldShowNextRunTime = !!( + configStore.nextAutomaticScrapeDate && Number(configStore.config.scraping.periodicScrapingIntervalHours) + ); + const nextRunTimeString = configStore.nextAutomaticScrapeDate + ? new Date(configStore.nextAutomaticScrapeDate).toLocaleTimeString() + : null; return ( @@ -127,12 +131,8 @@ const Body = () => { - {shouldShowNextRunTime && -
- ריצה הבאה: {nextRunTimeString} -
- } - ריצה הבאה: {nextRunTimeString}} + showModal({} as Account, ModalStatus.GENERAL_SETTINGS)} className={styles.pointer}