Skip to content

Commit

Permalink
Read only field update in Intacct (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 authored Mar 12, 2024
1 parent 9090fc5 commit dddc0fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
[formControllerName]="'cccExpenseState'"></app-configuration-select-field>
</div>
<div *ngIf="exportSettingsForm.value.cccExportType" class="tw-mt-16-px tw-bg-white tw-border tw-border-solid tw-border-separator tw-rounded-12-px">
<app-configuration-select-field *ngIf="exportSettingsForm.value.cccExportType!==IntacctCorporateCreditCardExpensesObject.CHARGE_CARD_TRANSACTION"
<app-configuration-select-field
[form]="exportSettingsForm"
[isFieldMandatory]="true"
[mandatoryErrorListName]="'how expenses to be grouped'"
Expand All @@ -248,20 +248,6 @@
[iconPath]="'question-square-outline'"
[placeholder]="'Select expense grouping'"
[formControllerName]="'cccExportGroup'"></app-configuration-select-field>
<div *ngIf="exportSettingsForm.value.cccExportType===IntacctCorporateCreditCardExpensesObject.CHARGE_CARD_TRANSACTION">
<div class="tw-p-24-px tw-flex tw-flex-row tw-justify-between tw-items-center">
<div class="tw-flex tw-items-start lg:tw-w-3/5 md:tw-w-1/2">
<app-svg-icon [svgSource]="'list'" [width]="'24px'" [height]="'24px'" [styleClasses]="'tw-text-mandatory-field-color'"></app-svg-icon>
<div class="lg:tw-w-3/5 md:tw-w-1/2 tw-pl-6">
<h4 class="!tw-text-14-px !tw-font-500">How should the expenses be grouped?<app-mandatory-field></app-mandatory-field></h4>
<h5 class="!tw-text-text-muted !tw-font-400 !tw-text-14-px tw-pt-6-px !tw-leading-4">Expenses can either be exported as single line items (Expense) or as a grouped report with multiple line items (Expense Report).</h5>
</div>
</div>
<div class="tw-pl-18-px tw-pt-18-px">
<input type="text" class="tw-text-14-px !tw-font-500 tw-w-300-px !tw-px-10-px !tw-py-8-px tw-border tw-border-solid !tw-border-separator tw-rounded-4-px" formControlName="cccExportGroup">
</div>
</div>
</div>
</div>
<div *ngIf="exportSettingsForm.value.cccExportType" class="tw-mt-16-px tw-bg-white tw-border tw-border-solid tw-border-separator tw-rounded-12-px">
<app-configuration-select-field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export class IntacctExportSettingsComponent implements OnInit {
cccExportTypeControl.valueChanges.subscribe((cccExport) => {
if (cccExport === IntacctCorporateCreditCardExpensesObject.CHARGE_CARD_TRANSACTION) {
cccExportGroup?.disable();
cccExportGroup?.setValue('Expense');
cccExportGroup?.setValue(this.expenseGroupingFieldOptions[0].value);
} else {
cccExportGroup?.enable();
}
Expand Down Expand Up @@ -419,7 +419,7 @@ export class IntacctExportSettingsComponent implements OnInit {
}

if (this.exportSettings?.configurations?.corporate_credit_card_expenses_object === IntacctCorporateCreditCardExpensesObject.CHARGE_CARD_TRANSACTION) {
this.exportSettingsForm.controls.cccExportGroup.setValue('Expense');
this.exportSettingsForm.controls.cccExportGroup.setValue(this.expenseGroupingFieldOptions[0].value);
this.exportSettingsForm.controls.cccExportGroup.disable();
}
this.createReimbursableExpenseWatcher();
Expand Down

0 comments on commit dddc0fc

Please sign in to comment.