|
|
|
|
@ -1,17 +1,27 @@
|
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
|
import { Component, ViewChild } from '@angular/core';
|
|
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
|
|
import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
|
|
import { TranslateModule } from '@ngx-translate/core';
|
|
|
|
|
import { PasswordHideShowComponent } from '../../shared/components/password-hide-show/password-hide-show.component';
|
|
|
|
|
|
|
|
|
|
import { StorageService } from '../../shared/services/storage.service';
|
|
|
|
|
import { Router } from '@angular/router';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-change-password',
|
|
|
|
|
imports: [TranslateModule, FormsModule, ReactiveFormsModule, CommonModule, PasswordHideShowComponent],
|
|
|
|
|
imports: [TranslateModule, FormsModule, ReactiveFormsModule, CommonModule, PasswordHideShowComponent,],
|
|
|
|
|
templateUrl: './change-password.component.html',
|
|
|
|
|
styleUrl: './change-password.component.scss'
|
|
|
|
|
})
|
|
|
|
|
export class ChangePasswordComponent {
|
|
|
|
|
|
|
|
|
|
export class ChangePasswordComponent{
|
|
|
|
|
isFirstLogin = false;
|
|
|
|
|
loginForm!: FormGroup;
|
|
|
|
|
currentLanguage = new FormControl();
|
|
|
|
|
httpService: any;
|
|
|
|
|
constructor(private storageService: StorageService, private router: Router){}
|
|
|
|
|
onLangChange() {
|
|
|
|
|
throw new Error('Method not implemented.');
|
|
|
|
|
}
|
|
|
|
|
passwordType: string = 'password';
|
|
|
|
|
passwordType1: string = 'password';
|
|
|
|
|
passwordType2: string = 'password';
|
|
|
|
|
@ -20,7 +30,6 @@ passwordType2: string = 'password';
|
|
|
|
|
@ViewChild('psh1') passwordHideShow1 ?: PasswordHideShowComponent;
|
|
|
|
|
@ViewChild('psh2') passwordHideShow2 ?: PasswordHideShowComponent;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
togglePasswordType() {
|
|
|
|
|
this.passwordType = this.passwordHideShow?.showPassword ? 'password' : 'text';
|
|
|
|
|
}
|
|
|
|
|
@ -31,4 +40,15 @@ passwordType2: string = 'password';
|
|
|
|
|
this.passwordType2 = this.passwordHideShow2?.showPassword ? 'password' : 'text';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void {
|
|
|
|
|
const fromMenu = history.state?.['fromMenu'];
|
|
|
|
|
if(fromMenu){
|
|
|
|
|
this.isFirstLogin = false;
|
|
|
|
|
}else{
|
|
|
|
|
const firstLoginFlag = this.storageService.getItem('firstLogin');
|
|
|
|
|
this.isFirstLogin = firstLoginFlag === 'true';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|