Skip to content

Commit

Permalink
PR commit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DhaaraniCIT committed Feb 14, 2025
1 parent 21fe4a9 commit bee5bde
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 33 deletions.
10 changes: 1 addition & 9 deletions src/app/branding/c1-branding-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export const c1FeatureConfig: FeatureConfiguration[string] = {
featureFlags: {
cloneSettings: false,
mapEmployees: false,
c1Icon: true,
c1Options: true,
allowForC1: true,
showOptionalTextInsteadOfAsterisk: true,
useCustomIcon: true,
Expand All @@ -29,14 +27,9 @@ export const c1FeatureConfig: FeatureConfiguration[string] = {
nameInJournalEntry: false,
useMerchantInJournalLine: false,
splitExpenseGrouping: false,
cccDateConfiguration: true,
isEmployeeMappingFixed: true,
transformContentToSentenceCase: true,
cccExportGroupConfiguration: true,
lowerCaseConversion: true,
allowAccountsPayableInCoCCC: true,
allowBankAccountInCoCCC: true,
isReimbursableExpensesAllowed: true
isReimbursableExpensesAllowed: false
},
importSettings: {
tax: false,
Expand All @@ -48,7 +41,6 @@ export const c1FeatureConfig: FeatureConfiguration[string] = {
dependentField: true,
allowImportCode: false,
importSettingsV1: false,
intacctC1ImportSettings: true,
disableCustomerSourceField: true
},
advancedSettings: {
Expand Down
10 changes: 1 addition & 9 deletions src/app/branding/fyle-branding-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export const fyleFeatureConfig: FeatureConfiguration[string] = {
featureFlags: {
cloneSettings: true,
mapEmployees: true,
c1Icon: false,
c1Options: false,
allowForC1: false,
showOptionalTextInsteadOfAsterisk: false,
useCustomIcon: false,
Expand All @@ -29,14 +27,9 @@ export const fyleFeatureConfig: FeatureConfiguration[string] = {
nameInJournalEntry: true,
useMerchantInJournalLine: true,
splitExpenseGrouping: true,
cccDateConfiguration: true,
isEmployeeMappingFixed: false,
transformContentToSentenceCase: false,
cccExportGroupConfiguration: false,
lowerCaseConversion: false,
allowAccountsPayableInCoCCC: false,
allowBankAccountInCoCCC: false,
isReimbursableExpensesAllowed: false
isReimbursableExpensesAllowed: true
},
importSettings: {
tax: true,
Expand All @@ -48,7 +41,6 @@ export const fyleFeatureConfig: FeatureConfiguration[string] = {
dependentField: true,
allowImportCode: true,
importSettingsV1: true,
intacctC1ImportSettings: false,
disableCustomerSourceField: false
},
advancedSettings: {
Expand Down
8 changes: 0 additions & 8 deletions src/app/core/models/branding/feature-configuration.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ export type FeatureConfiguration = {
showOptionalTextInsteadOfAsterisk: boolean;
cloneSettings: boolean;
mapEmployees: boolean;
c1Icon: boolean;
useCustomIcon: boolean;
c1Options: boolean;
allowForC1: boolean;
displayAppLogoInDashboard: boolean;
exportSettings: {
Expand All @@ -23,13 +21,8 @@ export type FeatureConfiguration = {
nameInJournalEntry: boolean;
useMerchantInJournalLine: boolean;
splitExpenseGrouping: boolean;
cccDateConfiguration: boolean;
cccExportGroupConfiguration: boolean;
isEmployeeMappingFixed: boolean;
transformContentToSentenceCase: boolean;
lowerCaseConversion: boolean;
allowAccountsPayableInCoCCC: boolean;
allowBankAccountInCoCCC: boolean;
},
importSettings: {
tax: boolean;
Expand All @@ -41,7 +34,6 @@ export type FeatureConfiguration = {
dependentField: boolean;
allowImportCode: boolean;
importSettingsV1: boolean;
intacctC1ImportSettings: boolean;
disableCustomerSourceField: boolean;
},
advancedSettings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class NetSuiteExportSettingModel extends ExportSettingModel {
}

static getCreditCardExportTypes(): SelectFormOption[] {
if (brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed) {
if (!brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed) {
return this.getCoCreditCardExportTypes();
}
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
<form [formGroup]="exportSettingsForm">
<div class="tw-p-24-px" [ngClass]="{'tw-pt-0': !brandingFeatureConfig.featureFlags.exportSettings.reimbursableExpenses}">
<div *ngIf="!brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed" class="tw-mb-16-px">
<div *ngIf="brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed" class="tw-mb-16-px">
<div *ngIf="brandingFeatureConfig.featureFlags.exportSettings.reimbursableExpenses" class="tw-rounded-lg tw-border-separator tw-border tw-bg-configuration-bg">
<app-configuration-toggle-field
[form]="exportSettingsForm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ export class IntacctExportSettingsComponent implements OnInit {
splitExpenseGrouping: new FormControl(this.exportSettings?.expense_group_settings?.split_expense_grouping)
});

if (brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed) {
if (!brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed) {
this.exportSettingsForm.controls.creditCardExpense.patchValue(true);
this.exportSettingsForm.controls.employeeFieldMapping.patchValue(FyleField.VENDOR);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
</app-configuration-select-field>
</div>

<div *ngIf="(!exportSettingForm.get('reimbursableExportType')?.value || brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed) && helperService.isFieldRequired(exportSettingForm, 'accountsPayable')">
<div *ngIf="(!exportSettingForm.get('reimbursableExportType')?.value || !brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed) && helperService.isFieldRequired(exportSettingForm, 'accountsPayable')">
<app-configuration-select-field
[form]="exportSettingForm"
[destinationAttributes]="accountsPayables"
Expand All @@ -209,7 +209,7 @@
</app-configuration-select-field>
</div>

<div *ngIf="(!exportSettingForm.get('reimbursableExportType')?.value || brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed) && helperService.isFieldRequired(exportSettingForm, 'bankAccount')">
<div *ngIf="(!exportSettingForm.get('reimbursableExportType')?.value || !brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed) && helperService.isFieldRequired(exportSettingForm, 'bankAccount')">
<app-configuration-select-field
[form]="exportSettingForm"
[destinationAttributes]="bankAccounts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
</div>
</div>

<div *ngIf="!brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed" class="tw-mt-16-px tw-bg-white tw-border tw-border-solid tw-border-border-tertiary tw-rounded-12-px">
<div *ngIf="brandingFeatureConfig.featureFlags.exportSettings.isReimbursableExpensesAllowed" class="tw-mt-16-px tw-bg-white tw-border tw-border-solid tw-border-border-tertiary tw-rounded-12-px">
<form [formGroup]="employeeSettingForm">
<app-configuration-select-field
[form]="employeeSettingForm"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="tw-text-form-error-help-text-color tw-text-12-px tw-font-400 tw-pt-4-px tw-max-w-300-px tw-flex tw-text-pretty tw-items-center">
<app-svg-icon *ngIf="brandingFeatureConfig.featureFlags.c1Icon" [c1SvgSource]="'grv-caution-triangle-critical-small'" [width]="'14px'" [height]="'14px'" [styleClasses]="'tw-pr-4-px tw-text-form-error-icon-color'" [isTextColorAllowed]="true"></app-svg-icon>
<app-svg-icon *ngIf="brandingFeatureConfig.featureFlags.useCustomIcon" [c1SvgSource]="'grv-caution-triangle-critical-small'" [width]="'14px'" [height]="'14px'" [styleClasses]="'tw-pr-4-px tw-text-form-error-icon-color'" [isTextColorAllowed]="true"></app-svg-icon>
<span *ngIf="listName">Please select {{ listName }} from the list</span>
<span *ngIf="customErrorMessage">{{ customErrorMessage }}</span>
</div>
Expand Down

0 comments on commit bee5bde

Please sign in to comment.