Merge branch 'dev-pending-20-01-2026' of https://ct.mfsys.com.pk/aConnect/aConnect-UX into dev-pending-20-01-2026

dev-pending-20-01-2026
Naeem Ullah 6 days ago
commit da8aa6f51d

@ -46,7 +46,7 @@ export class ResetPasswordComponent implements OnInit{
initializeForm(): void { initializeForm(): void {
this.resetPasswordForm = this.fb.group({ this.resetPasswordForm = this.fb.group({
userId: ['', Validators.required], // Changed to empty string and required userId: [null, Validators.required], // Changed to empty string and required
newPassword: ['', [ newPassword: ['', [
Validators.required, Validators.required,
Validators.minLength(8), Validators.minLength(8),
@ -105,7 +105,6 @@ export class ResetPasswordComponent implements OnInit{
this.isSubmitting = true; this.isSubmitting = true;
const selectedId = this.resetPasswordForm.get('userId')?.value; const selectedId = this.resetPasswordForm.get('userId')?.value;
console.log("userid.....", selectedId);
const payload = { const payload = {
userId: selectedId, userId: selectedId,
@ -119,10 +118,6 @@ export class ResetPasswordComponent implements OnInit{
this.i18nService.success(SuccessMessages.RESET_PASSWORD_SUCCESS, []); this.i18nService.success(SuccessMessages.RESET_PASSWORD_SUCCESS, []);
this.resetForm(); // Reset form after successful submission this.resetForm(); // Reset form after successful submission
// Optional: Navigate to dashboard or stay on page
setTimeout(() => {
this.router.navigate(['/dashboard']);
}, 1500);
} }
this.isSubmitting = false; this.isSubmitting = false;
}, },
@ -160,7 +155,7 @@ export class ResetPasswordComponent implements OnInit{
// Reset ng-select by clearing the value // Reset ng-select by clearing the value
setTimeout(() => { setTimeout(() => {
this.resetPasswordForm.patchValue({ this.resetPasswordForm.patchValue({
userId: '', userId: null,
newPassword: '', newPassword: '',
confirmPassword: '' confirmPassword: ''
}); });

Loading…
Cancel
Save