Skip to content

Commit

Permalink
refactor: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mananjadhav committed Sep 22, 2024
1 parent dc73e8b commit 454fd46
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/libs/PolicyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -828,13 +828,17 @@ function getCustomersOrJobsLabelNetSuite(policy: Policy | undefined, translate:
return importedValueLabel.charAt(0).toUpperCase() + importedValueLabel.slice(1);
}

function getNetSuiteImportCustomFieldLabel(policy: Policy | undefined, importField: ValueOf<typeof CONST.NETSUITE_CONFIG.IMPORT_CUSTOM_FIELDS>, translate: LocaleContextProps['translate']): string | undefined {
function getNetSuiteImportCustomFieldLabel(
policy: Policy | undefined,
importField: ValueOf<typeof CONST.NETSUITE_CONFIG.IMPORT_CUSTOM_FIELDS>,
translate: LocaleContextProps['translate'],
): string | undefined {
const fieldData = policy?.connections?.netsuite?.options?.config.syncOptions?.[importField] ?? [];
if (fieldData.length === 0) {
return undefined;
}

const mappingSet = new Set(fieldData.map(item => item.mapping));
const mappingSet = new Set(fieldData.map((item) => item.mapping));
const importedTypes = Array.from(mappingSet).map((mapping) => translate(`workspace.netsuite.import.importTypes.${mapping}.label`).toLowerCase());
return translate(`workspace.netsuite.import.importCustomFields.label`, importedTypes);
}
Expand Down Expand Up @@ -1138,7 +1142,7 @@ export {
getDomainNameForPolicy,
hasUnsupportedIntegration,
getWorkflowApprovalsUnavailable,
getNetSuiteImportCustomFieldLabel
getNetSuiteImportCustomFieldLabel,
};

export type {MemberEmailsToAccountIDs};

0 comments on commit 454fd46

Please sign in to comment.