@@ -19,6 +19,7 @@ import { StatusLookupPipe } from '../../../pipes/status-lookup.pipe';
1919import { AccountsFilterPipe } from '../../../pipes/accounts-filter.pipe' ;
2020import { DateFormatPipe } from '../../../pipes/date-format.pipe' ;
2121import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module' ;
22+ import { GroupsService } from '../../groups.service' ;
2223
2324/**
2425 * Groups View General Tab Component.
@@ -123,11 +124,10 @@ export class GeneralTabComponent {
123124 /** Boolean for toggling savings accounts table */
124125 showClosedSavingAccounts = false ;
125126
126- /**
127- * Fetches group's related data from `resolve`
128- * @param {ActivatedRoute } route Activated Route.
129- */
130- constructor ( private route : ActivatedRoute ) {
127+ constructor (
128+ private route : ActivatedRoute ,
129+ private groupsService : GroupsService
130+ ) {
131131 this . route . data . subscribe (
132132 ( data : { groupAccountsData : any ; groupClientMembers : any ; groupSummary : any ; glimData : any ; gsimData : any } ) => {
133133 this . glimAccounts = data . glimData ;
@@ -143,6 +143,18 @@ export class GeneralTabComponent {
143143 } ) ;
144144 }
145145
146+ /**
147+ * Refreshes group account data from backend (for GSIM/GLIM status/balance update)
148+ */
149+ refreshAccounts ( groupId : string ) {
150+ this . groupsService . getGroupAccountsData ( groupId ) . subscribe ( ( data : any ) => {
151+ this . groupAccountData = data ;
152+ this . savingAccounts = data . savingsAccounts ;
153+ this . loanAccounts = data . loanAccounts ;
154+ // If GSIM/GLIM data is separate, fetch and update here as well
155+ } ) ;
156+ }
157+
146158 /**
147159 * Toggles loan accounts table.
148160 */
0 commit comments