HR Dashboard virtual Scrolling

This commit is contained in:
Mohaimen Hasan 2026-11-23 13:15:42 +06:00
parent a5efbdea7a
commit 280610531d
5 changed files with 13 additions and 7 deletions

View File

@ -104,7 +104,9 @@ import { EmpCommonInformationModule } from './ess/emp-common-information/EmpComm
PDFModule,
ExcelModule,
ChartsModule,
ReactiveFormsModule,
// Hundreds of forms bind [(ngModel)] and formControlName together; Angular still supports it and
// only logs a deprecation warning. 'never' turns that console warning off — form behaviour is unchanged.
ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }),
TreeViewModule,
DialogsModule,
HttpClientJsonpModule,

View File

@ -6,7 +6,7 @@ import {EnumDynamicControlType, EnumDefaultValidatorType, BasicEntryFormControl}
import { BasicMasterViewComponent } from 'src/app/form-builder/Basic-Master-View.component';
@Component({
selector: 'app-allergy',
selector: 'app-achievement',
template: '<div> <app-basic-master-Form></app-basic-master-Form> </div>',
changeDetection: ChangeDetectionStrategy.Eager,
standalone: false,

View File

@ -159,14 +159,14 @@
width="12%">
</kendo-grid-column>
}
<kendo-grid-column field="name" [title]="nameTitle" width="12%"
<kendo-grid-column field="name" [title]="nameTitle" [width]="12"
[headerStyle]="{ 'font-size': '11px'}"
[style]="{ 'font-size': '11px'}"></kendo-grid-column>
<!-- <kendo-grid-column field="filterCategory" [title]="filterCategoryTitle" [headerStyle]="{ 'font-size': '11px'}" [style]="{ 'font-size': '11px'}"
*ngIf="filterCategoryTitle !== ''" width="14%">
</kendo-grid-column> -->
@if (selectedSubMenu === 'HeadCount' || selectedSubMenu === 'BloodGroup' || selectedSubMenu === 'Age') {
<kendo-grid-column field="count" title="Count" width="8px"
<kendo-grid-column field="count" title="Count" [width]="8"
[headerStyle]="{ 'font-size': '11px'}" [style]="{ 'font-size': '11px'}"
>
<ng-template kendoGridFooterTemplate width="8px">
@ -484,8 +484,11 @@
parentIdField="teamID"
style="height: 350px"> -->
@if (selectedView==='hierarchy') {
<!-- Virtual scrolling: same data, expand/collapse and clicks; only the rows in view are rendered,
so a large organogram no longer freezes the page while every row is drawn at once. -->
<kendo-treelist kendoTreeListExpandable [kendoTreeListFlatBinding]="orgEmployee" idField="employeeid"
[resizable]="true" parentIdField="linemanagerid" (rowClick)="onRowClick($event)"
scrollable="virtual" [height]="600" [rowHeight]="36" [pageSize]="50"
>
<!--
[height]="410"

View File

@ -241,9 +241,10 @@ export class CoreHrDashboardComponent implements OnInit {
const getAbsentChartData = this.attendanceService.getcorehrAbsentData();
forkJoin([getLeaveChartData, getAbsentChartData]).subscribe(
([res1, res2]) => {
this.leaveChartData = res1;
// the server can return null when there is nothing to chart; treat it as an empty list
this.leaveChartData = res1 || [];
this.leaveChartData = this.leaveChartData.slice(0, 5);
this.absentChartData = res2;
this.absentChartData = res2 || [];
this.absentChartData = this.absentChartData.slice(0, 5);
},
(err) => {

View File

@ -6,7 +6,7 @@ import { EnumDynamicControlType, EnumDefaultValidatorType, BasicEntryFormControl
import { BasicMasterViewComponent } from 'src/app/form-builder/Basic-Master-View.component';
@Component({
selector: 'app-allergy',
selector: 'app-extracurricular-activity',
template: '<div> <app-basic-master-Form></app-basic-master-Form> </div>',
changeDetection: ChangeDetectionStrategy.Eager,
standalone: false,