|
|
|
|
@ -12,6 +12,7 @@ import { SharedDataService } from 'src/app/hmg-common/services/shared-data-servi
|
|
|
|
|
import {LoginComponent} from "src/app/authentication/login/login.component";
|
|
|
|
|
import { Password } from '../models/password';
|
|
|
|
|
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
|
|
|
|
|
//import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-change-password',
|
|
|
|
|
@ -28,6 +29,11 @@ export class ChangePasswordComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
userData: any = {};
|
|
|
|
|
public isExpiredPwd: boolean = false;
|
|
|
|
|
public NEW_PASSWORD: boolean = false;
|
|
|
|
|
public Confirm_NEW_PASSWORD: boolean = false;
|
|
|
|
|
public OLD_PASSWORD: boolean = false;
|
|
|
|
|
//public profile_form: FormGroup;
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
|
public cs: CommonService,
|
|
|
|
|
public authService: AuthenticationService,
|
|
|
|
|
@ -36,7 +42,9 @@ export class ChangePasswordComponent implements OnInit {
|
|
|
|
|
public ts: TranslatorService,
|
|
|
|
|
public smsService: SmsReaderService,
|
|
|
|
|
public changeDetector: ChangeDetectorRef,
|
|
|
|
|
public sharedData: SharedDataService) {
|
|
|
|
|
public sharedData: SharedDataService,
|
|
|
|
|
// public formBuilder: FormBuilder,
|
|
|
|
|
) {
|
|
|
|
|
console.log("change password constructor");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -48,6 +56,11 @@ export class ChangePasswordComponent implements OnInit {
|
|
|
|
|
this.P_USER_NAME =data.P_USER_NAME;
|
|
|
|
|
console.log(this.isExpiredPwd);
|
|
|
|
|
console.log(this.P_USER_NAME);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.profile_form = this.formBuilder.group({
|
|
|
|
|
// password: ['', Validators.compose([Validators.minLength(8)])]
|
|
|
|
|
// });
|
|
|
|
|
// this.authService
|
|
|
|
|
// .loadAuthenticatedUser()
|
|
|
|
|
// .subscribe((user: AuthenticatedUser) => {
|
|
|
|
|
@ -119,6 +132,43 @@ export class ChangePasswordComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
onChangeCNP(){
|
|
|
|
|
// in UAT Alow to the length of password less than 8
|
|
|
|
|
// so if we ready to go life change it to >= 8
|
|
|
|
|
if (this.P_Confirm_NEW_PASSWORD.length >= 3) {
|
|
|
|
|
this.Confirm_NEW_PASSWORD=true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.Confirm_NEW_PASSWORD=false;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onChangeNP(){
|
|
|
|
|
// in UAT Alow to the length of password less than 8
|
|
|
|
|
// so if we ready to go life change it to >= 8
|
|
|
|
|
if (this.P_NEW_PASSWORD.length >= 3) {
|
|
|
|
|
this.NEW_PASSWORD=true;
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.NEW_PASSWORD=false;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
onChangeOP(){
|
|
|
|
|
// in UAT Alow to the length of password less than 8
|
|
|
|
|
// so if we ready to go life change it to >= 8
|
|
|
|
|
if (this.P_OLD_PASSWORD.length >= 3) {
|
|
|
|
|
this.OLD_PASSWORD=true;
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.OLD_PASSWORD=false;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|