70f39de9d8
- Added PRODUCTS_ROUTES to app routing. - Removed roles.const.ts and related references to central-auth-roles. - Updated login component to remove role selection logic. - Integrated ToastService for success notifications in customer, inventory, product brand, product category, supplier, and user forms. - Implemented product and category selection fields in product form. - Created reusable select components for product brands and categories. - Enhanced user form with password validation and role selection. - Established roles service for fetching roles from the API.
38 lines
1.8 KiB
HTML
38 lines
1.8 KiB
HTML
<p-dialog header="فرم کاربر" [(visible)]="visible" [modal]="true" [style]="{ width: '500px' }" [closable]="true">
|
|
<form [formGroup]="form" (submit)="submit()" class="flex flex-col gap-4">
|
|
<app-input label="نام" [control]="form.controls.firstName" name="firstName" />
|
|
<app-input label="نام خانوادگی" [control]="form.controls.lastName" name="lastName" />
|
|
<app-input label="شماره موبایل" [control]="form.controls.mobileNumber" name="mobileNumber" type="mobile" />
|
|
<catalog-roles-select [control]="form.controls.roleId" />
|
|
<uikit-field label="رمز عبور" class="" [control]="form.get('password')">
|
|
<p-password
|
|
id="password1"
|
|
name="password"
|
|
formControlName="password"
|
|
autocomplete="password"
|
|
[toggleMask]="true"
|
|
[fluid]="true"
|
|
[feedback]="false"
|
|
[invalid]="form.get('password')?.touched && form.get('password')?.invalid"
|
|
/>
|
|
<span class="text-xs mt-2 text-muted-color">
|
|
رمز باید حداقل ۸ کاراکتر بوده و شامل حداقل یک حرف بزرگ، یک حرف کوچک، یک عدد و یک کاراکتر ویژه باشد.
|
|
</span>
|
|
</uikit-field>
|
|
|
|
<uikit-field label="تکرار رمز عبور" class="" [control]="form.get('confirmPassword')">
|
|
<p-password
|
|
id="confirmPassword"
|
|
name="confirmPassword"
|
|
formControlName="confirmPassword"
|
|
autocomplete="new-password"
|
|
[toggleMask]="true"
|
|
[fluid]="true"
|
|
[feedback]="false"
|
|
[invalid]="form.get('confirmPassword')?.touched && form.get('confirmPassword')?.invalid"
|
|
/>
|
|
</uikit-field>
|
|
<app-form-footer-actions [submitLabel]="'ذخیره'" [loading]="form.disabled" (onCancel)="close()" />
|
|
</form>
|
|
</p-dialog>
|