|
|
|
@ -8,6 +8,7 @@ import { SetupUser } from '../../models/user';
|
|
|
|
import { UserSetupService } from '../../services/user-setup.service';
|
|
|
|
import { UserSetupService } from '../../services/user-setup.service';
|
|
|
|
import { UserFilterPipe } from '../../shared/pipes/userFilterPipe';
|
|
|
|
import { UserFilterPipe } from '../../shared/pipes/userFilterPipe';
|
|
|
|
import { FormBuilder, Validators, FormGroup } from '@angular/forms';
|
|
|
|
import { FormBuilder, Validators, FormGroup } from '@angular/forms';
|
|
|
|
|
|
|
|
import { ButtonManagementService } from '../../services/button-management.service';
|
|
|
|
import { StorageService } from '../../shared/services/storage.service';
|
|
|
|
import { StorageService } from '../../shared/services/storage.service';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -33,13 +34,20 @@ export class SetupUserComponent implements OnInit {
|
|
|
|
renewalDataExpanded: boolean = true;
|
|
|
|
renewalDataExpanded: boolean = true;
|
|
|
|
totalCount: number = 0;
|
|
|
|
totalCount: number = 0;
|
|
|
|
mode: 'edit' | 'view' = 'view';
|
|
|
|
mode: 'edit' | 'view' = 'view';
|
|
|
|
|
|
|
|
buttonPermissions: any;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor(private userService: UserSetupService, private fb: FormBuilder, private storageService: StorageService){}
|
|
|
|
constructor(
|
|
|
|
|
|
|
|
private userService: UserSetupService,
|
|
|
|
|
|
|
|
private fb: FormBuilder,
|
|
|
|
|
|
|
|
private buttonManagementService: ButtonManagementService,
|
|
|
|
|
|
|
|
private storageService: StorageService
|
|
|
|
|
|
|
|
){}
|
|
|
|
|
|
|
|
|
|
|
|
get users$(){
|
|
|
|
get users$(){
|
|
|
|
return this.userService.users$;
|
|
|
|
return this.userService.users$;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onSearch(value: string): void {
|
|
|
|
onSearch(value: string): void {
|
|
|
|
this.searchText = value;
|
|
|
|
this.searchText = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -117,6 +125,9 @@ export class SetupUserComponent implements OnInit {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void {
|
|
|
|
ngOnInit(): void {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.getButtonPermissions();
|
|
|
|
|
|
|
|
|
|
|
|
this.userForm = this.fb.group({
|
|
|
|
this.userForm = this.fb.group({
|
|
|
|
userId: ['', [Validators.required]],
|
|
|
|
userId: ['', [Validators.required]],
|
|
|
|
userFullname: ['', [Validators.required, Validators.maxLength(500)]],
|
|
|
|
userFullname: ['', [Validators.required, Validators.maxLength(500)]],
|
|
|
|
@ -139,4 +150,8 @@ ngOnInit(): void {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getButtonPermissions(){
|
|
|
|
|
|
|
|
this.buttonPermissions = this.buttonManagementService.buttonPermissions["setupUser"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|