From 950c97ccdc4df643e4479ff0f2da4ca725df6fcb Mon Sep 17 00:00:00 2001 From: sniedzielski Date: Fri, 30 Aug 2024 12:46:14 +0200 Subject: [PATCH] OM-278: added filtering by economic unit if there is economic unit config --- src/components/BillSearcher.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/BillSearcher.js b/src/components/BillSearcher.js index fe7b961..0b09d4e 100644 --- a/src/components/BillSearcher.js +++ b/src/components/BillSearcher.js @@ -69,6 +69,13 @@ const BillSearcher = ({ const economicUnitConfig = modulesManager.getConf("fe-core", "App.economicUnitConfig", DEFAULT.ECONOMIC_UNIT_CONFIG); const isAdminOrInspector = rights.includes(INSPECTOR_RIGHT) || rights.includes(ADMIN_RIGHT); + const additionalExportFields = { + }; + + if (economicUnitConfig && economicUnit?.id && !isAdminOrInspector) { + additionalExportFields.subjectId = decodeId(economicUnit?.id); + } + useEffect(() => billToDelete && openConfirmDialog(), [billToDelete]); useEffect(() => { @@ -307,6 +314,7 @@ const BillSearcher = ({ "dateBill": "Date Bill", "status": "Status", }} + additionalExportFields={additionalExportFields} /> {failedExport && (