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}