Use of filter in the GL Account dropdown menus

This commit is contained in:
Jose Alberto Hernandez
2024-01-10 15:02:06 +01:00
committed by Adam Saghy
parent 6edb262028
commit 53d8436875
47 changed files with 807 additions and 626 deletions
@@ -20,17 +20,13 @@
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>{{"labels.inputs.Account"|translate}}</mat-label>
<mat-select required formControlName="glAccountId">
<mat-option *ngFor="let glAccount of glAccountData" [value]="glAccount.id">
{{ glAccount.name + ' (' + glAccount.glCode + ')' }}
</mat-option>
</mat-select>
<mat-error *ngIf="financialActivityMappingForm.controls.glAccountId.hasError('required')">
{{"labels.inputs.Account"|translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
</mat-error>
</mat-form-field>
<mifosx-gl-account-selector
[inputFormControl]="financialActivityMappingForm.controls.glAccountId"
[glAccountList]="glAccountData"
[required]="true"
[inputLabel]="'Account'"
>
</mifosx-gl-account-selector>
</div>
@@ -5,6 +5,7 @@ import { Router, ActivatedRoute } from '@angular/router';
/** Custom Services */
import { AccountingService } from '../../accounting.service';
import { GLAccount } from 'app/shared/models/general.model';
/**
* Create financial activity mapping component.
@@ -21,7 +22,7 @@ export class CreateFinancialActivityMappingComponent implements OnInit {
/** GL Account options. */
glAccountOptions: any;
/** GL Account data. */
glAccountData: any;
glAccountData: GLAccount[] = [];
/** Financial activity data. */
financialActivityData: any;
@@ -17,15 +17,13 @@
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-label>{{"labels.inputs.Account"|translate}}</mat-label>
<mat-select required formControlName="glAccountId">
<mat-option *ngFor="let glAccount of glAccountData" [value]="glAccount.id">
{{ glAccount.name + ' (' + glAccount.glCode + ')' }}
</mat-option>
</mat-select>
</mat-form-field>
<mifosx-gl-account-selector
[inputFormControl]="financialActivityMappingForm.controls.glAccountId"
[glAccountList]="glAccountData"
[required]="true"
[inputLabel]="'Account'"
>
</mifosx-gl-account-selector>
</div>
</mat-card-content>
@@ -5,6 +5,7 @@ import { Router, ActivatedRoute } from '@angular/router';
/** Custom Services */
import { AccountingService } from '../../accounting.service';
import { GLAccount } from 'app/shared/models/general.model';
/**
* Edit financial activity mapping component.
@@ -21,7 +22,7 @@ export class EditFinancialActivityMappingComponent implements OnInit {
/** GL Account options. */
glAccountOptions: any;
/** GL Account data. */
glAccountData: any;
glAccountData: GLAccount[] = [];
/** Financial activity data. */
financialActivityData: any;
/** Financial activity account ID. */
@@ -25,13 +25,11 @@
{{ financialActivityAccount?.financialActivityData.name }}
</div>
<div fxFlex="50%" class="header">
{{"labels.inputs.Account Name" | translate}}
</div>
<div fxFlex="50%">
{{ financialActivityAccount?.glAccountData.name }}
</div>
<mifosx-gl-account-display fxFlex="100%"
[glAccount]="financialActivityAccount?.glAccountData"
[accountTitle]="'Account Name'"
>
</mifosx-gl-account-display>
</div>