WEB-404 Required Field Validation Error Message Missing for Account Type Field in Create GL Account Form
This commit is contained in:
+24
-4
@@ -10,7 +10,12 @@
|
|||||||
{{ 'labels.inputs.accounting.' + accountType.value | translate }}
|
{{ 'labels.inputs.accounting.' + accountType.value | translate }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="glAccountForm.controls.type.hasError('required')">
|
<mat-error
|
||||||
|
*ngIf="
|
||||||
|
glAccountForm.controls.type.hasError('required') &&
|
||||||
|
(glAccountForm.controls.type.touched || glAccountForm.controls.type.dirty)
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }}
|
{{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }}
|
||||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||||
</mat-error>
|
</mat-error>
|
||||||
@@ -19,7 +24,12 @@
|
|||||||
<mat-form-field class="flex-48">
|
<mat-form-field class="flex-48">
|
||||||
<mat-label>{{ 'labels.inputs.Account Name' | translate }}</mat-label>
|
<mat-label>{{ 'labels.inputs.Account Name' | translate }}</mat-label>
|
||||||
<input matInput required formControlName="name" />
|
<input matInput required formControlName="name" />
|
||||||
<mat-error *ngIf="glAccountForm.controls.name.hasError('required')">
|
<mat-error
|
||||||
|
*ngIf="
|
||||||
|
glAccountForm.controls.name.hasError('required') &&
|
||||||
|
(glAccountForm.controls.name.touched || glAccountForm.controls.name.dirty)
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ 'labels.inputs.Account Name' | translate }} {{ 'labels.commons.is' | translate }}
|
{{ 'labels.inputs.Account Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||||
</mat-error>
|
</mat-error>
|
||||||
@@ -32,7 +42,12 @@
|
|||||||
{{ accountUsage.value }}
|
{{ accountUsage.value }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="glAccountForm.controls.usage.hasError('required')">
|
<mat-error
|
||||||
|
*ngIf="
|
||||||
|
glAccountForm.controls.usage.hasError('required') &&
|
||||||
|
(glAccountForm.controls.usage.touched || glAccountForm.controls.usage.dirty)
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ 'labels.inputs.Account Usage' | translate }} {{ 'labels.commons.is' | translate }}
|
{{ 'labels.inputs.Account Usage' | translate }} {{ 'labels.commons.is' | translate }}
|
||||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||||
</mat-error>
|
</mat-error>
|
||||||
@@ -41,7 +56,12 @@
|
|||||||
<mat-form-field class="flex-48">
|
<mat-form-field class="flex-48">
|
||||||
<mat-label>{{ 'labels.inputs.GL Code' | translate }}</mat-label>
|
<mat-label>{{ 'labels.inputs.GL Code' | translate }}</mat-label>
|
||||||
<input matInput required formControlName="glCode" />
|
<input matInput required formControlName="glCode" />
|
||||||
<mat-error *ngIf="glAccountForm.controls.glCode.hasError('required')">
|
<mat-error
|
||||||
|
*ngIf="
|
||||||
|
glAccountForm.controls.glCode.hasError('required') &&
|
||||||
|
(glAccountForm.controls.glCode.touched || glAccountForm.controls.glCode.dirty)
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ 'labels.inputs.GL Code' | translate }} {{ 'labels.commons.is' | translate }}
|
{{ 'labels.inputs.GL Code' | translate }} {{ 'labels.commons.is' | translate }}
|
||||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||||
</mat-error>
|
</mat-error>
|
||||||
|
|||||||
+3
-2
@@ -154,8 +154,6 @@ export class CreateGlAccountComponent implements OnInit, AfterViewInit {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.glAccountForm.get('type').setValue(this.accountTypeId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -163,6 +161,9 @@ export class CreateGlAccountComponent implements OnInit, AfterViewInit {
|
|||||||
* if successful redirects to view created account.
|
* if successful redirects to view created account.
|
||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
|
if (this.glAccountForm.invalid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.accountingService.createGlAccount(this.glAccountForm.value).subscribe((response: any) => {
|
this.accountingService.createGlAccount(this.glAccountForm.value).subscribe((response: any) => {
|
||||||
if (this.configurationWizardService.showChartofAccounts === true) {
|
if (this.configurationWizardService.showChartofAccounts === true) {
|
||||||
this.configurationWizardService.showChartofAccounts = false;
|
this.configurationWizardService.showChartofAccounts = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user