Skip to content

Commit

Permalink
updated conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
anishfyle committed Dec 13, 2024
1 parent ef3bca7 commit 2bea95e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/app/core/models/common/advanced-settings.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,15 @@ export class AdvancedSettingsModel {
} else if ('workspace_general_settings' in exportSettings) {
cccExportType = exportSettings.workspace_general_settings?.corporate_credit_card_expenses_object ?? undefined;
}
// Filter out options based on cccExportType and appName
if (cccExportType && ['netsuite', 'quickbooks online', 'sage intacct'].includes(appName.toLowerCase()) && brandingConfig.brandId === 'fyle') {
return defaultOptions; // Allow all options including 'card_number'
}
return defaultOptions.filter(option => option !== 'card_number'); // Omit 'card_number' for other apps

if(brandingConfig.brandId === 'co') {

Check failure on line 91 in src/app/core/models/common/advanced-settings.model.ts

View workflow job for this annotation

GitHub Actions / lint

Expected space(s) after "if"
return defaultOptions.filter(option => option !== 'card_number' && option !== 'employee_name');
} else {

Check failure on line 93 in src/app/core/models/common/advanced-settings.model.ts

View workflow job for this annotation

GitHub Actions / lint

Unnecessary 'else' after 'return'
if (cccExportType && ['netsuite', 'quickbooks online', 'sage intacct'].includes(appName.toLowerCase()) && brandingConfig.brandId === 'fyle') {
return defaultOptions;
}
return defaultOptions.filter(option => option !== 'card_number');
}
}

static formatMemoPreview(memoStructure: string[], defaultMemoOptions: string[]): [string, string[]] {
Expand Down

0 comments on commit 2bea95e

Please sign in to comment.