Skip to content

Commit

Permalink
export settings fix (#905)
Browse files Browse the repository at this point in the history
* export settings fix

* sage 300 commitment fix
  • Loading branch information
DhaaraniCIT committed Aug 20, 2024
1 parent 3621253 commit 09854d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export class NetsuiteExportSettingsService {

const isFieldMandatory = NetSuiteExportSettingModel.getMandatoryField(form, formController);
if (isFieldMandatory) {
this.mandatoryFormController.push(formController);
if (!this.mandatoryFormController.includes(formController)) {
this.mandatoryFormController.push(formController);
}
HelperUtility.markControllerAsRequired(form, formController);
} else {
HelperUtility.clearValidatorAndResetValue(form, formController);
Expand All @@ -58,9 +60,9 @@ export class NetsuiteExportSettingsService {
}

setExportTypeValidatorsAndWatchers(exportTypeValidatorRule: ExportModuleRule[], form: FormGroup): void {
this.mandatoryFormController = [];
Object.values(exportTypeValidatorRule).forEach((values) => {
form.controls[values.formController].valueChanges.subscribe((selectedValue) => {
this.mandatoryFormController = [];
this.setupDynamicValidators(form, values, selectedValue);
});
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div>
<p-dialog [dismissableMask]="true" [showHeader]="false" [modal]="true" [(visible)]="showCustomFieldCreationDialog" [draggable]="false" [style]="{width: '468px'}">
<p-dialog [dismissableMask]="false" [showHeader]="false" [modal]="true" [(visible)]="showCustomFieldCreationDialog" [draggable]="false" [style]="{width: '468px'}">
<div [formGroup]="customFieldForm">
<div class="tw-p-24-px tw-border-b-1-px tw-border-b-divider-border-color">
<div class="tw-flex tw-justify-between tw-items-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5 *ngIf="!isCloneSettingView" class="!tw-text-text-muted tw-text-14-px !tw-fon
</div>
<p-inputSwitch class="input-toggle-section tw-pt-24-px" formControlName="dependentFieldImportToggle" [disabled]="true"></p-inputSwitch>
</div>
<div *ngIf="appName === AppName.SAGE300" class="tw-flex tw-mt-24-px">
<div *ngIf="appName === AppName.SAGE300" class="tw-flex tw-mt-24-px" [ngClass]="{'fyle': brandingConfig.brandId !== 'co', 'co': brandingConfig.brandId === 'co'}">
<label class="container tw-pl-24-px tw-text-14-px tw-text-form-label-text-color">Auto-Export Commitment based on the Cost Code and Cost Category.
<a class="tw-text-link-primary tw-w-fit tw-cursor-pointer tw-inline-flex tw-items-center"
(click)="windowService.openInNewTab(commitmentFieldSupportArticleLink)">
Expand Down

0 comments on commit 09854d4

Please sign in to comment.