Upgrade/angular 14 (#1853)
* Fix Loan product Payment Allocation * Upgrade to Angular 14 --------- Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
2dab3b70ca
commit
80936a3ea9
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ClientsService } from 'app/clients/clients.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
@@ -17,12 +17,12 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
})
|
||||
export class CreateUserComponent implements OnInit {
|
||||
/** Create Client Form */
|
||||
createUserForm: FormGroup;
|
||||
createUserForm: UntypedFormGroup;
|
||||
|
||||
/** Denotes type of user. */
|
||||
userTypes = ['Existing User', 'New User'];
|
||||
/** Radio button group form control for type of user. */
|
||||
userType = new FormControl(this.userTypes[0]);
|
||||
userType = new UntypedFormControl(this.userTypes[0]);
|
||||
/** Placeholder for office data. */
|
||||
offices: any[] = [];
|
||||
/** Placeholder for staff data. */
|
||||
@@ -41,7 +41,7 @@ export class CreateUserComponent implements OnInit {
|
||||
/**
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private clientService: ClientsService,
|
||||
private settingsService: SettingsService) {
|
||||
|
||||
@@ -45,15 +45,6 @@ export class UserService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a self service user.
|
||||
*
|
||||
* TODO: Mock data to be replaced once API is available.
|
||||
*/
|
||||
getUser(): Observable<any> {
|
||||
return this.http.disableApiPrefix().get('/assets/mock/user.mock.json');
|
||||
}
|
||||
|
||||
/**
|
||||
* Change User Password.
|
||||
* @param userId User Id of users
|
||||
|
||||
@@ -6,10 +6,10 @@ import { Resolve } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { UserService } from '../user.service';
|
||||
|
||||
/** Custom Model */
|
||||
import { User } from '../user.model';
|
||||
import { UsersService } from 'app/users/users.service';
|
||||
|
||||
/**
|
||||
* View self service user data resolver.
|
||||
@@ -20,14 +20,14 @@ export class ViewUserResolver implements Resolve<Object> {
|
||||
/**
|
||||
* @param {UserService} userService Self service user service.
|
||||
*/
|
||||
constructor(private userService: UserService) {}
|
||||
constructor(private userService: UsersService) {}
|
||||
|
||||
/**
|
||||
* Returns the user data.
|
||||
* @returns {Observable<User>}
|
||||
*/
|
||||
resolve(): Observable<User> {
|
||||
return this.userService.getUser();
|
||||
return this.userService.getUser('1');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user