fix: Prevent GLIM and GSIM without members (#2340)
Makes sure GLIM and GSIM application menu item doesn't appear without members. (This has already been in place for JLG.) Make sure GSIM can't be created without members. Fixes: WEB-62
This commit is contained in:
@@ -114,20 +114,24 @@
|
|||||||
<button mat-menu-item *mifosxHasPermission="'CREATE_LOAN'" [routerLink]="['loans-accounts', 'create']">
|
<button mat-menu-item *mifosxHasPermission="'CREATE_LOAN'" [routerLink]="['loans-accounts', 'create']">
|
||||||
{{ 'labels.buttons.Group Loan Application' | translate }}
|
{{ 'labels.buttons.Group Loan Application' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<span *ngIf="groupViewData.clientMembers">
|
||||||
mat-menu-item
|
<button
|
||||||
*mifosxHasPermission="'CREATE_LOAN'"
|
mat-menu-item
|
||||||
[routerLink]="['loans-accounts', 'glim-account', 'create']"
|
*mifosxHasPermission="'CREATE_LOAN'"
|
||||||
>
|
[routerLink]="['loans-accounts', 'glim-account', 'create']"
|
||||||
{{ 'labels.buttons.GLIM Application' | translate }}
|
>
|
||||||
</button>
|
{{ 'labels.buttons.GLIM Application' | translate }}
|
||||||
<button
|
</button>
|
||||||
mat-menu-item
|
</span>
|
||||||
*mifosxHasPermission="'CREATE_GSIMACCOUNT'"
|
<span *ngIf="groupViewData.clientMembers">
|
||||||
[routerLink]="['savings-accounts', 'gsim-account', 'create']"
|
<button
|
||||||
>
|
mat-menu-item
|
||||||
{{ 'labels.buttons.GSIM Application' | translate }}
|
*mifosxHasPermission="'CREATE_GSIMACCOUNT'"
|
||||||
</button>
|
[routerLink]="['savings-accounts', 'gsim-account', 'create']"
|
||||||
|
>
|
||||||
|
{{ 'labels.buttons.GSIM Application' | translate }}
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
||||||
<button mat-menu-item [matMenuTriggerFor]="More">{{ 'labels.buttons.More' | translate }}</button>
|
<button mat-menu-item [matMenuTriggerFor]="More">{{ 'labels.buttons.More' | translate }}</button>
|
||||||
|
|||||||
@@ -94,7 +94,11 @@ export class CreateGsimAccountComponent {
|
|||||||
* Checks validity of overall savings account form.
|
* Checks validity of overall savings account form.
|
||||||
*/
|
*/
|
||||||
get savingsAccountFormValid() {
|
get savingsAccountFormValid() {
|
||||||
return this.savingsAccountDetailsForm.valid && this.savingsAccountTermsForm.valid;
|
return (
|
||||||
|
this.savingsAccountDetailsForm.valid &&
|
||||||
|
this.savingsAccountTermsForm.valid &&
|
||||||
|
this.activeClientMembers.filter((m: any) => m.selected).length > 0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -159,7 +159,7 @@
|
|||||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||||
{{ 'labels.buttons.Previous' | translate }}
|
{{ 'labels.buttons.Previous' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button mat-raised-button matStepperNext>
|
<button mat-raised-button matStepperNext [disabled]="selectedClientMembers.selectedMembers.length === 0">
|
||||||
{{ 'labels.buttons.Next' | translate }}
|
{{ 'labels.buttons.Next' | translate }}
|
||||||
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user