|
|
|
@ -1,5 +1,5 @@
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
|
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
|
|
import { TranslateModule } from '@ngx-translate/core';
|
|
|
|
import { TranslateModule } from '@ngx-translate/core';
|
|
|
|
@ -15,11 +15,12 @@ import { HttpURIService } from '../../app.http.uri.service';
|
|
|
|
import { I18NService } from '../../services/i18n.service';
|
|
|
|
import { I18NService } from '../../services/i18n.service';
|
|
|
|
import { SuccessMessages, ErrorMessages } from '../../utils/enums';
|
|
|
|
import { SuccessMessages, ErrorMessages } from '../../utils/enums';
|
|
|
|
import { ResetPasswordModalComponent } from '../reset-password-modal/reset-password-modal.component';
|
|
|
|
import { ResetPasswordModalComponent } from '../reset-password-modal/reset-password-modal.component';
|
|
|
|
|
|
|
|
import { PasswordHideShowComponent } from '../../shared/components/password-hide-show/password-hide-show.component';
|
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
@Component({
|
|
|
|
selector: 'app-setup-user',
|
|
|
|
selector: 'app-setup-user',
|
|
|
|
standalone: true,
|
|
|
|
standalone: true,
|
|
|
|
imports: [TranslateModule, ReactiveFormsModule, FormsModule, CommonModule, NgSelectModule, TableFilterPipe, ResetPasswordModalComponent],
|
|
|
|
imports: [TranslateModule, ReactiveFormsModule, FormsModule, CommonModule, NgSelectModule, TableFilterPipe, ResetPasswordModalComponent, PasswordHideShowComponent],
|
|
|
|
templateUrl: './setup-user.component.html',
|
|
|
|
templateUrl: './setup-user.component.html',
|
|
|
|
styleUrl: './setup-user.component.scss'
|
|
|
|
styleUrl: './setup-user.component.scss'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
@ -39,7 +40,7 @@ export class SetupUserComponent implements OnInit {
|
|
|
|
renewalDataExpanded: boolean = true;
|
|
|
|
renewalDataExpanded: boolean = true;
|
|
|
|
totalCount: number = 0;
|
|
|
|
totalCount: number = 0;
|
|
|
|
mode: 'create' | 'edit' = 'create';
|
|
|
|
mode: 'create' | 'edit' = 'create';
|
|
|
|
|
|
|
|
passwordType: string = 'password';
|
|
|
|
userSetupDataExpanded: boolean = true;
|
|
|
|
userSetupDataExpanded: boolean = true;
|
|
|
|
buttonPermissions: any;
|
|
|
|
buttonPermissions: any;
|
|
|
|
isLoading: boolean = false;
|
|
|
|
isLoading: boolean = false;
|
|
|
|
@ -52,6 +53,7 @@ export class SetupUserComponent implements OnInit {
|
|
|
|
{ label: 'Admin', value: 'ADMIN' },
|
|
|
|
{ label: 'Admin', value: 'ADMIN' },
|
|
|
|
{ label: 'User', value: 'USER' },
|
|
|
|
{ label: 'User', value: 'USER' },
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
@ViewChild('passShowSetupUser') passwordHideShow?: PasswordHideShowComponent;
|
|
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
constructor(
|
|
|
|
private fb: FormBuilder,
|
|
|
|
private fb: FormBuilder,
|
|
|
|
@ -61,6 +63,9 @@ export class SetupUserComponent implements OnInit {
|
|
|
|
private i18nService: I18NService
|
|
|
|
private i18nService: I18NService
|
|
|
|
) {}
|
|
|
|
) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
toggleSetupPass() {
|
|
|
|
|
|
|
|
this.passwordType = this.passwordHideShow?.showPassword ? 'password' : 'text';
|
|
|
|
|
|
|
|
}
|
|
|
|
onSearch(value: string): void {
|
|
|
|
onSearch(value: string): void {
|
|
|
|
this.searchText = value;
|
|
|
|
this.searchText = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|