Fix for adding an user without staff (#1701)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-03-09 10:53:17 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 98196bde39
commit e40bb0d8ac
2 changed files with 4 additions and 1 deletions
@@ -115,7 +115,7 @@
<div fxFlexFill *ngIf="loansAccount.inArrearsTolerance">
<span fxFlex="40%">Arrears tolerance: </span>
<span
fxFlex="60%">{{loansAccount.inArrearsTolerance}}&nbsp;{{loansAccountProductTemplate.currency.displaySymbol}}</span>
fxFlex="60%">{{loansAccount.inArrearsTolerance}}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.graceOnInterestCharged">
@@ -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;