update icon update password

This commit is contained in:
Fuzi_fauzia 2024-07-09 16:20:28 +07:00
parent f86f727ac7
commit 1ed4ad5da0
3 changed files with 59 additions and 66 deletions

View File

@ -48,10 +48,9 @@
></i> ></i>
</button> </button>
</div> --> </div> -->
<div class="form-group position-relative"> <div class="form-group">
<label for="newPass" style="color: #ffffff" <label for="newPass" style="color: #ffffff">New Password</label>
>New Password</label <div class="input-group">
>
<input <input
[type]="showNewPass ? 'text' : 'password'" [type]="showNewPass ? 'text' : 'password'"
id="newPass" id="newPass"
@ -63,39 +62,35 @@
'is-invalid': submitted && f.newPass.errors 'is-invalid': submitted && f.newPass.errors
}" }"
/> />
<div class="input-group-append">
<button
type="button"
class="btn btn-link"
(click)="toggleNewPassVisibility()"
style="color: #c3f164 !important;"
>
<i [class]="showNewPass ? 'fa fa-eye-slash' : 'fa fa-eye'"></i>
</button>
</div>
</div>
<small <small
class="form-text text-muted danger" class="form-text text-muted danger"
*ngIf="submitted && f.newPass.errors" *ngIf="submitted && f.newPass.errors"
class="invalid-feedback" class="invalid-feedback"
> >
<div *ngIf="f.newPass.errors.required"> <div *ngIf="f.newPass.errors.required">New Password is required</div>
New Password is required
</div>
<div *ngIf="f.newPass.errors.minlength"> <div *ngIf="f.newPass.errors.minlength">
New Password must be at least 8 characters long New Password must be at least 8 characters long
</div> </div>
<div *ngIf="f.newPass.errors.pattern"> <div *ngIf="f.newPass.errors.pattern">
New Password must contain at least one uppercase New Password must contain at least one uppercase letter, one lowercase letter, and one number
letter, one lowercase letter, and one number
</div> </div>
</small> </small>
<button
type="button"
class="btn btn-link position-absolute"
(click)="toggleNewPassVisibility()"
style="top: 30px; right: 10px; color: #c3f164 !important;"
>
<i
[class]="
showNewPass ? 'fa fa-eye-slash' : 'fa fa-eye'
"
></i>
</button>
</div> </div>
<div class="form-group position-relative">
<label for="confirmPass" style="color: #ffffff" <div class="form-group">
>Confirm Password</label <label for="confirmPass" style="color: #ffffff">Confirm Password</label>
> <div class="input-group">
<input <input
[type]="showConfirmPass ? 'text' : 'password'" [type]="showConfirmPass ? 'text' : 'password'"
id="confirmPass" id="confirmPass"
@ -107,30 +102,27 @@
'is-invalid': submitted && f.confirmPass.errors 'is-invalid': submitted && f.confirmPass.errors
}" }"
/> />
<div class="input-group-append">
<button
type="button"
class="btn btn-link"
(click)="toggleConfirmPassVisibility()"
style="color: #c3f164 !important;"
>
<i [class]="showConfirmPass ? 'fa fa-eye-slash' : 'fa fa-eye'"></i>
</button>
</div>
</div>
<small <small
class="form-text text-muted danger" class="form-text text-muted danger"
*ngIf="submitted && f.confirmPass.errors" *ngIf="submitted && f.confirmPass.errors"
class="invalid-feedback" class="invalid-feedback"
> >
<div *ngIf="f.confirmPass.errors.required"> <div *ngIf="f.confirmPass.errors.required">Confirm Password is required</div>
Confirm Password is required
</div>
<div *ngIf="f.confirmPass.errors.matchPassword"> <div *ngIf="f.confirmPass.errors.matchPassword">
Confirm Password must match the New Password Confirm Password must match the New Password
</div> </div>
</small> </small>
<button
type="button"
class="btn btn-link position-absolute"
(click)="toggleConfirmPassVisibility()"
style="top: 30px; right: 10px; color: #c3f164 !important;"
>
<i
[class]="
showConfirmPass ? 'fa fa-eye-slash' : 'fa fa-eye'
"
></i>
</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -26,10 +26,10 @@ export class HttpErrorInterceptorService {
}); });
// this.router.navigate(['/error/error404']); // this.router.navigate(['/error/error404']);
} else if (error.status === 500) { } else if (error.status === 500) {
this.toastr.error("Error", error.message, { // this.toastr.error("Error", error.message, {
timeOut: 3000, // timeOut: 3000,
closeButton: true, // closeButton: true,
}); // });
// this.router.navigate(['/error/error500']); // this.router.navigate(['/error/error500']);
} else if (error.status === 502) { } else if (error.status === 502) {
this.toastr.error("Error", error.message, { this.toastr.error("Error", error.message, {

View File

@ -96,6 +96,7 @@ export class LoginComponent implements OnInit {
this.router.navigate(["/monitoring"]); this.router.navigate(["/monitoring"]);
}, },
(error) => { (error) => {
this.submitted = false;
this.toastr.error("Error", "Akun yang anda masukan salah!", { this.toastr.error("Error", "Akun yang anda masukan salah!", {
timeOut: 5000, timeOut: 5000,
closeButton: true, closeButton: true,