From 6615b646205ce960ea2d5debdb4c9924b9f5f5e1 Mon Sep 17 00:00:00 2001 From: Felix van Hove Date: Sat, 22 Mar 2025 20:58:37 +0100 Subject: [PATCH] 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 --- .../groups-view/groups-view.component.html | 32 +++++++++++-------- .../create-gsim-account.component.ts | 6 +++- ...avings-account-charges-step.component.html | 2 +- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/app/groups/groups-view/groups-view.component.html b/src/app/groups/groups-view/groups-view.component.html index 27d8c5963..b5409c871 100644 --- a/src/app/groups/groups-view/groups-view.component.html +++ b/src/app/groups/groups-view/groups-view.component.html @@ -114,20 +114,24 @@ - - + + + + + + diff --git a/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.ts b/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.ts index 96afec1d1..92e0e7b8a 100644 --- a/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.ts +++ b/src/app/savings/gsim-account/create-gsim-account/create-gsim-account.component.ts @@ -94,7 +94,11 @@ export class CreateGsimAccountComponent { * Checks validity of overall savings account form. */ 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 + ); } /** diff --git a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html index 0f2f78f3e..9591e12c1 100644 --- a/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html +++ b/src/app/savings/savings-account-stepper/savings-account-charges-step/savings-account-charges-step.component.html @@ -159,7 +159,7 @@ {{ 'labels.buttons.Previous' | translate }} -