File tree 1 file changed +6
-3
lines changed
src/app/savings/gsim-account/create-gsim-account
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export class CreateGsimAccountComponent {
118
118
}
119
119
120
120
/** Set Body for each client selected */
121
- setData ( client : any ) : any {
121
+ setData ( client : any , isParentAccount : any ) : any {
122
122
const locale = this . settingsService . language . code ;
123
123
const dateFormat = this . settingsService . dateFormat ;
124
124
const monthDayFormat = 'dd MMMM' ;
@@ -130,7 +130,7 @@ export class CreateGsimAccountComponent {
130
130
} ) ) ,
131
131
clientId : client . id ,
132
132
isGSIM : true ,
133
- isParentAccount : true ,
133
+ isParentAccount : isParentAccount ,
134
134
submittedOnDate : this . dateUtils . formatDate ( this . savingsAccount . submittedOnDate , dateFormat ) ,
135
135
dateFormat,
136
136
monthDayFormat,
@@ -146,7 +146,10 @@ export class CreateGsimAccountComponent {
146
146
const requestData = [ ] ;
147
147
const memberSelected = this . selectedMembers . selectedMembers ;
148
148
for ( let index = 0 ; index < 1 ; index ++ ) {
149
- requestData . push ( this . setData ( memberSelected [ index ] ) ) ;
149
+ requestData . push ( this . setData ( memberSelected [ index ] , true ) ) ;
150
+ }
151
+ for ( let index = 1 ; index < memberSelected . length ; index ++ ) {
152
+ requestData . push ( this . setData ( memberSelected [ index ] , false ) ) ;
150
153
}
151
154
return requestData ;
152
155
}
You can’t perform that action at this time.
0 commit comments