This commit is contained in:
2026-03-10 13:36:45 +03:30
parent 45d48f79dc
commit b379787002
208 changed files with 2328 additions and 2510 deletions
@@ -1,4 +1,4 @@
<div class="h-full bg-surface-overlay">
<div class="h-full bg-surface-overlay rounded-(--p-card-border-radius) overflow-hidden">
<div class="h-full flex flex-col gap-4">
<p-table
[columns]="columns"
@@ -5,9 +5,11 @@ import {
Component,
computed,
ContentChild,
ElementRef,
EventEmitter,
Input,
Output,
Renderer2,
signal,
TemplateRef,
} from '@angular/core';
@@ -32,6 +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',
// },
imports: [
CommonModule,
TableActionRowComponent,
@@ -46,7 +51,10 @@ export interface IColumn<T = any> {
],
})
export class PageDataListComponent<I> {
constructor() {}
constructor(
private host: ElementRef,
private renderer: Renderer2,
) {}
@Input() pageTitle!: string;
@Input() addNewCtaLabel?: string;
@@ -64,7 +72,8 @@ export class PageDataListComponent<I> {
@Input() showDetails: boolean = false;
@Input() showAdd: boolean = false;
@Input() isFiltered: boolean = false;
@Input() fullHeight: boolean = false;
@Input() fullHeight?: boolean = false;
@Input() height: string = '500px';
@ContentChild('filter', { static: true }) filter!: TemplateRef<any> | null;
@ContentChild('caption', { static: true }) caption!: TemplateRef<any> | null;
@@ -78,8 +87,15 @@ export class PageDataListComponent<I> {
filterDrawerVisible = signal<boolean>(false);
ngOnInit() {
console.log(this.fullHeight);
console.log(this.height);
this.renderer.setStyle(
this.host.nativeElement,
'height',
this.fullHeight ? '100cqmin' : this.height,
);
// if (this.fullHeight) {
// this.renderer.setStyle(this.host.nativeElement, 'height', '100cqmin');
// }
}