From e40bb0d8ace273949792711d29ede8f3599c278c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Alberto=20Hern=C3=A1ndez?= <44206706+josehernandezfintecheandomx@users.noreply.github.com> Date: Thu, 9 Mar 2023 10:53:17 -0600 Subject: [PATCH] Fix for adding an user without staff (#1701) Co-authored-by: Jose Alberto Hernandez --- .../loans-account-preview-step.component.html | 2 +- src/app/users/create-user/create-user.component.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.html b/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.html index 68d310f09..4cb1175fa 100644 --- a/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.html +++ b/src/app/loans/loans-account-stepper/loans-account-preview-step/loans-account-preview-step.component.html @@ -115,7 +115,7 @@
Arrears tolerance: {{loansAccount.inArrearsTolerance}} {{loansAccountProductTemplate.currency.displaySymbol}} + fxFlex="60%">{{loansAccount.inArrearsTolerance}}
diff --git a/src/app/users/create-user/create-user.component.ts b/src/app/users/create-user/create-user.component.ts index c223e77ab..8e4de2f60 100644 --- a/src/app/users/create-user/create-user.component.ts +++ b/src/app/users/create-user/create-user.component.ts @@ -126,6 +126,9 @@ export class CreateUserComponent implements OnInit, AfterViewInit { */ submit() { const user = this.userForm.value; + if (this.userForm.value.staffId == null || this.userForm.value.staffId === '') { + delete user.staffId; + } this.usersService.createUser(user).subscribe((response: any) => { if (this.configurationWizardService.showUsersForm === true) { this.configurationWizardService.showUsersForm = false;