refactor: savings module (#1226)

See: #1196
This commit is contained in:
Karan Takalkar
2020-08-25 17:46:54 +05:30
committed by GitHub
parent f215e1aa96
commit efdd779aa9
30 changed files with 129 additions and 103 deletions
+3 -3
View File
@@ -140,11 +140,11 @@ export class SavingsService {
}
/**
* @param clientId Client Id assosciated with savings account.
* @param entityId Entity Id assosciated with savings account.
* @returns {Observable<any>} Savings account template.
*/
getSavingsAccountTemplate(clientId: string, productId?: string): Observable<any> {
let httpParams = new HttpParams().set('clientId', clientId);
getSavingsAccountTemplate(entityId: string, productId?: string, isGroup?: boolean): Observable<any> {
let httpParams = new HttpParams().set( isGroup ? 'groupId' : 'clientId', entityId);
httpParams = productId ? httpParams.set('productId', productId) : httpParams;
return this.http.get('/savingsaccounts/template', { params: httpParams });
}