From 273fe0bc5931bb2ce955fce2b249659b8697a655 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Wed, 21 Feb 2024 12:58:17 +0200 Subject: [PATCH 1/3] Allow pdf export in the web as well --- src/state/query/saga.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/state/query/saga.js b/src/state/query/saga.js index d6d08acd6..30ed8b668 100644 --- a/src/state/query/saga.js +++ b/src/state/query/saga.js @@ -250,8 +250,7 @@ function* getOptions({ target }) { const isVSPrevDayBalance = showFrameworkMode ? yield select(getIsVSPrevDayBalance) : '' const isUnrealizedProfitExcluded = showFrameworkMode ? yield select(getIsUnrealizedProfitExcluded) : '' const isVsAccountBalanceSelected = showFrameworkMode ? yield select(getIsVsAccountBalanceSelected) : '' - const isPdfExportRequired = showFrameworkMode ? yield select(getIsPdfExportRequired) : false - + const isPdfExportRequired = yield select(getIsPdfExportRequired) switch (target) { case MENU_ACCOUNT_BALANCE: case MENU_WIN_LOSS: From 6fc6ac4ec362c60ee77a6c1f7a55462560d68faf Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Wed, 21 Feb 2024 13:00:09 +0200 Subject: [PATCH 2/3] Actualize export dialog helpers --- src/components/ExportDialog/ExportDialog.helpers.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/ExportDialog/ExportDialog.helpers.js b/src/components/ExportDialog/ExportDialog.helpers.js index a55f545d9..af38e748d 100644 --- a/src/components/ExportDialog/ExportDialog.helpers.js +++ b/src/components/ExportDialog/ExportDialog.helpers.js @@ -1,13 +1,10 @@ -import config from 'config' import queryConstants from 'state/query/constants' -const { showFrameworkMode } = config - const EXPORT_TO_PDF_WHITELIST = [ queryConstants.MENU_LEDGERS, queryConstants.MENU_TAX_REPORT, ] export const getShowPdfSwitcher = (targets) => ( - showFrameworkMode && EXPORT_TO_PDF_WHITELIST.some(target => targets.includes(target)) + EXPORT_TO_PDF_WHITELIST.some(target => targets.includes(target)) ) From 0036312d7a3d439e51440fe659dc55948a93faf4 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 22 Feb 2024 10:59:03 +0200 Subject: [PATCH 3/3] Lint fix --- src/state/query/saga.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/state/query/saga.js b/src/state/query/saga.js index 30ed8b668..7c79f2522 100644 --- a/src/state/query/saga.js +++ b/src/state/query/saga.js @@ -251,6 +251,7 @@ function* getOptions({ target }) { const isUnrealizedProfitExcluded = showFrameworkMode ? yield select(getIsUnrealizedProfitExcluded) : '' const isVsAccountBalanceSelected = showFrameworkMode ? yield select(getIsVsAccountBalanceSelected) : '' const isPdfExportRequired = yield select(getIsPdfExportRequired) + switch (target) { case MENU_ACCOUNT_BALANCE: case MENU_WIN_LOSS: