feat: refactor password input handling across multiple components

- Replaced individual password and confirm password fields with a shared-password-input component in the following components:
  - Partner Account Password Form
  - Consumer Account Form
  - Consumer User Form
  - Consumer Pos Form
  - Super Admin Consumer Account Form
  - Super Admin Partner Account Form
  - Super Admin Provider Form
  - Super Admin User Account Form
  - Modify Login Info Page

- Introduced a new SharedPasswordInputComponent to encapsulate password input logic and validation messages.
- Updated form handling to utilize reactive forms with shared components for better maintainability and consistency.
- Added a ChangePasswordFormDialogComponent for changing passwords with validation.
- Created API routes for business activity goods in the consumer module.
This commit is contained in:
2026-04-26 20:26:30 +03:30
parent baa9409e9e
commit c085104976
54 changed files with 293 additions and 601 deletions
@@ -1,28 +1,30 @@
<uikit-field label="رمز عبور" class="" [control]="passwordControl">
<uikit-field label="رمز عبور" [pSize]="size" [control]="passwordControl">
<p-password
id="password1"
name="password"
formControlName="password"
autocomplete="password"
[toggleMask]="true"
[fluid]="true"
[fluid]="fluid"
[feedback]="false"
[size]="size"
[invalid]="passwordControl.touched && passwordControl.invalid"
/>
<span class="text-xs mt-1 mb-3 text-muted-color">
رمز باید حداقل ۸ کاراکتر بوده و شامل حداقل یک حرف بزرگ، یک حرف کوچک، یک عدد و یک کاراکتر ویژه باشد.
{{ hint }}
</span>
</uikit-field>
<uikit-field label="تکرار رمز عبور" class="" [control]="confirmPasswordControl">
<uikit-field label="تکرار رمز عبور" [pSize]="size" [control]="confirmPasswordControl">
<p-password
id="confirmPassword"
name="confirmPassword"
formControlName="confirmPassword"
autocomplete="new-password"
[toggleMask]="true"
[fluid]="true"
[fluid]="fluid"
[feedback]="false"
[size]="size"
[invalid]="confirmPasswordControl.touched && confirmPasswordControl.invalid"
/>
</uikit-field>
@@ -1,6 +1,6 @@
import { UikitFieldComponent } from '@/uikit';
import { Component, Input } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { FormControl, ReactiveFormsModule } from '@angular/forms';
import { Password } from 'primeng/password';
@Component({
@@ -11,5 +11,8 @@ import { Password } from 'primeng/password';
export class SharedPasswordInputComponent {
@Input({ required: true }) passwordControl = new FormControl<string>('');
@Input({ required: true }) confirmPasswordControl = new FormControl<string>('');
@Input({ required: true }) formGroup!: FormGroup<any>;
@Input() hint: string =
'رمز باید حداقل ۸ کاراکتر بوده و شامل حداقل یک حرف بزرگ، یک حرف کوچک، یک عدد و یک کاراکتر ویژه باشد.';
@Input() fluid: boolean = true;
@Input() size: 'small' | 'large' = 'small';
}