refactor user accounts structure
This commit is contained in:
@@ -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) {
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user