Skip to content

Commit

Permalink
OM-278: simplify syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
sniedzielski committed Aug 30, 2024
1 parent 950c97c commit bf20fa7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/BillSearcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ 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);
}
const additionalExportFields =
economicUnitConfig &&
economicUnit?.id &&
!isAdminOrInspector
? { subjectId: decodeId(economicUnit?.id) }
: {};

useEffect(() => billToDelete && openConfirmDialog(), [billToDelete]);

Expand Down

0 comments on commit bf20fa7

Please sign in to comment.