Skip to content

Commit 025b4c6

Browse files
anishfyleanishfyle
authored andcommitted
fix: hide card number and employee name as options for memo field (#1123)
* fix: hide card number and employee name as options for memo field * updated conditions * fix lint
1 parent 20171dc commit 025b4c6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/app/core/models/common/advanced-settings.model.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ExportSettingGet } from "../intacct/intacct-configuration/export-settin
55
import { QBOExportSettingGet } from "../qbo/qbo-configuration/qbo-export-setting.model";
66
import { NetSuiteExportSettingGet } from "../netsuite/netsuite-configuration/netsuite-export-setting.model";
77
import { IntacctConfiguration } from "../db/configuration.model";
8-
8+
import { brandingConfig } from 'src/app/branding/branding-config';
99
export type EmailOption = {
1010
email: string;
1111
name: string;
@@ -87,11 +87,14 @@ export class AdvancedSettingsModel {
8787
} else if ('workspace_general_settings' in exportSettings) {
8888
cccExportType = exportSettings.workspace_general_settings?.corporate_credit_card_expenses_object ?? undefined;
8989
}
90-
// Filter out options based on cccExportType and appName
91-
if (cccExportType && ['netsuite', 'quickbooks online', 'sage intacct'].includes(appName.toLowerCase())) {
92-
return defaultOptions; // Allow all options including 'card_number'
90+
91+
if (brandingConfig.brandId === 'co') {
92+
return defaultOptions.filter(option => option !== 'card_number' && option !== 'employee_name');
9393
}
94-
return defaultOptions.filter(option => option !== 'card_number'); // Omit 'card_number' for other apps
94+
if (cccExportType && ['netsuite', 'quickbooks online', 'sage intacct'].includes(appName.toLowerCase()) && brandingConfig.brandId === 'fyle') {
95+
return defaultOptions;
96+
}
97+
return defaultOptions.filter(option => option !== 'card_number');
9598

9699
}
97100

0 commit comments

Comments
 (0)