refactor user accounts structure

This commit is contained in:
2026-03-16 00:35:34 +03:30
parent 20be653499
commit 3c9f6eed1d
286 changed files with 2812 additions and 1133 deletions
@@ -34,9 +34,9 @@ export interface IColumn<T = any> {
@Component({
selector: 'app-page-data-list',
templateUrl: './page-data-list.component.html',
// host: {
// class: 'inline-block w-full',
// },
host: {
class: 'block w-full',
},
imports: [
CommonModule,
TableActionRowComponent,
@@ -56,11 +56,11 @@ export class PageDataListComponent<I> {
private renderer: Renderer2,
) {}
@Input() pageTitle!: string;
@Input({ required: true }) pageTitle!: string;
@Input() addNewCtaLabel?: string;
@Input() columns!: IColumn[];
@Input() items!: I[];
@Input() loading!: boolean;
@Input({ required: true }) columns!: IColumn[];
@Input({ required: true }) items!: I[];
@Input({ required: true }) loading!: boolean;
@Input() emptyPlaceholderTitle: string = 'موردی برای نمایش وجود ندارد';
@Input() emptyPlaceholderDescription?: string = '';
@Input() emptyPlaceholderCtaLabel?: string;
@@ -73,7 +73,7 @@ export class PageDataListComponent<I> {
@Input() showAdd: boolean = false;
@Input() isFiltered: boolean = false;
@Input() fullHeight?: boolean = false;
@Input() height: string = '500px';
@Input() height: string = '';
@ContentChild('filter', { static: true }) filter!: TemplateRef<any> | null;
@ContentChild('caption', { static: true }) caption!: TemplateRef<any> | null;
@@ -87,11 +87,12 @@ export class PageDataListComponent<I> {
filterDrawerVisible = signal<boolean>(false);
ngOnInit() {
this.renderer.setStyle(
this.host.nativeElement,
'height',
this.fullHeight ? '100cqmin' : this.height,
);
if (this.height)
this.renderer.setStyle(
this.host.nativeElement,
'height',
this.fullHeight ? '100cqmin' : this.height,
);
// if (this.fullHeight) {
// }
}
@@ -0,0 +1,28 @@
<uikit-field label="رمز عبور" class="" [control]="passwordControl">
<p-password
id="password1"
name="password"
formControlName="password"
autocomplete="password"
[toggleMask]="true"
[fluid]="true"
[feedback]="false"
[invalid]="passwordControl.touched && passwordControl.invalid"
/>
<span class="text-xs mt-1 mb-3 text-muted-color">
رمز باید حداقل ۸ کاراکتر بوده و شامل حداقل یک حرف بزرگ، یک حرف کوچک، یک عدد و یک کاراکتر ویژه باشد.
</span>
</uikit-field>
<uikit-field label="تکرار رمز عبور" class="" [control]="confirmPasswordControl">
<p-password
id="confirmPassword"
name="confirmPassword"
formControlName="confirmPassword"
autocomplete="new-password"
[toggleMask]="true"
[fluid]="true"
[feedback]="false"
[invalid]="confirmPasswordControl.touched && confirmPasswordControl.invalid"
/>
</uikit-field>
@@ -0,0 +1,15 @@
import { UikitFieldComponent } from '@/uikit';
import { Component, Input } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { Password } from 'primeng/password';
@Component({
selector: 'shared-password-input',
templateUrl: './password-input.component.html',
imports: [UikitFieldComponent, Password, ReactiveFormsModule],
})
export class SharedPasswordInputComponent {
@Input({ required: true }) passwordControl = new FormControl<string>('');
@Input({ required: true }) confirmPasswordControl = new FormControl<string>('');
@Input({ required: true }) formGroup!: FormGroup<any>;
}