feat: create group loan aplication functionality added (#1460)

* feat: create group loan aplication functionality added

* lint fixes

* lint fix
This commit is contained in:
Ramveer
2022-07-15 19:22:34 +05:30
committed by GitHub
parent dd4e31e56d
commit 4a40b5eca7
5 changed files with 23 additions and 14 deletions
@@ -88,9 +88,10 @@ export class LoansAccountDetailsStepComponent implements OnInit {
* Fetches loans account product template on productId value changes
*/
buildDependencies() {
const clientId = this.loansAccountTemplate.clientId;
const entityId = (this.loansAccountTemplate.clientId) ? this.loansAccountTemplate.clientId : this.loansAccountTemplate.group.id;
const isGroup = (this.loansAccountTemplate.clientId) ? false : true;
this.loansAccountDetailsForm.get('productId').valueChanges.subscribe((productId: string) => {
this.loansService.getLoansAccountTemplateResource(clientId, productId).subscribe((response: any) => {
this.loansService.getLoansAccountTemplateResource(entityId, isGroup, productId).subscribe((response: any) => {
this.loansAccountProductTemplate.emit(response);
this.loanOfficerOptions = response.loanOfficerOptions;
this.loanPurposeOptions = response.loanPurposeOptions;