@rangertechnologies/fusion-ui 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,6 +23,7 @@ import { saveAs } from "file-saver";
|
|
|
23
23
|
import * as i1$1 from "@angular/router";
|
|
24
24
|
import * as i9$1 from "@angular/material/table";
|
|
25
25
|
import { MatTableDataSource, MatTableModule } from "@angular/material/table";
|
|
26
|
+
import * as i6$1 from "@angular/material/paginator";
|
|
26
27
|
import { MatPaginator, MatPaginatorIntl, MatPaginatorModule } from "@angular/material/paginator";
|
|
27
28
|
import * as i10 from "@angular/material/sort";
|
|
28
29
|
import { MatSort, MatSortModule } from "@angular/material/sort";
|
|
@@ -49,9 +50,11 @@ var CustomTranslatePipe = class CustomTranslatePipe {
|
|
|
49
50
|
this.translate = translate;
|
|
50
51
|
}
|
|
51
52
|
transform(key, defaultTranslation = "") {
|
|
52
|
-
if (key === null || key === void 0) return defaultTranslation;
|
|
53
|
+
if (key === null || key === void 0 || key === "") return defaultTranslation;
|
|
53
54
|
if (typeof key !== "string") return defaultTranslation || (typeof key === "object" && key.date ? String(key.date) : String(key));
|
|
54
|
-
const
|
|
55
|
+
const trimmed = key.trim();
|
|
56
|
+
if (!trimmed) return defaultTranslation;
|
|
57
|
+
const translated = this.translate?.instant ? this.translate.instant(trimmed) : null;
|
|
55
58
|
return translated && translated !== key ? translated : defaultTranslation || key;
|
|
56
59
|
}
|
|
57
60
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -577,6 +580,11 @@ var GlobalValuesService = class GlobalValuesService {
|
|
|
577
580
|
refreshEmp$ = this.refreshEmp.asObservable();
|
|
578
581
|
tablPageParams = new Subject();
|
|
579
582
|
tablPageParamsValue$ = this.tablPageParams.asObservable();
|
|
583
|
+
attendanceData = new Subject();
|
|
584
|
+
attendanceDataChange$ = this.attendanceData.asObservable();
|
|
585
|
+
attendancePass(message) {
|
|
586
|
+
this.attendanceData.next(message);
|
|
587
|
+
}
|
|
580
588
|
cachedPayslipTemplate = null;
|
|
581
589
|
payslipTemplateInFlight = null;
|
|
582
590
|
constructor(apiService) {
|
|
@@ -7454,6 +7462,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7454
7462
|
});
|
|
7455
7463
|
var AttendanceTableComponent = class AttendanceTableComponent {
|
|
7456
7464
|
cdr;
|
|
7465
|
+
apiService;
|
|
7466
|
+
globalValues;
|
|
7457
7467
|
data = [];
|
|
7458
7468
|
displayedColumns = [];
|
|
7459
7469
|
headerLabels = [];
|
|
@@ -7469,7 +7479,14 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7469
7479
|
year;
|
|
7470
7480
|
month;
|
|
7471
7481
|
totalRecords = 0;
|
|
7482
|
+
totalCount = 0;
|
|
7472
7483
|
pageSize = 10;
|
|
7484
|
+
pageSizeOptions = [
|
|
7485
|
+
10,
|
|
7486
|
+
25,
|
|
7487
|
+
50,
|
|
7488
|
+
100
|
|
7489
|
+
];
|
|
7473
7490
|
pageIndex = 0;
|
|
7474
7491
|
isLoading = false;
|
|
7475
7492
|
title = "";
|
|
@@ -7508,6 +7525,9 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7508
7525
|
tableRowClick = new EventEmitter();
|
|
7509
7526
|
searchValueChange = new EventEmitter();
|
|
7510
7527
|
selectedValues = new EventEmitter();
|
|
7528
|
+
pageChange = new EventEmitter();
|
|
7529
|
+
pageDetails = new EventEmitter();
|
|
7530
|
+
searchFilterData = new EventEmitter();
|
|
7511
7531
|
searchText = new EventEmitter();
|
|
7512
7532
|
exportButton = new EventEmitter();
|
|
7513
7533
|
importButton = new EventEmitter();
|
|
@@ -7519,6 +7539,11 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7519
7539
|
sort;
|
|
7520
7540
|
paginator;
|
|
7521
7541
|
dataSource = new MatTableDataSource([]);
|
|
7542
|
+
renderColumns = "displayedColumns";
|
|
7543
|
+
stickyCondition;
|
|
7544
|
+
itemsPerPage = Constants.PAGE_SIZE_OPTIONS;
|
|
7545
|
+
exportSidescreen = false;
|
|
7546
|
+
attendanceSubscription;
|
|
7522
7547
|
selection = new SelectionModel(true, []);
|
|
7523
7548
|
selectedMonth = (/* @__PURE__ */ new Date()).getMonth();
|
|
7524
7549
|
selectedYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
@@ -7538,6 +7563,37 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7538
7563
|
"November",
|
|
7539
7564
|
"December"
|
|
7540
7565
|
];
|
|
7566
|
+
button = {
|
|
7567
|
+
"type": "group",
|
|
7568
|
+
"buttonConfig": { "buttons": [{
|
|
7569
|
+
"name": "Import",
|
|
7570
|
+
"class": "text-only",
|
|
7571
|
+
"buttonType": "importButton",
|
|
7572
|
+
"buttonAction": "",
|
|
7573
|
+
"fileName": "",
|
|
7574
|
+
"tableName": "",
|
|
7575
|
+
"fileFormat": "",
|
|
7576
|
+
"apiCall": "",
|
|
7577
|
+
"endPoint": "",
|
|
7578
|
+
"tooltip": "Import",
|
|
7579
|
+
"tooltipPath": "APP.IMPORT",
|
|
7580
|
+
"isImageSvg": true,
|
|
7581
|
+
"iconSrc": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJWOEwxNCA2IiBzdHJva2U9IiMyOTJEMzIiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTEyIDhMMTAgNiIgc3Ryb2tlPSIjMjkyRDMyIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik03IDEyQzMgMTIgMyAxMy43OSAzIDE2VjE3QzMgMTkuNzYgMyAyMiA4IDIySDE2QzIwIDIyIDIxIDE5Ljc2IDIxIDE3VjE2QzIxIDEzLjc5IDIxIDEyIDE3IDEyQzE2IDEyIDE1LjcyIDEyLjIxIDE1LjIgMTIuNkwxNC4xOCAxMy42OEMxMyAxNC45NCAxMSAxNC45NCA5LjgxIDEzLjY4TDguOCAxMi42QzguMjggMTIuMjEgOCAxMiA3IDEyWiIgZmlsbD0iI0Q5RDlEOSIgc3Ryb2tlPSIjMjkyRDMyIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTUgMTJWOC4wMDAwNEM1IDUuOTkwMDQgNSA0LjMzMDA0IDggNC4wNDAwNCIgc3Ryb2tlPSIjMjkyRDMyIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTE5IDEyVjguMDAwMDRDMTkgNS45OTAwNCAxOSA0LjMzMDA0IDE2IDQuMDQwMDQiIHN0cm9rZT0iIzI5MkQzMiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="
|
|
7582
|
+
}, {
|
|
7583
|
+
"name": "Export",
|
|
7584
|
+
"class": "text-only",
|
|
7585
|
+
"buttonType": "exportButton",
|
|
7586
|
+
"buttonAction": "export",
|
|
7587
|
+
"fileName": "",
|
|
7588
|
+
"api": "",
|
|
7589
|
+
"type": "",
|
|
7590
|
+
"collectionName": "",
|
|
7591
|
+
"tooltip": "Export",
|
|
7592
|
+
"tooltipPath": "APP.EXPORT",
|
|
7593
|
+
"isImageSvg": true,
|
|
7594
|
+
"iconSrc": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDhWMkwxMCA0IiBzdHJva2U9IiMyOTJEMzIiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTEyIDJMMTQgNCIgc3Ryb2tlPSIjMjkyRDMyIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik03IDEyQzMgMTIgMyAxMy43OSAzIDE2VjE3QzMgMTkuNzYgMyAyMiA4IDIySDE2QzIwIDIyIDIxIDE5Ljc2IDIxIDE3VjE2QzIxIDEzLjc5IDIxIDEyIDE3IDEyQzE2IDEyIDE1LjcyIDEyLjIxIDE1LjIgMTIuNkwxNC4xOCAxMy42OEMxMyAxNC45NCAxMSAxNC45NCA5LjgxIDEzLjY4TDguOCAxMi42QzguMjggMTIuMjEgOCAxMiA3IDEyWiIgZmlsbD0iI0Q5RDlEOSIgc3Ryb2tlPSIjMjkyRDMyIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTUgMTJWMTBDNSA3Ljk5MDA0IDUgNi4zMzAwNCA4IDYuMDQwMDQiIHN0cm9rZT0iIzI5MkQzMiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xOSAxMlYxMEMxOSA3Ljk5MDA0IDE5IDYuMzMwMDQgMTYgNi4wNDAwNCIgc3Ryb2tlPSIjMjkyRDMyIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg=="
|
|
7595
|
+
}] }
|
|
7596
|
+
};
|
|
7541
7597
|
weekendColumnsSet = /* @__PURE__ */ new Set();
|
|
7542
7598
|
futureColumnsSet = /* @__PURE__ */ new Set();
|
|
7543
7599
|
todayColumn = null;
|
|
@@ -7552,29 +7608,67 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7552
7608
|
"compensatory off",
|
|
7553
7609
|
"comp off"
|
|
7554
7610
|
]);
|
|
7555
|
-
constructor(cdr) {
|
|
7611
|
+
constructor(cdr, apiService, globalValues) {
|
|
7556
7612
|
this.cdr = cdr;
|
|
7613
|
+
this.apiService = apiService;
|
|
7614
|
+
this.globalValues = globalValues;
|
|
7615
|
+
this.apiService.fetchValue("/leavemaster").subscribe((res) => {
|
|
7616
|
+
(res?.template || []).forEach((leave) => {
|
|
7617
|
+
if (leave?.leaveType) this.leaveTypeSet.add(String(leave.leaveType).toLowerCase().trim());
|
|
7618
|
+
});
|
|
7619
|
+
this.cdr.markForCheck();
|
|
7620
|
+
});
|
|
7621
|
+
this.attendanceSubscription = this.globalValues.attendanceDataChange$.subscribe((rows) => {
|
|
7622
|
+
this.data = rows;
|
|
7623
|
+
this.initOrUpdateDataSource(rows);
|
|
7624
|
+
});
|
|
7557
7625
|
}
|
|
7558
7626
|
ngOnInit() {
|
|
7559
7627
|
this.initMonthYear();
|
|
7560
|
-
this.
|
|
7628
|
+
this.ensureSummaryColumn();
|
|
7561
7629
|
this.updateDateLookups();
|
|
7630
|
+
this.initOrUpdateDataSource(this.data);
|
|
7562
7631
|
}
|
|
7563
7632
|
ngOnChanges(changes) {
|
|
7564
|
-
if (changes["data"]) this.
|
|
7565
|
-
if (changes["month"]?.currentValue
|
|
7566
|
-
if (changes["year"]?.currentValue
|
|
7633
|
+
if (changes["data"] && this.data) this.initOrUpdateDataSource(this.data);
|
|
7634
|
+
if (changes["month"]?.currentValue) this.selectedMonth = this.getMonthNumber(changes["month"].currentValue);
|
|
7635
|
+
if (changes["year"]?.currentValue) this.selectedYear = Number(changes["year"].currentValue) || this.selectedYear;
|
|
7636
|
+
if (changes["displayedColumns"]) this.ensureSummaryColumn();
|
|
7567
7637
|
if (changes["headerLabels"] || changes["displayedColumns"]) this.updateDateLookups();
|
|
7568
|
-
if (changes["isLoading"]) this.
|
|
7638
|
+
if (changes["isLoading"]) this.initOrUpdateDataSource(this.data);
|
|
7639
|
+
}
|
|
7640
|
+
ngOnDestroy() {
|
|
7641
|
+
this.attendanceSubscription?.unsubscribe();
|
|
7569
7642
|
}
|
|
7570
7643
|
initMonthYear() {
|
|
7571
7644
|
if (this.month !== void 0) this.selectedMonth = this.getMonthNumber(this.month);
|
|
7572
7645
|
if (this.year !== void 0) this.selectedYear = Number(this.year) || this.selectedYear;
|
|
7573
7646
|
}
|
|
7574
|
-
|
|
7575
|
-
this.
|
|
7647
|
+
ensureSummaryColumn() {
|
|
7648
|
+
if (this.displayedColumns?.length && !this.displayedColumns.includes("summary")) this.displayedColumns = [...this.displayedColumns, "summary"];
|
|
7649
|
+
}
|
|
7650
|
+
initOrUpdateDataSource(rows) {
|
|
7651
|
+
this.renderColumns = this.withCheckBox ? "select" : "displayedColumns";
|
|
7652
|
+
if (this.isLoading) {
|
|
7653
|
+
this.dataSource = new MatTableDataSource(Array.from({ length: 8 }, () => ({ isSkeleton: true })));
|
|
7654
|
+
this.selection.clear();
|
|
7655
|
+
this.cdr.markForCheck();
|
|
7656
|
+
return;
|
|
7657
|
+
}
|
|
7658
|
+
const records = Array.isArray(rows) ? rows : [];
|
|
7659
|
+
this.dataSource = new MatTableDataSource(records);
|
|
7660
|
+
this.selection.clear();
|
|
7576
7661
|
if (this.sort) this.dataSource.sort = this.sort;
|
|
7577
7662
|
if (this.paginator) this.dataSource.paginator = this.paginator;
|
|
7663
|
+
const storedSize = localStorage.getItem("attendanceTableSize");
|
|
7664
|
+
const storedIndex = Number(localStorage.getItem("attendanceTableIndex"));
|
|
7665
|
+
this.pageSize = storedSize ? Number(storedSize) : this.pageSize;
|
|
7666
|
+
this.pageIndex = storedIndex || 0;
|
|
7667
|
+
this.totalCount = this.totalRecords || records.length;
|
|
7668
|
+
if (this.searchTextValue) {
|
|
7669
|
+
this.dataSource.filter = this.searchTextValue.trim().toLowerCase();
|
|
7670
|
+
this.dataSource.paginator?.firstPage();
|
|
7671
|
+
}
|
|
7578
7672
|
this.cdr.markForCheck();
|
|
7579
7673
|
}
|
|
7580
7674
|
updateDateLookups() {
|
|
@@ -7622,12 +7716,29 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7622
7716
|
triggerChangeDetection() {
|
|
7623
7717
|
this.cdr.markForCheck();
|
|
7624
7718
|
}
|
|
7625
|
-
|
|
7719
|
+
hyperLinkClick(element, column, i) {
|
|
7626
7720
|
this.hyperLinkClickEmit.emit({
|
|
7627
7721
|
element,
|
|
7628
|
-
column
|
|
7722
|
+
column,
|
|
7723
|
+
i
|
|
7629
7724
|
});
|
|
7630
7725
|
}
|
|
7726
|
+
isNearTarget(workingDays, totalDays) {
|
|
7727
|
+
const total = Number(totalDays);
|
|
7728
|
+
if (!total || total <= 0) return false;
|
|
7729
|
+
return Number(workingDays) / total >= .8;
|
|
7730
|
+
}
|
|
7731
|
+
isLeaveType(status) {
|
|
7732
|
+
if (!status || typeof status !== "string") return false;
|
|
7733
|
+
const s = status.toLowerCase().trim();
|
|
7734
|
+
return s === "absent" || this.leaveTypeSet.has(s);
|
|
7735
|
+
}
|
|
7736
|
+
containsOnlyNumbers(value) {
|
|
7737
|
+
if (value === null || value === void 0 || value === "" || typeof value === "object") return false;
|
|
7738
|
+
if (typeof value === "number") return !isNaN(value);
|
|
7739
|
+
const s = String(value).trim();
|
|
7740
|
+
return !!s && !isNaN(Number(s));
|
|
7741
|
+
}
|
|
7631
7742
|
resolveAttendanceValue(raw) {
|
|
7632
7743
|
if (!raw) return {
|
|
7633
7744
|
status: "",
|
|
@@ -7680,6 +7791,62 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7680
7791
|
if (this.leaveTypeSet.has(status)) return "✕";
|
|
7681
7792
|
return status.slice(0, 2);
|
|
7682
7793
|
}
|
|
7794
|
+
hasAttendanceChip(val, column) {
|
|
7795
|
+
const { status } = this.resolveAttendanceValue(val);
|
|
7796
|
+
if (!status) return false;
|
|
7797
|
+
if (status === "week off" || status === "wo" || status === "w" || status === "off") return false;
|
|
7798
|
+
return true;
|
|
7799
|
+
}
|
|
7800
|
+
isWeekOffState(val, column) {
|
|
7801
|
+
const { status } = this.resolveAttendanceValue(val);
|
|
7802
|
+
if (status === "week off" || status === "wo" || status === "w" || status === "off") return true;
|
|
7803
|
+
if (!status && this.isWeekend(column)) return true;
|
|
7804
|
+
return false;
|
|
7805
|
+
}
|
|
7806
|
+
getDateRangeText() {
|
|
7807
|
+
if (this.titleOn && this.title) return this.title;
|
|
7808
|
+
const firstDate = new Date(this.selectedYear, this.selectedMonth, 1);
|
|
7809
|
+
const lastDate = new Date(this.selectedYear, this.selectedMonth + 1, 0);
|
|
7810
|
+
const dayNames = [
|
|
7811
|
+
"Sun",
|
|
7812
|
+
"Mon",
|
|
7813
|
+
"Tue",
|
|
7814
|
+
"Wed",
|
|
7815
|
+
"Thu",
|
|
7816
|
+
"Fri",
|
|
7817
|
+
"Sat"
|
|
7818
|
+
];
|
|
7819
|
+
const monthNames = [
|
|
7820
|
+
"Jan",
|
|
7821
|
+
"Feb",
|
|
7822
|
+
"Mar",
|
|
7823
|
+
"Apr",
|
|
7824
|
+
"May",
|
|
7825
|
+
"Jun",
|
|
7826
|
+
"Jul",
|
|
7827
|
+
"Aug",
|
|
7828
|
+
"Sep",
|
|
7829
|
+
"Oct",
|
|
7830
|
+
"Nov",
|
|
7831
|
+
"Dec"
|
|
7832
|
+
];
|
|
7833
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
7834
|
+
return `${`${dayNames[firstDate.getDay()]} ${monthNames[firstDate.getMonth()]} ${pad(firstDate.getDate())} ${firstDate.getFullYear()}`} to ${`${dayNames[lastDate.getDay()]} ${monthNames[lastDate.getMonth()]} ${pad(lastDate.getDate())} ${lastDate.getFullYear()}`}`;
|
|
7835
|
+
}
|
|
7836
|
+
onPageChange(event) {
|
|
7837
|
+
this.pageIndex = event.pageIndex;
|
|
7838
|
+
this.pageSize = event.pageSize;
|
|
7839
|
+
this.pageChange.emit(event);
|
|
7840
|
+
}
|
|
7841
|
+
pageParams(event) {
|
|
7842
|
+
localStorage.setItem("attendanceTableSize", event.pageSize);
|
|
7843
|
+
localStorage.setItem("attendanceTableIndex", event.pageIndex);
|
|
7844
|
+
this.onPageChange(event);
|
|
7845
|
+
this.pageDetails.emit({
|
|
7846
|
+
pageSize: event.pageSize,
|
|
7847
|
+
pageIndex: Number(event.pageIndex)
|
|
7848
|
+
});
|
|
7849
|
+
}
|
|
7683
7850
|
prevMonth() {
|
|
7684
7851
|
if (this.selectedMonth === 0) {
|
|
7685
7852
|
this.selectedMonth = 11;
|
|
@@ -7722,44 +7889,67 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7722
7889
|
checkButtonClicked() {
|
|
7723
7890
|
this.checkClicked.emit();
|
|
7724
7891
|
}
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
column
|
|
7729
|
-
});
|
|
7730
|
-
this.tableRowClick.emit({
|
|
7731
|
-
element,
|
|
7732
|
-
column
|
|
7733
|
-
});
|
|
7892
|
+
tableClick(row) {
|
|
7893
|
+
if (row?.isSkeleton) return;
|
|
7894
|
+
this.tableRowClick.emit(row);
|
|
7734
7895
|
}
|
|
7735
|
-
|
|
7896
|
+
doubleClickFunction(element, column, presentData) {
|
|
7736
7897
|
if (element?.isSkeleton) return;
|
|
7737
|
-
const dateData = this.headerLabels && this.displayedColumns ? this.headerLabels[this.displayedColumns.indexOf(column)] : column;
|
|
7738
7898
|
this.doubleClickEmit.emit({
|
|
7739
|
-
employeeDetail: element.employeeDetail
|
|
7740
|
-
date:
|
|
7741
|
-
data:
|
|
7899
|
+
employeeDetail: element.employeeDetail,
|
|
7900
|
+
date: column,
|
|
7901
|
+
data: presentData
|
|
7742
7902
|
});
|
|
7743
7903
|
}
|
|
7744
7904
|
applyFilter(event) {
|
|
7745
7905
|
const filterValue = event.target.value;
|
|
7746
7906
|
this.dataSource.filter = filterValue.trim().toLowerCase();
|
|
7907
|
+
this.searchFilterData.emit(this.dataSource.filteredData);
|
|
7747
7908
|
this.searchValueChange.emit(filterValue);
|
|
7748
7909
|
this.searchText.emit(filterValue);
|
|
7910
|
+
this.dataSource.paginator?.firstPage();
|
|
7911
|
+
}
|
|
7912
|
+
isAllSelected() {
|
|
7913
|
+
if (this.isLoading || !this.dataSource.data.length) return false;
|
|
7914
|
+
return this.selection.selected.length === this.dataSource.data.length;
|
|
7749
7915
|
}
|
|
7750
7916
|
masterToggle() {
|
|
7751
|
-
if (this.
|
|
7752
|
-
|
|
7917
|
+
if (this.isLoading) return;
|
|
7918
|
+
if (this.selection.hasValue()) this.selection.clear();
|
|
7919
|
+
else this.dataSource.data.forEach((row) => {
|
|
7920
|
+
if (!row?.isSkeleton) this.selection.select(row);
|
|
7921
|
+
});
|
|
7753
7922
|
this.selectedValues.emit(this.selection.selected);
|
|
7754
7923
|
}
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
const numRows = this.dataSource.data.length;
|
|
7758
|
-
return numSelected === numRows && numRows > 0;
|
|
7924
|
+
separateRowSelect(toggled, row) {
|
|
7925
|
+
if (!row?.isSkeleton) this.selectedValues.emit(this.selection.selected);
|
|
7759
7926
|
}
|
|
7760
|
-
|
|
7761
|
-
this.
|
|
7762
|
-
|
|
7927
|
+
importButtonEmit() {
|
|
7928
|
+
this.importButton.emit();
|
|
7929
|
+
}
|
|
7930
|
+
exportButtonEmit() {
|
|
7931
|
+
this.exportSidescreen = true;
|
|
7932
|
+
this.exportButton.emit();
|
|
7933
|
+
}
|
|
7934
|
+
commonButtonClick(button) {
|
|
7935
|
+
if (button.buttonType === "importButton") this.importButtonEmit();
|
|
7936
|
+
else if (button.buttonType === "exportButton") this.exportButtonEmit();
|
|
7937
|
+
}
|
|
7938
|
+
exportButtonSideNav() {
|
|
7939
|
+
if (this.exportButtonLoadingSpinner) return;
|
|
7940
|
+
this.exportReports.emit();
|
|
7941
|
+
}
|
|
7942
|
+
exportFieldsButtonEmit(evt) {
|
|
7943
|
+
this.sideNavButtons.emit(evt);
|
|
7944
|
+
}
|
|
7945
|
+
exportFilterButtonEmit(evt) {
|
|
7946
|
+
this.sideNavButtons.emit(evt);
|
|
7947
|
+
}
|
|
7948
|
+
selectedValuesEmit(evt) {
|
|
7949
|
+
this.multipleSelectFilterExport.emit(evt);
|
|
7950
|
+
}
|
|
7951
|
+
filterDateEmit(evt) {
|
|
7952
|
+
this.filterDateEmitEvt.emit(evt);
|
|
7763
7953
|
}
|
|
7764
7954
|
getMonthNumber(month) {
|
|
7765
7955
|
if (typeof month === "number") return month;
|
|
@@ -7786,7 +7976,11 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7786
7976
|
version: "22.2.4",
|
|
7787
7977
|
ngImport: i0,
|
|
7788
7978
|
type: AttendanceTableComponent,
|
|
7789
|
-
deps: [
|
|
7979
|
+
deps: [
|
|
7980
|
+
{ token: i0.ChangeDetectorRef },
|
|
7981
|
+
{ token: ApiService },
|
|
7982
|
+
{ token: GlobalValuesService }
|
|
7983
|
+
],
|
|
7790
7984
|
target: i0.ɵɵFactoryTarget.Component
|
|
7791
7985
|
});
|
|
7792
7986
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
@@ -7811,7 +8005,9 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7811
8005
|
year: "year",
|
|
7812
8006
|
month: "month",
|
|
7813
8007
|
totalRecords: "totalRecords",
|
|
8008
|
+
totalCount: "totalCount",
|
|
7814
8009
|
pageSize: "pageSize",
|
|
8010
|
+
pageSizeOptions: "pageSizeOptions",
|
|
7815
8011
|
pageIndex: "pageIndex",
|
|
7816
8012
|
isLoading: "isLoading",
|
|
7817
8013
|
title: "title",
|
|
@@ -7837,6 +8033,9 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7837
8033
|
tableRowClick: "tableRowClick",
|
|
7838
8034
|
searchValueChange: "searchValueChange",
|
|
7839
8035
|
selectedValues: "selectedValues",
|
|
8036
|
+
pageChange: "pageChange",
|
|
8037
|
+
pageDetails: "pageDetails",
|
|
8038
|
+
searchFilterData: "searchFilterData",
|
|
7840
8039
|
searchText: "searchText",
|
|
7841
8040
|
exportButton: "exportButton",
|
|
7842
8041
|
importButton: "importButton",
|
|
@@ -7846,6 +8045,10 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7846
8045
|
multipleSelectFilterExport: "multipleSelectFilterExport",
|
|
7847
8046
|
filterDateEmitEvt: "filterDateEmitEvt"
|
|
7848
8047
|
},
|
|
8048
|
+
providers: [{
|
|
8049
|
+
provide: MatPaginatorIntl,
|
|
8050
|
+
useClass: CustomPaginatorIntl
|
|
8051
|
+
}],
|
|
7849
8052
|
viewQueries: [{
|
|
7850
8053
|
propertyName: "sort",
|
|
7851
8054
|
first: true,
|
|
@@ -7859,19 +8062,13 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7859
8062
|
}],
|
|
7860
8063
|
usesOnChanges: true,
|
|
7861
8064
|
ngImport: i0,
|
|
7862
|
-
template: "<!-- MR 09NOV26 Introduce AttendanceTableComponent and harden CustomTranslatePipe -->\n<div class=\"attendance-table-container\">\n <!-- Top Bar: Month/Year Navigation, Legend, Actions & Search -->\n <div class=\"attendance-top-bar d-flex justify-content-between align-items-center flex-wrap gap-2 pb-2\">\n <!-- Month/Year Navigation -->\n <div class=\"d-flex align-items-center gap-2\">\n <div class=\"picker-container position-relative\">\n <i class=\"arrow-btn cursor-pointer fusion-icon fusion-icon-size-lg fusion-icon-arrow-left-1 nav-icon\"\n (click)=\"prevMonth()\" title=\"Previous Month\"></i>\n <span class=\"month-label cursor-pointer fw-semibold px-2\" (click)=\"togglePopup()\">\n {{ months[selectedMonth] }} {{ selectedYear }}\n </span>\n <i class=\"arrow-btn cursor-pointer fusion-icon fusion-icon-size-lg fusion-icon-arrow-right-1 nav-icon\"\n (click)=\"nextMonth()\" title=\"Next Month\"></i>\n\n <!-- Month/Year Picker Dropdown Popup -->\n <div class=\"popup position-absolute shadow-sm rounded-3 p-3 bg-white\" *ngIf=\"popupOpen\">\n <div class=\"year-section d-flex justify-content-between align-items-center mb-2\">\n <i class=\"arrow-btn cursor-pointer fusion-icon fusion-icon-arrow-left-1\" (click)=\"changeYear(-1)\"></i>\n <span class=\"fw-bold\">{{ selectedYear }}</span>\n <i class=\"arrow-btn cursor-pointer fusion-icon fusion-icon-arrow-right-1\" (click)=\"changeYear(1)\"></i>\n </div>\n <div class=\"month-grid d-grid\" style=\"grid-template-columns: repeat(3, 1fr); gap: 6px;\">\n <div *ngFor=\"let m of (monthArray && monthArray.length > 0 ? monthArray : months); let i = index\"\n class=\"month-item text-center p-2 rounded cursor-pointer\"\n [class.active]=\"i === selectedMonth\"\n (click)=\"selectMonth(i)\">\n {{ m | slice:0:3 }}\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Attendance Legend Bar -->\n <div class=\"top-legend-bar d-flex align-items-center gap-3 flex-wrap\">\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-present\">✓</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.PREsENT' | customTranslate : 'Present' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-absent\">✕</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.ABSENT' | customTranslate : 'Absent' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-half\">½</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.HALF_DAY' | customTranslate : 'Half day' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-holiday\">H</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.HOLIDAY' | customTranslate : 'Holiday' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-weekoff\">-</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.WEEK_OFF' | customTranslate : 'Week Off' }}</span>\n </div>\n <div class=\"table-subtitle ms-auto fw-semibold text-secondary\" *ngIf=\"titleOn && title\">\n {{ title | customTranslate : title }}\n </div>\n </div>\n\n <!-- Actions & Search Toolbar -->\n <div class=\"d-flex align-items-center gap-2 ms-auto\">\n <button *ngIf=\"isSandwichLeave && isCheckButton !== false\"\n type=\"button\"\n class=\"btn btn-primary btn-sm\"\n (click)=\"confirmModal = true\">\n {{ 'APP_HRM_ATTENDANCE.CHECK' | customTranslate : 'Check' }}\n </button>\n\n <div class=\"search\" *ngIf=\"searchBar\">\n <div class=\"search-bar d-flex align-items-center px-2 py-1\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 22\" fill=\"none\" class=\"me-1\">\n <circle cx=\"11.64\" cy=\"10.54\" r=\"8.7\" stroke=\"#787486\" stroke-width=\"1.5\"/>\n <path d=\"M21.63 20.17L19.73 18.33\" stroke=\"#787486\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n </svg>\n <input type=\"text\"\n class=\"search-input\"\n [placeholder]=\"'APP_HRM_ATTENDANCE_TABLE.SEARCH' | customTranslate : 'Search'\"\n (keyup)=\"applyFilter($event)\"\n [value]=\"searchTextValue || ''\" />\n </div>\n </div>\n </div>\n </div>\n\n <!-- Loading Skeleton State -->\n <div *ngIf=\"isLoading; else dataTableTemplate\" class=\"attendance-skeleton-container py-3\">\n <table class=\"w-100\">\n <tr *ngFor=\"let _ of [1, 2, 3, 4, 5, 6]\" style=\"height: 48px;\">\n <td class=\"skeleton-cell p-2\">\n <div class=\"skeleton-line\" style=\"height: 24px; border-radius: 4px; background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);\"></div>\n </td>\n </tr>\n </table>\n </div>\n\n <!-- Matrix Table View -->\n <ng-template #dataTableTemplate>\n <div class=\"table-responsive table-container\" tabindex=\"0\">\n <table mat-table [dataSource]=\"dataSource\" [ngStyle]=\"{ width: tableWidth }\" matSort class=\"attendance-mat-table w-100\">\n\n <!-- Checkbox Selection Column -->\n <ng-container *ngIf=\"withCheckBox\" matColumnDef=\"select\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef class=\"sticky-column checkbox-col text-center\">\n <input type=\"checkbox\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"masterToggle()\"\n [checked]=\"selection.hasValue()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n class=\"custom-checkbox\" />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"sticky-column checkbox-col text-center\">\n <input type=\"checkbox\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"rowToggle(row)\"\n [checked]=\"selection.isSelected(row)\"\n class=\"custom-checkbox\" />\n </td>\n </ng-container>\n\n <!-- Dynamic Data & Calendar Day Columns -->\n <ng-container *ngFor=\"let column of displayedColumns; let i = index\" [matColumnDef]=\"column\"\n [sticky]=\"isColumnSticky(column)\">\n <!-- Matrix Column Header -->\n <th mat-header-cell *matHeaderCellDef mat-sort-header\n [class.sticky-column]=\"isColumnSticky(column)\"\n [class.weekend-header]=\"isWeekend(column)\"\n [class.today-header]=\"isToday(column)\"\n [class.employee-detail-th]=\"column === 'employeeDetail'\"\n [class.calendar-day-th]=\"column !== 'employeeDetail' && column !== 'summary'\"\n class=\"head-cell text-center\">\n\n <!-- Employee Detail Column Header -->\n <ng-container *ngIf=\"column === 'employeeDetail'\">\n <div class=\"text-start ps-2 fw-semibold\">\n {{ 'Employee' | customTranslate : 'Employee' }}\n </div>\n </ng-container>\n\n <!-- Calendar Day Columns (Objects: { date, day, month, year }) -->\n <ng-container *ngIf=\"column !== 'employeeDetail' && column !== 'summary'\">\n <div class=\"d-flex flex-column align-items-center py-1\">\n <span class=\"head-day-letter\" [class.head-muted]=\"isWeekend(column)\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.day : '' }}\n </span>\n <span class=\"head-date-num\" [class.head-today]=\"isToday(column)\" [class.head-muted]=\"isWeekend(column)\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.date : '' }}\n </span>\n </div>\n </ng-container>\n\n <!-- Summary Column Header -->\n <ng-container *ngIf=\"column === 'summary'\">\n <div class=\"fw-semibold px-2\">\n {{ 'APP_HRM_ATTENDANCE_TABLE.DAYS' | customTranslate : 'Days' }}\n </div>\n </ng-container>\n </th>\n\n <!-- Matrix Column Data Cell -->\n <td mat-cell *matCellDef=\"let element\"\n [class.sticky-column]=\"isColumnSticky(column)\"\n [class.weekend-cell]=\"isWeekend(column)\"\n [class.today-cell]=\"isToday(column)\"\n [class.future-cell]=\"isFutureDate(column)\"\n [class.calendar-day-td]=\"column !== 'employeeDetail' && column !== 'summary'\"\n class=\"body-cell text-center\"\n (click)=\"onCellClick(element, column)\">\n\n <!-- Employee Detail Cell (Avatar & Info) -->\n <div *ngIf=\"column === 'employeeDetail'\" class=\"d-flex align-items-center gap-2 py-1 ps-2 text-start\">\n <div class=\"avatar-circle flex-shrink-0\">\n {{ getInitials(element.employeeName || element.name || '') }}\n </div>\n <div class=\"employee-meta text-truncate\">\n <div class=\"emp-name fw-semibold text-truncate\">\n {{ element.employeeName || element.name || '' }}\n </div>\n <div class=\"emp-id text-muted\" style=\"font-size: 11px;\">\n [{{ element.employeeId || element.empId || '' }}]\n </div>\n </div>\n </div>\n\n <!-- Calendar Day Attendance Chip Cell -->\n <div *ngIf=\"column !== 'employeeDetail' && column !== 'summary'\"\n class=\"attendance-cell cursor-pointer d-flex justify-content-center align-items-center\"\n (dblclick)=\"onCellDoubleClick(element, column)\">\n <span *ngIf=\"element[column]\"\n class=\"attendance-chip\"\n [ngClass]=\"getAttendanceChipClass(element[column])\">\n {{ getAttendanceChipSymbol(element[column]) }}\n </span>\n </div>\n\n <!-- Summary Column Pill -->\n <div *ngIf=\"column === 'summary'\" class=\"summary-pill px-2 py-1 fw-semibold text-center\">\n {{ element.presentDays !== undefined ? element.presentDays : (element.present || 0) }} /\n {{ element.totalWorkingDays !== undefined ? element.totalWorkingDays : (element.totalDays || 0) }}\n </div>\n </td>\n </ng-container>\n\n <!-- Row Declarations -->\n <tr mat-header-row *matHeaderRowDef=\"(withCheckBox ? ['select'].concat(displayedColumns) : displayedColumns); sticky: true\" class=\"table-header-row\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: (withCheckBox ? ['select'].concat(displayedColumns) : displayedColumns);\" class=\"table-data-row\"></tr>\n </table>\n\n <!-- Empty State -->\n <div *ngIf=\"!dataSource.data || dataSource.data.length === 0\" class=\"no-records-cell text-center py-4 text-muted\">\n {{ 'APP.NO_RECORDS' | customTranslate : 'No records/data found.' }}\n </div>\n </div>\n </ng-template>\n</div>\n\n<!-- Sandwich Leave Confirmation Modal -->\n<div *ngIf=\"confirmModal\" class=\"custom-modal-overlay position-fixed top-0 start-0 w-100 h-100 d-flex justify-content-center align-items-center\">\n <div class=\"custom-modal bg-white rounded-3 shadow-lg p-4\" style=\"max-width: 420px; width: 90%;\">\n <div class=\"custom-modal-header d-flex justify-content-between align-items-center mb-3\">\n <b class=\"fs-6\">{{ 'APP_HRM_ATTENDANCE.CHECK_ATTENDANCE' | customTranslate : 'Check Attendance' }}</b>\n <button type=\"button\" class=\"btn-close\" (click)=\"confirmModal = false\"></button>\n </div>\n <div class=\"custom-modal-body mb-4 text-secondary\">\n {{ 'APP_HRM_ATTENDANCE.CONFIRM_CHECK' | customTranslate : 'Are you sure you want to run attendance check?' }}\n </div>\n <div class=\"custom-modal-footer d-flex justify-content-end gap-2\">\n <button type=\"button\" class=\"btn btn-secondary btn-sm\" (click)=\"confirmModal = false\">\n {{ 'APP.NO' | customTranslate : 'No' }}\n </button>\n <button type=\"button\" class=\"btn btn-primary btn-sm\" (click)=\"checkButtonClicked(); confirmModal = false\">\n {{ 'APP.YES' | customTranslate : 'Yes' }}\n </button>\n </div>\n </div>\n</div>\n\n",
|
|
7863
|
-
styles: [".attendance-table-container{width:100%;background:var(--comp-bg-color, #ffffff);border-radius:8px}.attendance-top-bar{border-bottom:1px solid var(--border-color, #e2e8f0);margin-bottom:8px}.picker-container{display:inline-flex;align-items:center;-webkit-user-select:none;user-select:none}.month-label{font-size:var(--fs-normal, 14px);color:var(--fc-text-color-dark, #0f172a)}.arrow-btn{font-size:16px;padding:4px;color:var(--label-text-color, #64748b);transition:color .15s ease-in-out}.arrow-btn:hover{color:var(--fc-primary-color, #0140c1)}.popup{top:100%;left:0;z-index:100;width:240px;border:1px solid var(--border-color, #e2e8f0)}.month-item{font-size:12px;color:var(--fc-text-color, #1e293b);transition:background .15s ease-in-out}.month-item:hover{background:#f1f5f9}.month-item.active{background:var(--fc-primary-color, #0140c1);color:#fff;font-weight:600}.top-legend-bar{font-size:12px}.legend-text{color:var(--label-text-color, #475569);font-size:12px;font-weight:var(--fw-500, 500)}.attendance-chip{width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;line-height:1}.attendance-present{background-color:#dcfce7;color:#15803d}.attendance-absent{background-color:#fee2e2;color:#b91c1c}.attendance-half{background-color:#fef3c7;color:#b45309}.attendance-holiday{background-color:#dbeafe;color:#1d4ed8}.attendance-weekoff{background-color:#f1f5f9;color:#64748b}.search{display:inline-flex;align-items:center}.search-bar{border:1px solid var(--border-color, #e2e8f0);border-radius:6px;background:#fff}.search-input{background:transparent!important;border:none!important;outline:none!important;box-shadow:none!important;font-size:13px!important;color:var(--fc-text-color, #1e293b);width:140px}.table-container{overflow-x:auto;position:relative}.attendance-mat-table{border-collapse:separate;border-spacing:0}.head-cell{background:var(--comp-bg-color, #ffffff);border-bottom:1px solid var(--border-color, #e2e8f0);border-right:1px solid var(--border-color, #e2e8f0);color:var(--fc-text-color, #1e293b);padding:4px!important}.body-cell{border-bottom:1px solid var(--border-color, #e2e8f0);border-right:1px solid var(--border-color, #e2e8f0);background:var(--comp-bg-color, #ffffff);padding:4px!important}.calendar-day-th,.calendar-day-td{min-width:36px;width:36px;max-width:36px}.head-day-letter{font-size:10px;font-weight:500;color:var(--label-text-color, #64748b)}.head-date-num{font-size:12px;font-weight:600;color:var(--fc-text-color-dark, #0f172a)}.head-today{color:var(--fc-primary-color, #0140c1);font-weight:700}.head-muted{color:#94a3b8}.weekend-header,.weekend-cell{background-color:#f8fafc!important}.today-header,.today-cell{background-color:#eff6ff!important}.future-cell{background-color:#fff}.sticky-column{position:sticky;z-index:2;background-color:inherit}.employee-detail-th{min-width:180px;width:220px}.avatar-circle{width:32px;height:32px;border-radius:50%;background-color:var(--fc-primary-color, #0140c1);color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600}.emp-name{font-size:13px;color:var(--fc-text-color-dark, #0f172a)}.summary-pill{font-size:11px;border-radius:12px;background-color:#f1f5f9;color:#334155}.custom-modal-overlay{background:#00000073;z-index:1050}\n"],
|
|
8065
|
+
template: "<!-- MR 10NOV26 Port exact DataTableTwoComponent template from host testMaster -->\n<div class=\"table-layout w-100\" [id]=\"tableId\">\n <div>\n <div class=\"d-flex justify-content-between\" style=\"padding-bottom: 5px\">\n <div class=\"d-flex\">\n <!-- SC19NOV2025 replace the month year seperate dropdown into month year picker -->\n <div class=\"picker-container\">\n <i class=\" arrow-btn fusion-icon fusion-icon-size-lg fusion-icon-arrow-left-1 nav-icon\"\n (click)=\"prevMonth()\" style=\"color: var(--fc-text-color-dar) !important;\"></i>\n <span class=\"month-label\" (click)=\"togglePopup()\">\n {{ months[selectedMonth] }} {{ selectedYear }}\n </span>\n <i class=\" arrow-btn fusion-icon fusion-icon-size-lg fusion-icon-arrow-right-1 nav-icon\"\n (click)=\"nextMonth()\" style=\"color: var(--fc-text-color-dar) !important;\"></i>\n </div>\n <div class=\"popup\" *ngIf=\"popupOpen\">\n <div class=\"year-section\">\n <i class=\"fusion-icon fusion-icon-size-lg fusion-icon-arrow-left-1 nav-icon\" (click)=\"changeYear(-1)\"\n style=\"color: var(--fc-text-color-dar) !important;\"></i>\n <span>{{ selectedYear }}</span>\n <i class=\"fusion-icon fusion-icon-size-lg fusion-icon-arrow-right-1 nav-icon\" (click)=\"changeYear(1)\"\n style=\"color: var(--fc-text-color-dar) !important;\"></i>\n </div>\n\n <div class=\"month-grid\">\n <div class=\"month-item\" *ngFor=\"let m of (monthArray && monthArray.length > 0 ? monthArray : months); let i = index\" [class.active]=\"i === selectedMonth\"\n (click)=\"selectMonth(i)\">\n {{ m | slice:0:3 }} </div>\n </div>\n </div>\n </div>\n <!-- SK10APR24 import and export button added inside table -->\n <div class=\"d-flex gap-2 align-items-center\">\n <div class=\"search\" *ngIf=\"searchBar\">\n <div class=\"search-bar\">\n <input type=\"text\" placeholder=\"{{ 'APP_HRM_ATTENDANCE_TABLE.SEARCH' | customTranslate : 'Search' }}\"\n matInput (keyup)=\"applyFilter($event)\" #input [value]=\"searchTextValue || ''\">\n <img class=\"card-btn\" src=\"../assets/images/icons/general/Search.svg\">\n </div>\n </div>\n <button *ngIf=\"isSandwichLeave && isCheckButton !== false\" class=\"btn btn-primary me-2\"\n (click)=\"confirmModal = true\">{{ 'APP_HRM_ATTENDANCE.CHECK' | customTranslate : 'Check' }}</button>\n <div class=\"flex\">\n <!-- MR 18OCT26 Add clear tooltips for Import and Export toolbar buttons -->\n <nxt-button class=\"data-table-fsbtn ms-2 me-2\" (buttonClickEmit)=\"commonButtonClick($event)\"\n [buttonType]=\"button?.class\" [buttonValue]=\"button?.namePath\" [buttonConfig]=\"button?.buttonConfig\"\n [type]=\"button?.type\" [btnIconLeftSrc]=\"button?.btnIconLeftSrc\"\n [isImageSvg]=\"button?.isImageSvg\">\n </nxt-button>\n </div>\n </div>\n </div>\n\n <!-- MR 18OCT26 Reposition legend to top bar with matching chips and contextual title -->\n <div class=\"d-flex justify-content-between align-items-center top-legend-bar\">\n <div class=\"d-flex align-items-center gap-3 flex-wrap\">\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-present\">✓</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.PREsENT' | customTranslate : 'Present' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-absent\">✕</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.ABSENT' | customTranslate : 'Absent' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-half\">½</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.HALF_DAY' | customTranslate : 'Half day' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-holiday\">H</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.HOLIDAY' | customTranslate : 'Holiday' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-weekoff\">-</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.WEEK_OFF' | customTranslate : 'Week Off' }}</span>\n </div>\n </div>\n <div class=\"table-subtitle\" *ngIf=\"titleOn && title\">\n {{ title | customTranslate : title }}\n </div>\n </div>\n\n <div class=\"table-margin\">\n <div class=\"table-container\">\n <!-- MR 18OCT26 Single unified MatTable eliminates header style discrepancy and checkbox shadow -->\n <table mat-table [dataSource]=\"dataSource\" [style.width]=\"tableWidth\" matSort class=\"mat-elevation-z8\">\n <!-- Checkbox Columns -->\n <!-- SK06MAR24 made checkbox sticky -->\n <ng-container *ngIf=\"withCheckBox\" matColumnDef=\"select\" sticky>\n <th mat-header-cell *matHeaderCellDef class=\"head-color sticky-column mat-column-select\">\n <mat-checkbox (change)=\"masterToggle()\" [checked]=\"selection.hasValue()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"sticky-col sticky-select mat-column-select\">\n <ng-container *ngIf=\"!row?.isSkeleton; else skeletonSelect\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"separateRowSelect(selection.toggle(row), row)\"\n [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </ng-container>\n <ng-template #skeletonSelect>\n <div class=\"skeleton\" style=\"width: 14px; height: 14px; border-radius: 2px; margin: 0 auto;\"></div>\n </ng-template>\n </td>\n </ng-container>\n <!-- data Columns -->\n <ng-container *ngFor=\"let column of displayedColumns; let i=index\" [matColumnDef]=\"column\"\n [sticky]=\"isColumnSticky(column)\" [stickyEnd]=\"column === 'summary' || i === (stickyCondition - 1)\">\n <!-- MR 18OCT26 Upgraded header with today accent, weekend shading, and weekday letter hierarchy -->\n <th mat-header-cell *matHeaderCellDef\n class=\"head-color ms-2 sticky-col {{ column != 'employeeDetail' ? 'th-td' : '' }} sticky-column\"\n [class.week-off]=\"isWeekend(column)\"\n (click)=\"$event.stopPropagation()\"\n style=\"padding: 0px !important;\">\n <div class=\"d-flex flex-column {{column === 'employeeDetail' ? 'align-items-start ps-2' : 'align-items-center'}}\">\n <ng-container *ngIf=\"column === 'employeeDetail'\">\n <span class=\"head-employee-label\">{{ 'APP_HRM_ATTENDANCE.EMPLOYEE' | customTranslate : 'Employee' }}</span>\n </ng-container>\n <ng-container *ngIf=\"column !== 'employeeDetail' && column !== 'summary'\">\n <span class=\"head-day-letter\" [class.head-muted]=\"isWeekend(column)\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.day : '' }}\n </span>\n <span class=\"head-date-num\" [class.head-today]=\"isToday(column)\" [class.head-muted]=\"isWeekend(column)\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.date : '' }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"column === 'summary'\">\n <span class=\"head-day-letter\" title=\"Present / Working Days\">{{ 'APP_HRM_ATTENDANCE_TABLE.DAYS' | customTranslate : 'Days' }}</span>\n <i class=\"fusion-icon fusion-icon-size-md fusion-icon-attendance nav-icon mt-1\" style=\"color: var(--label-text-color);\" title=\"Present / Working Days\"></i>\n </ng-container>\n </div>\n </th>\n <!-- MR 18OCT26 Attendance body cell with initials avatar, softened chips, weekend suppression, and summary pill -->\n <td mat-cell class=\"body-color {{ column != 'employeeDetail' ? 'th-td' : '' }}\"\n [class.week-off]=\"isWeekend(column)\"\n style=\"text-align: center; padding: 0px !important;\" *matCellDef=\"let element\">\n <ng-container *ngIf=\"!element?.isSkeleton; else skeletonCell\">\n <!-- Employee Detail Column with Avatar and Metadata -->\n <div *ngIf=\"column === 'employeeDetail'\" class=\"emp-cell-container\">\n <div class=\"emp-avatar\">\n {{ getInitials(element[column]?.empName || element.employeeName || element.name) }}\n </div>\n <div class=\"emp-meta\">\n <div class=\"emp-name-row\">\n <span class=\"emp-name\" [class.hyper-link]=\"hyperLinkColumns.includes(column)\"\n (click)=\"hyperLinkColumns.includes(column) ? hyperLinkClick(element, column, i) : ''\"\n [title]=\"element[column]?.empName || element.employeeName || element.name\">\n {{ element[column]?.empName || element.employeeName || element.name }}\n </span>\n <span *ngIf=\"element[column]?.empId || element.employeeId || element.empId\" class=\"emp-id-tag\">\n {{ element[column]?.empId || element.employeeId || element.empId }}\n </span>\n </div>\n <div class=\"emp-sub-row\" [title]=\"(element[column]?.desig || element.designation || '') + ((element[column]?.loc || element.location) ? (', ' + (element[column]?.loc || element.location)) : '')\">\n <span>{{ element[column]?.desig || element.designation }}</span>\n <span *ngIf=\"(element[column]?.desig || element.designation) && (element[column]?.loc || element.location)\">, </span>\n <span>{{ element[column]?.loc || element.location }}</span>\n </div>\n </div>\n </div>\n\n <!-- Summary Pill Column -->\n <div *ngIf=\"column === 'summary'\" class=\"flex justify-center\">\n <span class=\"summary-pill\" [class.summary-pill--target]=\"isNearTarget(element.workingDays ?? element.presentDays, element.totalCompanyWorkingDays ?? element.totalWorkingDays)\"\n [title]=\"'Present: ' + (element.workingDays ?? element.presentDays ?? 0) + ' / Total Working Days: ' + (element.totalCompanyWorkingDays ?? element.totalWorkingDays ?? 0)\">\n {{element.workingDays ?? element.presentDays ?? 0}}/{{element.totalCompanyWorkingDays ?? element.totalWorkingDays ?? 0}}\n </span>\n </div>\n\n <!-- Attendance Day Columns -->\n <div *ngIf=\"column != 'summary' && column != 'employeeDetail' && column != 'employeeName' && column != 'employeeId' && column != 'designation' && column != 'location'\"\n (click)=\"doubleClickFunction(element, column, element[column])\">\n <!-- Weekend column with weekoff status: suppress chip, show subtle dash -->\n <ng-container *ngIf=\"isWeekend(column) && (!element?.[column]?.['value'] || ['weekoff'].includes((element?.[column]?.['value']?.status || '').toLowerCase()) || element?.[column]?.['value'] === '')\">\n <span class=\"att-dash\">-</span>\n </ng-container>\n\n <!-- Non-weekend future day without data: faint dot -->\n <ng-container *ngIf=\"!isWeekend(column) && isFutureDate(column) && (!element?.[column]?.['value'] || element?.[column]?.['value'] === '' || element?.[column]?.['value']?.status === 'Nil')\">\n <span class=\"att-future\">·</span>\n </ng-container>\n\n <!-- Non-weekend past day with missing log: subtle dashed outline -->\n <ng-container *ngIf=\"!isWeekend(column) && !isFutureDate(column) && (!element?.[column]?.['value'] || element?.[column]?.['value'] === '' || element?.[column]?.['value']?.status === 'Nil')\">\n <span class=\"att-missing\" title=\"No Record\"></span>\n </ng-container>\n\n <!-- Present State -->\n <span *ngIf=\"element?.[column]?.['value'] && ['present'].includes((element?.[column]?.['value']?.status || '').toLowerCase()) && element?.[column]?.['value']?.halfDay === false\"\n class=\"attendance-chip attendance-present\" title=\"Present\">✓</span>\n\n <!-- Review State -->\n <span *ngIf=\"element?.[column]?.['value'] && ['review'].includes((element?.[column]?.['value']?.status || '').toLowerCase()) && element?.[column]?.['value']?.halfDay === false\"\n class=\"attendance-chip attendance-review\" title=\"Review\">!</span>\n\n <!-- Absent / Leave State -->\n <span *ngIf=\"element?.[column]?.['value'] && (isLeaveType(element?.[column]?.['value']?.status) && (element?.[column]?.['value']?.halfDay !== true) || element?.[column]?.['value']?.isSplitLeave)\"\n class=\"attendance-chip attendance-absent\" [title]=\"element?.[column]?.['value']?.status || 'Absent'\">✕</span>\n\n <!-- Holiday State -->\n <span *ngIf=\"element?.[column]?.['value'] && ['holiday'].includes((element?.[column]?.['value']?.status || '').toLowerCase())\"\n class=\"attendance-chip attendance-holiday\" title=\"Holiday\">H</span>\n\n <!-- Half Day State -->\n <span *ngIf=\"element?.[column]?.['value']?.halfDay === true && !element?.[column]?.['value']?.isSplitLeave\"\n class=\"attendance-chip attendance-half\" title=\"Half Day\">½</span>\n\n <!-- Week Off State on non-weekend columns -->\n <span *ngIf=\"!isWeekend(column) && element?.[column]?.['value'] && ['weekoff'].includes((element?.[column]?.['value']?.status || '').toLowerCase())\"\n class=\"attendance-chip attendance-weekoff\" title=\"Week Off\">-</span>\n\n <!-- Total Hours or Numeric Values -->\n <div *ngIf=\"column === 'totalHours'\" style=\"font-size: var(--fs-small); color: var(--label-text-color); font-weight: var(--fw-600);\">\n {{element?.[column]?.['value']}}\n </div>\n <div *ngIf=\"containsOnlyNumbers(element?.[column]?.['value'])\" style=\"font-size: var(--fs-small); color: var(--label-text-color); font-weight: var(--fw-600);\">\n {{element?.[column]?.['value']}}\n </div>\n </div>\n </ng-container>\n\n <!-- Skeleton Loader Cell matching new layout -->\n <ng-template #skeletonCell>\n <div *ngIf=\"column === 'employeeDetail'\" class=\"emp-cell-container\">\n <div class=\"skeleton\" style=\"width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;\"></div>\n <div class=\"emp-meta\" style=\"flex: 1;\">\n <div class=\"skeleton skeleton-text\" style=\"width: 120px; height: 12px; margin-bottom: 4px; border-radius: 2px;\"></div>\n <div class=\"skeleton skeleton-text\" style=\"width: 80px; height: 10px; border-radius: 2px;\"></div>\n </div>\n </div>\n <div *ngIf=\"column === 'summary'\" class=\"flex justify-center\">\n <div class=\"skeleton skeleton-text\" style=\"width: 36px; height: 16px; margin: 0 auto; border-radius: 20px;\"></div>\n </div>\n <div *ngIf=\"column != 'employeeDetail' && column != 'summary'\" class=\"flex justify-center\">\n <div class=\"skeleton\" style=\"width: 22px; height: 22px; border-radius: 6px; margin: 0 auto;\"></div>\n </div>\n </ng-template>\n </td>\n </ng-container>\n <!-- Render the columns -->\n <div [ngSwitch]=\"renderColumns\">\n <div *ngSwitchCase=\"'select'\">\n <tr mat-header-row *matHeaderRowDef=\"['select'].concat(displayedColumns) sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: ['select'].concat(displayedColumns)\"\n (click)=\"tableClick(row)\">\n </tr>\n </div>\n <div *ngSwitchDefault>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\" (click)=\"tableClick(row)\"></tr>\n </div>\n </div>\n <!-- SKS10FEB26 No Data Row -->\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell\" [attr.colspan]=\"displayedColumns.length + 1\">\n <div class=\"flex\" style=\"display: flex; justify-content: center; align-items: center; height: 100px;\">\n <div>\n No data/ records found\n </div>\n </div>\n </td>\n </tr>\n </table>\n </div>\n <div class=\"d-flex justify-content-end Legend-div\">\n <mat-paginator #paginator [pageSizeOptions]=\"itemsPerPage\" [length]=\"totalCount\" [pageSize]=\"pageSize\"\n [pageIndex]=\"pageIndex\" showFirstLastButtons (page)=\"pageParams($event)\"></mat-paginator>\n </div>\n </div>\n </div>\n</div>\n\n\n<!-- SK03OCT24 side screen for filter while export button clicked -->\n<app-common-screen *ngIf=\"exportSidescreen\" headerTitle=\"Export Data\"\n (sideScreenEmittedEvent)=\"exportSidescreen = false\">\n <div class=\"side-main-content\">\n <!-- MY 15OCT26 export file button loader -->\n <div\n class=\"d-flex align-items-center flex-row p-3 justify-content-center cursor-pointer short-button-white-bg button-hov\"\n [class.disabled]=\"exportButtonLoadingSpinner\"\n (click)=\"!exportButtonLoadingSpinner ? exportButtonSideNav() : null\">\n <div *ngIf=\"exportButtonLoadingSpinner\" class=\"spinner-grow spinner-grow-sm me-2\" role=\"status\" aria-hidden=\"true\"></div>\n <img *ngIf=\"!exportButtonLoadingSpinner\" src=\"../assets/images/icons/general/upload-icon.svg \" class=\"card-icon color me-1\"\n title=\"download\">\n <div>{{ exportButtonLoadingSpinner ? (('APP_SETTINGS_APPS.LOADING' | customTranslate : 'Loading') + '...') : ('APP_HRM_ATTENDANCE_TABLE.EXPORT_FILE' | customTranslate : 'Export File') }}</div>\n </div>\n <!-- SK03OCT24 components to be displayed in side screen -->\n <div *ngFor=\"let type of filterScreenConfigs\">\n <!-- MY 15OCT26 pass button loader state to multi-checkbox and multiple-filter -->\n <app-multi-checkbox *ngIf=\"type.type === 'multipleCheckBox' \" class=\"ms-2 me-2\"\n [label]=\"type?.labelPath || type?.label | customTranslate : type?.label\" [cardSize]=\"type?.cardSize\"\n [cardInlineSize]=\"type?.cardInlineSize\" [checkboxList]=\"type?.checkboxList\"\n [activeCheckboxList]=\"type?.activeCheckboxList\" [buttonList]=\"type?.buttons\"\n [displayValues]=\"type?.displayValues\" [componentData]=\"type\" [checkBoxStyles]=\"type?.checkBoxStyles\"\n [isButtonLoadingSpinner]=\"type?.isButtonLoadingSpinner || false\"\n (compDataEmit)=\"exportFieldsButtonEmit($event)\">\n </app-multi-checkbox>\n <app-multiple-filter *ngIf=\"type.type === 'multipleFilter' \" class=\"ms-2 me-2\" [isDateFilter]=\"type?.isDateFilter\"\n [label]=\"type?.labelPath || type?.label | customTranslate : type?.label\" [cardSize]=\"type?.cardSize\"\n [cardInlineSize]=\"type?.cardInlineSize\" [buttonList]=\"type?.buttons\" [displayValues]=\"type?.displayValues\"\n [componentData]=\"type\" [checkBoxStyles]=\"type?.checkBoxStyles\" [selectionData]=\"type?.selectionData\"\n [isButtonLoadingSpinner]=\"type?.isButtonLoadingSpinner || false\"\n (compDataEmit)=\"exportFilterButtonEmit($event)\" (selectedValuesEmit)=\"selectedValuesEmit($event)\"\n (filterDateEmit)=\"filterDateEmit($event)\">\n </app-multiple-filter>\n </div>\n </div>\n</app-common-screen>\n\n<!-- SK24OCT25 Sandwich confirm pop up -->\n<div *ngIf=\"confirmModal\" class=\"modal modal-backdrop show d-block\" id=\"confirmRecord\" tabindex=\"-1\"\n aria-labelledby=\"confirmRecordLabel\" [attr.aria-hidden]=\"!confirmModal\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <b class=\"modal-title fs-5\" id=\"confirmRecordLabel\">{{'APP.CONFIRM_SADWICH' | customTranslate : 'Confirm Sandwich'}}</b>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"\n (click)=\"confirmModal = false\"></button>\n </div>\n <div class=\"modal-body\">\n {{'APP.ARE_YOU_SURE_YOU_WANT_TO_CONVERT_THE_SANDWICH' | customTranslate : 'Are you sure want to convert sandwich leaves for the month'}} ?\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-primary\" data-bs-dismiss=\"modal\" aria-label=\"Close\"\n (click)=\"!buttonLoadingSpinner ? checkButtonClicked() : null\">\n <span class=\"{{ buttonLoadingSpinner ? 'spinner-grow' : '' }} spinner-grow-sm\" role=\"buttonValue\"\n aria-hidden=\"true\"></span>\n <span>{{ buttonLoadingSpinner ? ('APP_SETTINGS_APPS.LOADING' | customTranslate : 'Loading') + '...' :\n ('APP.YES' | customTranslate : 'Yes') }}\n </span>\n </button>\n <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\"\n (click)=\"confirmModal = false\">{{'APP.NO' | customTranslate : 'No'}}</button>\n </div>\n </div>\n </div>\n</div>\n",
|
|
8066
|
+
styles: [".table-wrapper{overflow-x:auto;max-width:100%}.table-container{max-height:600px;overflow-y:auto;display:block;width:100%}.table-layout{background:var(--fb-surface, #ffffff);border-radius:8px}.th{border-bottom:1px solid var(--fb-border-default, #e2e8f0);font-weight:var(--fw-600);font-size:var(--fs-normal);line-height:21px;color:var(--fb-text-primary, #0f172a)}.head-color{background:var(--fb-action-surface, #e0f2fe)!important;color:var(--fb-text-primary, #0f172a)!important}.body-color{color:var(--fb-text-primary, #0f172a);cursor:default}.search{display:flex;justify-content:space-between;border:1px solid var(--fb-border-default, #e2e8f0);background:var(--fb-surface, #ffffff);border-radius:6px;align-self:center}.search-bar{display:flex;flex-direction:row;align-items:center;width:100%;margin:5px}.card-btn{height:18px;width:18px}td.mat-cell:last-of-type{padding:8px;font-size:var(--fs-medium)}.table-title{font-weight:var(--fw-600);font-size:var(--fs-medium)}.search-component{top:20px;width:max-content;right:-30%}.sticky-column{background:var(--fb-surface, #ffffff)}.mat-sort-header-container{margin-left:5px}.body-color img{width:25px;padding:5px;cursor:pointer}.head-color.action-size{color:var(--fb-text-primary, #0f172a);font-size:var(--fs-primary);font-weight:var(--fw-600)}.lop-input{border:none;color:var(--fb-text-primary, #0f172a);max-width:50px}.mat-cell{padding:8px;white-space:nowrap;text-overflow:ellipsis}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-right:24px}::ng-deep [dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type){padding-right:10px!important;padding-left:unset!important}.mat-sort-header-container.mat-focus-indicator.ng-tns-c139-34{margin-left:5px}.mat-column-select{width:44px!important;min-width:44px!important;max-width:44px!important;text-align:center;padding:0!important;overflow:clip!important;text-overflow:clip!important}.mat-column-employeeDetail{width:260px!important;min-width:260px!important;max-width:260px!important;left:44px!important;padding-left:8px!important;padding-right:8px!important}.mat-column-summary{width:64px!important;min-width:64px!important;max-width:64px!important;text-align:center;padding:0 4px!important}.th-td{width:36px!important;min-width:36px!important;max-width:36px!important;text-align:center;padding:0!important}::ng-deep .mdc-data-table__cell,.mdc-data-table__header-cell{padding:0!important}::ng-deep .mat-mdc-checkbox-touch-target{height:28px!important}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding:0 8px}.mat-row{height:56px!important;min-height:56px!important;transition:background-color .15s ease}.mat-row:hover,.mat-row:hover .sticky-column,.mat-row:hover .sticky-col{background-color:var(--fb-row-hover, #f8fafc)!important}.mat-cell{height:56px!important;padding:0 2px!important;white-space:nowrap;color:var(--fb-text-primary, #0f172a)}.mat-header-row{height:52px!important;position:sticky;top:0;background:var(--fb-action-surface, #e0f2fe);z-index:20;border-bottom:1px solid var(--fb-border-default, #e2e8f0);color:var(--fb-text-primary, #0f172a)}.sticky-select .mdc-checkbox{opacity:.55;transition:opacity .15s ease}.mat-row:hover .sticky-select .mdc-checkbox,.sticky-select .mdc-checkbox--selected,.sticky-select .mdc-checkbox--indeterminate{opacity:1!important}.week-off{background:var(--week-off, #f8fafc)!important}.holiday{background:color-mix(in srgb,var(--holiday, #0284c7),var(--comp-bg-color, #ffffff) 88%)!important;color:var(--holiday, #0284c7)}.attendance-chip{width:22px;height:22px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;font-size:var(--fs-Usmall, 11px);font-weight:var(--fw-600, 600);cursor:pointer;transition:transform .1s ease;-webkit-user-select:none;user-select:none}.attendance-chip:hover{transform:scale(1.1)}.attendance-chip.attendance-present{background:color-mix(in srgb,var(--attendance-present, #16a34a),var(--comp-bg-color, #ffffff) 88%);color:var(--attendance-present, #16a34a)}.attendance-chip.attendance-absent{background:color-mix(in srgb,var(--attendance-absent, #ef4444),var(--comp-bg-color, #ffffff) 88%);color:var(--attendance-absent, #ef4444)}.attendance-chip.attendance-half{background:color-mix(in srgb,var(--attendance-half, #f59e0b),var(--comp-bg-color, #ffffff) 85%);color:color-mix(in srgb,var(--attendance-half, #f59e0b),black 45%)}.attendance-chip.attendance-holiday{background:color-mix(in srgb,var(--holiday, #0284c7),var(--comp-bg-color, #ffffff) 88%);color:var(--holiday, #0284c7)}.attendance-chip.attendance-review{background:color-mix(in srgb,var(--clr-warning, #f59e0b),var(--comp-bg-color, #ffffff) 85%);color:var(--clr-warning, #f59e0b)}.attendance-chip.attendance-weekoff{background:color-mix(in srgb,var(--attendance-weekoff, #64748b),var(--comp-bg-color, #ffffff) 90%);color:var(--attendance-weekoff, #64748b)}.att-missing{width:20px;height:20px;border:1px dashed color-mix(in srgb,var(--border-color, #e2e8f0),black 15%);border-radius:6px;display:inline-block}.att-future{color:var(--fc-text-color-light, #94a3b8);font-size:16px;line-height:1;display:inline-block;opacity:.5}.att-dash{color:var(--label-text-color-light, #64748b);font-size:14px}.emp-cell-container{display:flex;align-items:center;gap:10px;width:100%;padding:0 4px}.emp-avatar{width:32px;height:32px;min-width:32px;border-radius:50%;font-size:var(--fs-small, 12px);font-weight:var(--fw-600, 600);background:var(--fb-action-surface, #e0f2fe);color:var(--fb-action, #003566);display:flex;align-items:center;justify-content:center;flex-shrink:0}.emp-meta{display:flex;flex-direction:column;overflow:hidden;text-align:left;line-height:1.25;min-width:0}.emp-name-row{display:flex;align-items:center;gap:6px;overflow:hidden}.emp-name{font-size:var(--fs-normal, 13px);font-weight:var(--fw-600, 600);color:var(--fc-text-color-dark, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.emp-id-tag{font-size:var(--fs-Usmall, 11px);font-weight:var(--fw-500, 500);background:var(--hover-module-bg, #f1f5f9);color:var(--label-text-color, #475569);padding:1px 5px;border-radius:4px;border:1px solid var(--border-color, #e2e8f0);flex-shrink:0}.emp-sub-row{font-size:var(--fs-Usmall, 11px);color:var(--label-text-color-light, #64748b);font-weight:var(--fw-500, 500);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.summary-pill{padding:2px 8px;border-radius:20px;font-size:var(--fs-Usmall, 11px);font-weight:var(--fw-600, 600);background:var(--hover-module-bg, #f1f5f9);color:var(--label-text-color, #475569);border:1px solid var(--border-color, #e2e8f0);display:inline-block;white-space:nowrap}.summary-pill--target{background:color-mix(in srgb,var(--attendance-present, #16a34a),var(--comp-bg-color, #ffffff) 88%);color:var(--attendance-present, #16a34a);border-color:color-mix(in srgb,var(--attendance-present, #16a34a),var(--comp-bg-color, #ffffff) 70%)}.head-employee-label{font-size:var(--fs-small, 12px);font-weight:var(--fw-600, 600);color:var(--fc-text-color-dark, #0f172a)}.head-day-letter{font-size:var(--fs-Usmall, 11px);color:var(--fc-text-color-light, #64748b);font-weight:var(--fw-500, 500);line-height:1;text-transform:uppercase}.head-date-num{font-size:var(--fs-normal, 13px);font-weight:var(--fw-600, 600);color:var(--fc-text-color-dark, #0f172a);line-height:1.4;margin-top:2px}.head-today{background:var(--fb-action, #003566)!important;color:var(--fb-text-on-action, #ffffff)!important;border-radius:50%;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center}.head-muted{color:var(--fb-text-muted, #94a3b8)!important}.top-legend-bar{border-top:1px solid var(--fb-border-default, #e2e8f0);padding:8px 12px;font-size:var(--fs-small, 12px);background:var(--fb-surface, #ffffff)}.legend-text{font-size:var(--fs-small, 12px);color:var(--fc-text-color-dark, #0f172a);font-weight:var(--fw-500, 500)}.table-subtitle{font-size:var(--fs-normal, 13px);color:var(--label-text-color-light, #64748b);font-weight:var(--fw-500, 500)}@media screen and (min-width:600px){mat-table{font-size:18px}}@media screen and (max-width:882px){mat-table{font-size:var(--fs-medium)}.mat-column-name,.mat-column-weight{display:none}.mat-header-cell{padding:8px}}.hyper-link{text-decoration:none}.hyper-link:hover{color:var(--fb-action, #003566);text-decoration:underline;cursor:pointer}.button-hov:hover{background:var(--fb-action, #003566);color:var(--fb-text-on-action, #ffffff)}.btn-primary{color:var(--fb-text-on-action, #ffffff)!important;background-color:var(--fb-action, #003566)!important;border-color:var(--fb-action, #003566)!important;padding:4px 9px;border-radius:.375rem}.btn-primary:hover{color:var(--fb-text-on-action, #ffffff)!important;background-color:var(--fb-action-hover, #00284d)!important;border-color:var(--fb-action-hover, #00284d)!important}.btn-primary:active,.btn-primary.active,.show>.btn-primary.dropdown-toggle{color:var(--fb-text-on-action, #ffffff)!important;background-color:var(--fb-action-pressed, #001f3f)!important;border-color:var(--fb-action-pressed, #001f3f)!important}.btn-primary:disabled,.btn-primary.disabled{color:var(--fb-text-disabled, #94a3b8)!important;background-color:var(--fb-action-disabled, #e2e8f0)!important;border-color:var(--fb-action-disabled, #e2e8f0)!important}::ng-deep .clickable-img{height:36px!important;transition:unset!important;border:unset!important;border-radius:0!important}::ng-deep nxt-button.ms-2,::ng-deep nxt-button.me-2{margin-left:0!important;margin-right:0!important}.body-color img{border-radius:8px!important}.modal-backdrop{opacity:.9}.mat-table{width:100%;border-spacing:0}.mat-header-row{position:sticky;top:0;background:var(--fb-action-surface, #e0f2fe);color:var(--fb-text-primary, #0f172a);z-index:2}.picker-container{display:flex;align-items:center;font-size:18px;font-weight:600;border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px}.month-label{cursor:pointer;min-width:100px;text-align:center;font-size:var(--fs-medium, 14px)}.arrow-btn{border:none;background:transparent;font-size:20px;cursor:pointer}.popup{position:absolute;margin-top:45px;background:var(--fb-surface-elevated, #ffffff);padding:15px;box-shadow:0 4px 12px var(--fb-backdrop, rgba(0,0,0,.12));border-radius:var(--radius-medium, 8px);width:200px;z-index:1000}.year-section{display:flex;justify-content:center;align-items:center;gap:12px;margin-bottom:10px;font-size:var(--fs-medium, 14px)}.year-section button{background:var(--fb-surface-secondary, #f8fafc);color:var(--fb-text-primary, #0f172a);border:none;padding:3px 8px;font-size:14px;cursor:pointer}.month-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;font-size:var(--fs-medium, 14px)}.month-item{padding:6px;border-radius:4px;text-align:center;cursor:pointer;background-color:var(--fb-surface-secondary, #f8fafc)}.month-item.active{background:var(--fb-action, #003566);color:var(--fb-text-on-action, #ffffff)}.Legend-font{font-size:var(--fs-normal, 13px)}.table-margin,.Legend-div{border-top:solid .5px var(--fb-border-default, #e2e8f0)}.sticky-checkbox{position:sticky;left:0;z-index:1000;background:var(--fb-surface, #ffffff);min-width:48px;width:48px}th.sticky-checkbox{z-index:1100}\n"],
|
|
7864
8067
|
dependencies: [
|
|
7865
8068
|
{
|
|
7866
8069
|
kind: "ngmodule",
|
|
7867
8070
|
type: CommonModule
|
|
7868
8071
|
},
|
|
7869
|
-
{
|
|
7870
|
-
kind: "directive",
|
|
7871
|
-
type: i1$4.NgClass,
|
|
7872
|
-
selector: "[ngClass]",
|
|
7873
|
-
inputs: ["class", "ngClass"]
|
|
7874
|
-
},
|
|
7875
8072
|
{
|
|
7876
8073
|
kind: "directive",
|
|
7877
8074
|
type: i1$4.NgForOf,
|
|
@@ -7894,9 +8091,20 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7894
8091
|
},
|
|
7895
8092
|
{
|
|
7896
8093
|
kind: "directive",
|
|
7897
|
-
type: i1$4.
|
|
7898
|
-
selector: "[
|
|
7899
|
-
inputs: ["
|
|
8094
|
+
type: i1$4.NgSwitch,
|
|
8095
|
+
selector: "[ngSwitch]",
|
|
8096
|
+
inputs: ["ngSwitch"]
|
|
8097
|
+
},
|
|
8098
|
+
{
|
|
8099
|
+
kind: "directive",
|
|
8100
|
+
type: i1$4.NgSwitchCase,
|
|
8101
|
+
selector: "[ngSwitchCase]",
|
|
8102
|
+
inputs: ["ngSwitchCase"]
|
|
8103
|
+
},
|
|
8104
|
+
{
|
|
8105
|
+
kind: "directive",
|
|
8106
|
+
type: i1$4.NgSwitchDefault,
|
|
8107
|
+
selector: "[ngSwitchDefault]"
|
|
7900
8108
|
},
|
|
7901
8109
|
{
|
|
7902
8110
|
kind: "ngmodule",
|
|
@@ -7966,6 +8174,11 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7966
8174
|
selector: "mat-row, tr[mat-row]",
|
|
7967
8175
|
exportAs: ["matRow"]
|
|
7968
8176
|
},
|
|
8177
|
+
{
|
|
8178
|
+
kind: "directive",
|
|
8179
|
+
type: i9$1.MatNoDataRow,
|
|
8180
|
+
selector: "ng-template[matNoDataRow]"
|
|
8181
|
+
},
|
|
7969
8182
|
{
|
|
7970
8183
|
kind: "ngmodule",
|
|
7971
8184
|
type: MatSortModule
|
|
@@ -7984,27 +8197,153 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7984
8197
|
outputs: ["matSortChange"],
|
|
7985
8198
|
exportAs: ["matSort"]
|
|
7986
8199
|
},
|
|
8200
|
+
{
|
|
8201
|
+
kind: "ngmodule",
|
|
8202
|
+
type: MatPaginatorModule
|
|
8203
|
+
},
|
|
7987
8204
|
{
|
|
7988
8205
|
kind: "component",
|
|
7989
|
-
type:
|
|
7990
|
-
selector: "
|
|
8206
|
+
type: i6$1.MatPaginator,
|
|
8207
|
+
selector: "mat-paginator",
|
|
7991
8208
|
inputs: [
|
|
7992
|
-
"
|
|
7993
|
-
"
|
|
7994
|
-
"
|
|
7995
|
-
"
|
|
7996
|
-
"
|
|
7997
|
-
"
|
|
8209
|
+
"color",
|
|
8210
|
+
"pageIndex",
|
|
8211
|
+
"length",
|
|
8212
|
+
"pageSize",
|
|
8213
|
+
"pageSizeOptions",
|
|
8214
|
+
"hidePageSize",
|
|
8215
|
+
"showFirstLastButtons",
|
|
8216
|
+
"selectConfig",
|
|
8217
|
+
"disabled"
|
|
7998
8218
|
],
|
|
7999
|
-
|
|
8219
|
+
outputs: ["page"],
|
|
8220
|
+
exportAs: ["matPaginator"]
|
|
8000
8221
|
},
|
|
8001
8222
|
{
|
|
8002
8223
|
kind: "ngmodule",
|
|
8003
|
-
type:
|
|
8224
|
+
type: MatTooltipModule
|
|
8004
8225
|
},
|
|
8005
8226
|
{
|
|
8006
8227
|
kind: "ngmodule",
|
|
8007
|
-
type:
|
|
8228
|
+
type: MatCheckboxModule
|
|
8229
|
+
},
|
|
8230
|
+
{
|
|
8231
|
+
kind: "component",
|
|
8232
|
+
type: i3$1.MatCheckbox,
|
|
8233
|
+
selector: "mat-checkbox",
|
|
8234
|
+
inputs: [
|
|
8235
|
+
"aria-label",
|
|
8236
|
+
"aria-labelledby",
|
|
8237
|
+
"aria-describedby",
|
|
8238
|
+
"aria-expanded",
|
|
8239
|
+
"aria-controls",
|
|
8240
|
+
"aria-owns",
|
|
8241
|
+
"id",
|
|
8242
|
+
"required",
|
|
8243
|
+
"labelPosition",
|
|
8244
|
+
"name",
|
|
8245
|
+
"value",
|
|
8246
|
+
"disableRipple",
|
|
8247
|
+
"tabIndex",
|
|
8248
|
+
"color",
|
|
8249
|
+
"disabledInteractive",
|
|
8250
|
+
"checked",
|
|
8251
|
+
"disabled",
|
|
8252
|
+
"indeterminate"
|
|
8253
|
+
],
|
|
8254
|
+
outputs: ["change", "indeterminateChange"],
|
|
8255
|
+
exportAs: ["matCheckbox"]
|
|
8256
|
+
},
|
|
8257
|
+
{
|
|
8258
|
+
kind: "component",
|
|
8259
|
+
type: NxtButtonComponent,
|
|
8260
|
+
selector: "nxt-button",
|
|
8261
|
+
inputs: [
|
|
8262
|
+
"buttonValue",
|
|
8263
|
+
"buttonType",
|
|
8264
|
+
"type",
|
|
8265
|
+
"buttonDisable",
|
|
8266
|
+
"btnBgColor",
|
|
8267
|
+
"btnBorder",
|
|
8268
|
+
"btnBorderRadius",
|
|
8269
|
+
"btnBorderColor",
|
|
8270
|
+
"btnTextColor",
|
|
8271
|
+
"btnHeight",
|
|
8272
|
+
"btnWidth",
|
|
8273
|
+
"btnIconLeftSrc",
|
|
8274
|
+
"btnIconRightSrc",
|
|
8275
|
+
"btnHoverBgColor",
|
|
8276
|
+
"btnHoverTextColor",
|
|
8277
|
+
"btnId",
|
|
8278
|
+
"dataDismiss",
|
|
8279
|
+
"modalToTrigger",
|
|
8280
|
+
"isImageSvg",
|
|
8281
|
+
"tabIndex",
|
|
8282
|
+
"buttonConfig",
|
|
8283
|
+
"mode",
|
|
8284
|
+
"languageCode",
|
|
8285
|
+
"padding",
|
|
8286
|
+
"isLoading",
|
|
8287
|
+
"selector",
|
|
8288
|
+
"dropdownLoadingButton"
|
|
8289
|
+
],
|
|
8290
|
+
outputs: ["buttonClickEmit"]
|
|
8291
|
+
},
|
|
8292
|
+
{
|
|
8293
|
+
kind: "component",
|
|
8294
|
+
type: CommonScreenComponent,
|
|
8295
|
+
selector: "app-common-screen",
|
|
8296
|
+
inputs: ["headerTitle", "dynamicScreenStyle"],
|
|
8297
|
+
outputs: ["sideScreenEmittedEvent"]
|
|
8298
|
+
},
|
|
8299
|
+
{
|
|
8300
|
+
kind: "component",
|
|
8301
|
+
type: MultiCheckboxComponent,
|
|
8302
|
+
selector: "app-multi-checkbox",
|
|
8303
|
+
inputs: [
|
|
8304
|
+
"label",
|
|
8305
|
+
"checkboxList",
|
|
8306
|
+
"activeCheckboxList",
|
|
8307
|
+
"cardSize",
|
|
8308
|
+
"componentData",
|
|
8309
|
+
"cardInlineSize",
|
|
8310
|
+
"buttonList",
|
|
8311
|
+
"cardClass",
|
|
8312
|
+
"clearSelection",
|
|
8313
|
+
"displayValues",
|
|
8314
|
+
"checkBoxStyles",
|
|
8315
|
+
"contentCardStyle",
|
|
8316
|
+
"cardStyle",
|
|
8317
|
+
"radioCheck",
|
|
8318
|
+
"isButtonLoadingSpinner"
|
|
8319
|
+
],
|
|
8320
|
+
outputs: ["compDataEmit", "checkEmit"]
|
|
8321
|
+
},
|
|
8322
|
+
{
|
|
8323
|
+
kind: "component",
|
|
8324
|
+
type: MultipleFilterComponent,
|
|
8325
|
+
selector: "app-multiple-filter",
|
|
8326
|
+
inputs: [
|
|
8327
|
+
"label",
|
|
8328
|
+
"checkboxList",
|
|
8329
|
+
"activeCheckboxList",
|
|
8330
|
+
"cardSize",
|
|
8331
|
+
"componentData",
|
|
8332
|
+
"cardInlineSize",
|
|
8333
|
+
"buttonList",
|
|
8334
|
+
"cardClass",
|
|
8335
|
+
"displayValues",
|
|
8336
|
+
"checkBoxStyles",
|
|
8337
|
+
"selectionData",
|
|
8338
|
+
"isDateFilter",
|
|
8339
|
+
"isButtonLoadingSpinner"
|
|
8340
|
+
],
|
|
8341
|
+
outputs: [
|
|
8342
|
+
"compDataEmit",
|
|
8343
|
+
"checkEmit",
|
|
8344
|
+
"selectedValuesEmit",
|
|
8345
|
+
"filterDateEmit"
|
|
8346
|
+
]
|
|
8008
8347
|
},
|
|
8009
8348
|
{
|
|
8010
8349
|
kind: "pipe",
|
|
@@ -8038,14 +8377,27 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8038
8377
|
MatSortModule,
|
|
8039
8378
|
MatPaginatorModule,
|
|
8040
8379
|
MatTooltipModule,
|
|
8380
|
+
MatCheckboxModule,
|
|
8381
|
+
NxtButtonComponent,
|
|
8382
|
+
CommonScreenComponent,
|
|
8383
|
+
MultiCheckboxComponent,
|
|
8384
|
+
MultipleFilterComponent,
|
|
8041
8385
|
CustomTranslatePipe
|
|
8042
8386
|
],
|
|
8043
8387
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8044
|
-
template: "<!-- MR 09NOV26 Introduce AttendanceTableComponent and harden CustomTranslatePipe -->\n<div class=\"attendance-table-container\">\n <!-- Top Bar: Month/Year Navigation, Legend, Actions & Search -->\n <div class=\"attendance-top-bar d-flex justify-content-between align-items-center flex-wrap gap-2 pb-2\">\n <!-- Month/Year Navigation -->\n <div class=\"d-flex align-items-center gap-2\">\n <div class=\"picker-container position-relative\">\n <i class=\"arrow-btn cursor-pointer fusion-icon fusion-icon-size-lg fusion-icon-arrow-left-1 nav-icon\"\n (click)=\"prevMonth()\" title=\"Previous Month\"></i>\n <span class=\"month-label cursor-pointer fw-semibold px-2\" (click)=\"togglePopup()\">\n {{ months[selectedMonth] }} {{ selectedYear }}\n </span>\n <i class=\"arrow-btn cursor-pointer fusion-icon fusion-icon-size-lg fusion-icon-arrow-right-1 nav-icon\"\n (click)=\"nextMonth()\" title=\"Next Month\"></i>\n\n <!-- Month/Year Picker Dropdown Popup -->\n <div class=\"popup position-absolute shadow-sm rounded-3 p-3 bg-white\" *ngIf=\"popupOpen\">\n <div class=\"year-section d-flex justify-content-between align-items-center mb-2\">\n <i class=\"arrow-btn cursor-pointer fusion-icon fusion-icon-arrow-left-1\" (click)=\"changeYear(-1)\"></i>\n <span class=\"fw-bold\">{{ selectedYear }}</span>\n <i class=\"arrow-btn cursor-pointer fusion-icon fusion-icon-arrow-right-1\" (click)=\"changeYear(1)\"></i>\n </div>\n <div class=\"month-grid d-grid\" style=\"grid-template-columns: repeat(3, 1fr); gap: 6px;\">\n <div *ngFor=\"let m of (monthArray && monthArray.length > 0 ? monthArray : months); let i = index\"\n class=\"month-item text-center p-2 rounded cursor-pointer\"\n [class.active]=\"i === selectedMonth\"\n (click)=\"selectMonth(i)\">\n {{ m | slice:0:3 }}\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Attendance Legend Bar -->\n <div class=\"top-legend-bar d-flex align-items-center gap-3 flex-wrap\">\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-present\">✓</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.PREsENT' | customTranslate : 'Present' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-absent\">✕</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.ABSENT' | customTranslate : 'Absent' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-half\">½</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.HALF_DAY' | customTranslate : 'Half day' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-holiday\">H</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.HOLIDAY' | customTranslate : 'Holiday' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-weekoff\">-</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.WEEK_OFF' | customTranslate : 'Week Off' }}</span>\n </div>\n <div class=\"table-subtitle ms-auto fw-semibold text-secondary\" *ngIf=\"titleOn && title\">\n {{ title | customTranslate : title }}\n </div>\n </div>\n\n <!-- Actions & Search Toolbar -->\n <div class=\"d-flex align-items-center gap-2 ms-auto\">\n <button *ngIf=\"isSandwichLeave && isCheckButton !== false\"\n type=\"button\"\n class=\"btn btn-primary btn-sm\"\n (click)=\"confirmModal = true\">\n {{ 'APP_HRM_ATTENDANCE.CHECK' | customTranslate : 'Check' }}\n </button>\n\n <div class=\"search\" *ngIf=\"searchBar\">\n <div class=\"search-bar d-flex align-items-center px-2 py-1\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 22\" fill=\"none\" class=\"me-1\">\n <circle cx=\"11.64\" cy=\"10.54\" r=\"8.7\" stroke=\"#787486\" stroke-width=\"1.5\"/>\n <path d=\"M21.63 20.17L19.73 18.33\" stroke=\"#787486\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n </svg>\n <input type=\"text\"\n class=\"search-input\"\n [placeholder]=\"'APP_HRM_ATTENDANCE_TABLE.SEARCH' | customTranslate : 'Search'\"\n (keyup)=\"applyFilter($event)\"\n [value]=\"searchTextValue || ''\" />\n </div>\n </div>\n </div>\n </div>\n\n <!-- Loading Skeleton State -->\n <div *ngIf=\"isLoading; else dataTableTemplate\" class=\"attendance-skeleton-container py-3\">\n <table class=\"w-100\">\n <tr *ngFor=\"let _ of [1, 2, 3, 4, 5, 6]\" style=\"height: 48px;\">\n <td class=\"skeleton-cell p-2\">\n <div class=\"skeleton-line\" style=\"height: 24px; border-radius: 4px; background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);\"></div>\n </td>\n </tr>\n </table>\n </div>\n\n <!-- Matrix Table View -->\n <ng-template #dataTableTemplate>\n <div class=\"table-responsive table-container\" tabindex=\"0\">\n <table mat-table [dataSource]=\"dataSource\" [ngStyle]=\"{ width: tableWidth }\" matSort class=\"attendance-mat-table w-100\">\n\n <!-- Checkbox Selection Column -->\n <ng-container *ngIf=\"withCheckBox\" matColumnDef=\"select\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef class=\"sticky-column checkbox-col text-center\">\n <input type=\"checkbox\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"masterToggle()\"\n [checked]=\"selection.hasValue()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n class=\"custom-checkbox\" />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"sticky-column checkbox-col text-center\">\n <input type=\"checkbox\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"rowToggle(row)\"\n [checked]=\"selection.isSelected(row)\"\n class=\"custom-checkbox\" />\n </td>\n </ng-container>\n\n <!-- Dynamic Data & Calendar Day Columns -->\n <ng-container *ngFor=\"let column of displayedColumns; let i = index\" [matColumnDef]=\"column\"\n [sticky]=\"isColumnSticky(column)\">\n <!-- Matrix Column Header -->\n <th mat-header-cell *matHeaderCellDef mat-sort-header\n [class.sticky-column]=\"isColumnSticky(column)\"\n [class.weekend-header]=\"isWeekend(column)\"\n [class.today-header]=\"isToday(column)\"\n [class.employee-detail-th]=\"column === 'employeeDetail'\"\n [class.calendar-day-th]=\"column !== 'employeeDetail' && column !== 'summary'\"\n class=\"head-cell text-center\">\n\n <!-- Employee Detail Column Header -->\n <ng-container *ngIf=\"column === 'employeeDetail'\">\n <div class=\"text-start ps-2 fw-semibold\">\n {{ 'Employee' | customTranslate : 'Employee' }}\n </div>\n </ng-container>\n\n <!-- Calendar Day Columns (Objects: { date, day, month, year }) -->\n <ng-container *ngIf=\"column !== 'employeeDetail' && column !== 'summary'\">\n <div class=\"d-flex flex-column align-items-center py-1\">\n <span class=\"head-day-letter\" [class.head-muted]=\"isWeekend(column)\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.day : '' }}\n </span>\n <span class=\"head-date-num\" [class.head-today]=\"isToday(column)\" [class.head-muted]=\"isWeekend(column)\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.date : '' }}\n </span>\n </div>\n </ng-container>\n\n <!-- Summary Column Header -->\n <ng-container *ngIf=\"column === 'summary'\">\n <div class=\"fw-semibold px-2\">\n {{ 'APP_HRM_ATTENDANCE_TABLE.DAYS' | customTranslate : 'Days' }}\n </div>\n </ng-container>\n </th>\n\n <!-- Matrix Column Data Cell -->\n <td mat-cell *matCellDef=\"let element\"\n [class.sticky-column]=\"isColumnSticky(column)\"\n [class.weekend-cell]=\"isWeekend(column)\"\n [class.today-cell]=\"isToday(column)\"\n [class.future-cell]=\"isFutureDate(column)\"\n [class.calendar-day-td]=\"column !== 'employeeDetail' && column !== 'summary'\"\n class=\"body-cell text-center\"\n (click)=\"onCellClick(element, column)\">\n\n <!-- Employee Detail Cell (Avatar & Info) -->\n <div *ngIf=\"column === 'employeeDetail'\" class=\"d-flex align-items-center gap-2 py-1 ps-2 text-start\">\n <div class=\"avatar-circle flex-shrink-0\">\n {{ getInitials(element.employeeName || element.name || '') }}\n </div>\n <div class=\"employee-meta text-truncate\">\n <div class=\"emp-name fw-semibold text-truncate\">\n {{ element.employeeName || element.name || '' }}\n </div>\n <div class=\"emp-id text-muted\" style=\"font-size: 11px;\">\n [{{ element.employeeId || element.empId || '' }}]\n </div>\n </div>\n </div>\n\n <!-- Calendar Day Attendance Chip Cell -->\n <div *ngIf=\"column !== 'employeeDetail' && column !== 'summary'\"\n class=\"attendance-cell cursor-pointer d-flex justify-content-center align-items-center\"\n (dblclick)=\"onCellDoubleClick(element, column)\">\n <span *ngIf=\"element[column]\"\n class=\"attendance-chip\"\n [ngClass]=\"getAttendanceChipClass(element[column])\">\n {{ getAttendanceChipSymbol(element[column]) }}\n </span>\n </div>\n\n <!-- Summary Column Pill -->\n <div *ngIf=\"column === 'summary'\" class=\"summary-pill px-2 py-1 fw-semibold text-center\">\n {{ element.presentDays !== undefined ? element.presentDays : (element.present || 0) }} /\n {{ element.totalWorkingDays !== undefined ? element.totalWorkingDays : (element.totalDays || 0) }}\n </div>\n </td>\n </ng-container>\n\n <!-- Row Declarations -->\n <tr mat-header-row *matHeaderRowDef=\"(withCheckBox ? ['select'].concat(displayedColumns) : displayedColumns); sticky: true\" class=\"table-header-row\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: (withCheckBox ? ['select'].concat(displayedColumns) : displayedColumns);\" class=\"table-data-row\"></tr>\n </table>\n\n <!-- Empty State -->\n <div *ngIf=\"!dataSource.data || dataSource.data.length === 0\" class=\"no-records-cell text-center py-4 text-muted\">\n {{ 'APP.NO_RECORDS' | customTranslate : 'No records/data found.' }}\n </div>\n </div>\n </ng-template>\n</div>\n\n<!-- Sandwich Leave Confirmation Modal -->\n<div *ngIf=\"confirmModal\" class=\"custom-modal-overlay position-fixed top-0 start-0 w-100 h-100 d-flex justify-content-center align-items-center\">\n <div class=\"custom-modal bg-white rounded-3 shadow-lg p-4\" style=\"max-width: 420px; width: 90%;\">\n <div class=\"custom-modal-header d-flex justify-content-between align-items-center mb-3\">\n <b class=\"fs-6\">{{ 'APP_HRM_ATTENDANCE.CHECK_ATTENDANCE' | customTranslate : 'Check Attendance' }}</b>\n <button type=\"button\" class=\"btn-close\" (click)=\"confirmModal = false\"></button>\n </div>\n <div class=\"custom-modal-body mb-4 text-secondary\">\n {{ 'APP_HRM_ATTENDANCE.CONFIRM_CHECK' | customTranslate : 'Are you sure you want to run attendance check?' }}\n </div>\n <div class=\"custom-modal-footer d-flex justify-content-end gap-2\">\n <button type=\"button\" class=\"btn btn-secondary btn-sm\" (click)=\"confirmModal = false\">\n {{ 'APP.NO' | customTranslate : 'No' }}\n </button>\n <button type=\"button\" class=\"btn btn-primary btn-sm\" (click)=\"checkButtonClicked(); confirmModal = false\">\n {{ 'APP.YES' | customTranslate : 'Yes' }}\n </button>\n </div>\n </div>\n</div>\n\n",
|
|
8045
|
-
|
|
8388
|
+
providers: [{
|
|
8389
|
+
provide: MatPaginatorIntl,
|
|
8390
|
+
useClass: CustomPaginatorIntl
|
|
8391
|
+
}],
|
|
8392
|
+
template: "<!-- MR 10NOV26 Port exact DataTableTwoComponent template from host testMaster -->\n<div class=\"table-layout w-100\" [id]=\"tableId\">\n <div>\n <div class=\"d-flex justify-content-between\" style=\"padding-bottom: 5px\">\n <div class=\"d-flex\">\n <!-- SC19NOV2025 replace the month year seperate dropdown into month year picker -->\n <div class=\"picker-container\">\n <i class=\" arrow-btn fusion-icon fusion-icon-size-lg fusion-icon-arrow-left-1 nav-icon\"\n (click)=\"prevMonth()\" style=\"color: var(--fc-text-color-dar) !important;\"></i>\n <span class=\"month-label\" (click)=\"togglePopup()\">\n {{ months[selectedMonth] }} {{ selectedYear }}\n </span>\n <i class=\" arrow-btn fusion-icon fusion-icon-size-lg fusion-icon-arrow-right-1 nav-icon\"\n (click)=\"nextMonth()\" style=\"color: var(--fc-text-color-dar) !important;\"></i>\n </div>\n <div class=\"popup\" *ngIf=\"popupOpen\">\n <div class=\"year-section\">\n <i class=\"fusion-icon fusion-icon-size-lg fusion-icon-arrow-left-1 nav-icon\" (click)=\"changeYear(-1)\"\n style=\"color: var(--fc-text-color-dar) !important;\"></i>\n <span>{{ selectedYear }}</span>\n <i class=\"fusion-icon fusion-icon-size-lg fusion-icon-arrow-right-1 nav-icon\" (click)=\"changeYear(1)\"\n style=\"color: var(--fc-text-color-dar) !important;\"></i>\n </div>\n\n <div class=\"month-grid\">\n <div class=\"month-item\" *ngFor=\"let m of (monthArray && monthArray.length > 0 ? monthArray : months); let i = index\" [class.active]=\"i === selectedMonth\"\n (click)=\"selectMonth(i)\">\n {{ m | slice:0:3 }} </div>\n </div>\n </div>\n </div>\n <!-- SK10APR24 import and export button added inside table -->\n <div class=\"d-flex gap-2 align-items-center\">\n <div class=\"search\" *ngIf=\"searchBar\">\n <div class=\"search-bar\">\n <input type=\"text\" placeholder=\"{{ 'APP_HRM_ATTENDANCE_TABLE.SEARCH' | customTranslate : 'Search' }}\"\n matInput (keyup)=\"applyFilter($event)\" #input [value]=\"searchTextValue || ''\">\n <img class=\"card-btn\" src=\"../assets/images/icons/general/Search.svg\">\n </div>\n </div>\n <button *ngIf=\"isSandwichLeave && isCheckButton !== false\" class=\"btn btn-primary me-2\"\n (click)=\"confirmModal = true\">{{ 'APP_HRM_ATTENDANCE.CHECK' | customTranslate : 'Check' }}</button>\n <div class=\"flex\">\n <!-- MR 18OCT26 Add clear tooltips for Import and Export toolbar buttons -->\n <nxt-button class=\"data-table-fsbtn ms-2 me-2\" (buttonClickEmit)=\"commonButtonClick($event)\"\n [buttonType]=\"button?.class\" [buttonValue]=\"button?.namePath\" [buttonConfig]=\"button?.buttonConfig\"\n [type]=\"button?.type\" [btnIconLeftSrc]=\"button?.btnIconLeftSrc\"\n [isImageSvg]=\"button?.isImageSvg\">\n </nxt-button>\n </div>\n </div>\n </div>\n\n <!-- MR 18OCT26 Reposition legend to top bar with matching chips and contextual title -->\n <div class=\"d-flex justify-content-between align-items-center top-legend-bar\">\n <div class=\"d-flex align-items-center gap-3 flex-wrap\">\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-present\">✓</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.PREsENT' | customTranslate : 'Present' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-absent\">✕</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.ABSENT' | customTranslate : 'Absent' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-half\">½</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.HALF_DAY' | customTranslate : 'Half day' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-holiday\">H</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.HOLIDAY' | customTranslate : 'Holiday' }}</span>\n </div>\n <div class=\"d-flex align-items-center gap-1\">\n <span class=\"attendance-chip attendance-weekoff\">-</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.WEEK_OFF' | customTranslate : 'Week Off' }}</span>\n </div>\n </div>\n <div class=\"table-subtitle\" *ngIf=\"titleOn && title\">\n {{ title | customTranslate : title }}\n </div>\n </div>\n\n <div class=\"table-margin\">\n <div class=\"table-container\">\n <!-- MR 18OCT26 Single unified MatTable eliminates header style discrepancy and checkbox shadow -->\n <table mat-table [dataSource]=\"dataSource\" [style.width]=\"tableWidth\" matSort class=\"mat-elevation-z8\">\n <!-- Checkbox Columns -->\n <!-- SK06MAR24 made checkbox sticky -->\n <ng-container *ngIf=\"withCheckBox\" matColumnDef=\"select\" sticky>\n <th mat-header-cell *matHeaderCellDef class=\"head-color sticky-column mat-column-select\">\n <mat-checkbox (change)=\"masterToggle()\" [checked]=\"selection.hasValue()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"sticky-col sticky-select mat-column-select\">\n <ng-container *ngIf=\"!row?.isSkeleton; else skeletonSelect\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"separateRowSelect(selection.toggle(row), row)\"\n [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </ng-container>\n <ng-template #skeletonSelect>\n <div class=\"skeleton\" style=\"width: 14px; height: 14px; border-radius: 2px; margin: 0 auto;\"></div>\n </ng-template>\n </td>\n </ng-container>\n <!-- data Columns -->\n <ng-container *ngFor=\"let column of displayedColumns; let i=index\" [matColumnDef]=\"column\"\n [sticky]=\"isColumnSticky(column)\" [stickyEnd]=\"column === 'summary' || i === (stickyCondition - 1)\">\n <!-- MR 18OCT26 Upgraded header with today accent, weekend shading, and weekday letter hierarchy -->\n <th mat-header-cell *matHeaderCellDef\n class=\"head-color ms-2 sticky-col {{ column != 'employeeDetail' ? 'th-td' : '' }} sticky-column\"\n [class.week-off]=\"isWeekend(column)\"\n (click)=\"$event.stopPropagation()\"\n style=\"padding: 0px !important;\">\n <div class=\"d-flex flex-column {{column === 'employeeDetail' ? 'align-items-start ps-2' : 'align-items-center'}}\">\n <ng-container *ngIf=\"column === 'employeeDetail'\">\n <span class=\"head-employee-label\">{{ 'APP_HRM_ATTENDANCE.EMPLOYEE' | customTranslate : 'Employee' }}</span>\n </ng-container>\n <ng-container *ngIf=\"column !== 'employeeDetail' && column !== 'summary'\">\n <span class=\"head-day-letter\" [class.head-muted]=\"isWeekend(column)\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.day : '' }}\n </span>\n <span class=\"head-date-num\" [class.head-today]=\"isToday(column)\" [class.head-muted]=\"isWeekend(column)\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.date : '' }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"column === 'summary'\">\n <span class=\"head-day-letter\" title=\"Present / Working Days\">{{ 'APP_HRM_ATTENDANCE_TABLE.DAYS' | customTranslate : 'Days' }}</span>\n <i class=\"fusion-icon fusion-icon-size-md fusion-icon-attendance nav-icon mt-1\" style=\"color: var(--label-text-color);\" title=\"Present / Working Days\"></i>\n </ng-container>\n </div>\n </th>\n <!-- MR 18OCT26 Attendance body cell with initials avatar, softened chips, weekend suppression, and summary pill -->\n <td mat-cell class=\"body-color {{ column != 'employeeDetail' ? 'th-td' : '' }}\"\n [class.week-off]=\"isWeekend(column)\"\n style=\"text-align: center; padding: 0px !important;\" *matCellDef=\"let element\">\n <ng-container *ngIf=\"!element?.isSkeleton; else skeletonCell\">\n <!-- Employee Detail Column with Avatar and Metadata -->\n <div *ngIf=\"column === 'employeeDetail'\" class=\"emp-cell-container\">\n <div class=\"emp-avatar\">\n {{ getInitials(element[column]?.empName || element.employeeName || element.name) }}\n </div>\n <div class=\"emp-meta\">\n <div class=\"emp-name-row\">\n <span class=\"emp-name\" [class.hyper-link]=\"hyperLinkColumns.includes(column)\"\n (click)=\"hyperLinkColumns.includes(column) ? hyperLinkClick(element, column, i) : ''\"\n [title]=\"element[column]?.empName || element.employeeName || element.name\">\n {{ element[column]?.empName || element.employeeName || element.name }}\n </span>\n <span *ngIf=\"element[column]?.empId || element.employeeId || element.empId\" class=\"emp-id-tag\">\n {{ element[column]?.empId || element.employeeId || element.empId }}\n </span>\n </div>\n <div class=\"emp-sub-row\" [title]=\"(element[column]?.desig || element.designation || '') + ((element[column]?.loc || element.location) ? (', ' + (element[column]?.loc || element.location)) : '')\">\n <span>{{ element[column]?.desig || element.designation }}</span>\n <span *ngIf=\"(element[column]?.desig || element.designation) && (element[column]?.loc || element.location)\">, </span>\n <span>{{ element[column]?.loc || element.location }}</span>\n </div>\n </div>\n </div>\n\n <!-- Summary Pill Column -->\n <div *ngIf=\"column === 'summary'\" class=\"flex justify-center\">\n <span class=\"summary-pill\" [class.summary-pill--target]=\"isNearTarget(element.workingDays ?? element.presentDays, element.totalCompanyWorkingDays ?? element.totalWorkingDays)\"\n [title]=\"'Present: ' + (element.workingDays ?? element.presentDays ?? 0) + ' / Total Working Days: ' + (element.totalCompanyWorkingDays ?? element.totalWorkingDays ?? 0)\">\n {{element.workingDays ?? element.presentDays ?? 0}}/{{element.totalCompanyWorkingDays ?? element.totalWorkingDays ?? 0}}\n </span>\n </div>\n\n <!-- Attendance Day Columns -->\n <div *ngIf=\"column != 'summary' && column != 'employeeDetail' && column != 'employeeName' && column != 'employeeId' && column != 'designation' && column != 'location'\"\n (click)=\"doubleClickFunction(element, column, element[column])\">\n <!-- Weekend column with weekoff status: suppress chip, show subtle dash -->\n <ng-container *ngIf=\"isWeekend(column) && (!element?.[column]?.['value'] || ['weekoff'].includes((element?.[column]?.['value']?.status || '').toLowerCase()) || element?.[column]?.['value'] === '')\">\n <span class=\"att-dash\">-</span>\n </ng-container>\n\n <!-- Non-weekend future day without data: faint dot -->\n <ng-container *ngIf=\"!isWeekend(column) && isFutureDate(column) && (!element?.[column]?.['value'] || element?.[column]?.['value'] === '' || element?.[column]?.['value']?.status === 'Nil')\">\n <span class=\"att-future\">·</span>\n </ng-container>\n\n <!-- Non-weekend past day with missing log: subtle dashed outline -->\n <ng-container *ngIf=\"!isWeekend(column) && !isFutureDate(column) && (!element?.[column]?.['value'] || element?.[column]?.['value'] === '' || element?.[column]?.['value']?.status === 'Nil')\">\n <span class=\"att-missing\" title=\"No Record\"></span>\n </ng-container>\n\n <!-- Present State -->\n <span *ngIf=\"element?.[column]?.['value'] && ['present'].includes((element?.[column]?.['value']?.status || '').toLowerCase()) && element?.[column]?.['value']?.halfDay === false\"\n class=\"attendance-chip attendance-present\" title=\"Present\">✓</span>\n\n <!-- Review State -->\n <span *ngIf=\"element?.[column]?.['value'] && ['review'].includes((element?.[column]?.['value']?.status || '').toLowerCase()) && element?.[column]?.['value']?.halfDay === false\"\n class=\"attendance-chip attendance-review\" title=\"Review\">!</span>\n\n <!-- Absent / Leave State -->\n <span *ngIf=\"element?.[column]?.['value'] && (isLeaveType(element?.[column]?.['value']?.status) && (element?.[column]?.['value']?.halfDay !== true) || element?.[column]?.['value']?.isSplitLeave)\"\n class=\"attendance-chip attendance-absent\" [title]=\"element?.[column]?.['value']?.status || 'Absent'\">✕</span>\n\n <!-- Holiday State -->\n <span *ngIf=\"element?.[column]?.['value'] && ['holiday'].includes((element?.[column]?.['value']?.status || '').toLowerCase())\"\n class=\"attendance-chip attendance-holiday\" title=\"Holiday\">H</span>\n\n <!-- Half Day State -->\n <span *ngIf=\"element?.[column]?.['value']?.halfDay === true && !element?.[column]?.['value']?.isSplitLeave\"\n class=\"attendance-chip attendance-half\" title=\"Half Day\">½</span>\n\n <!-- Week Off State on non-weekend columns -->\n <span *ngIf=\"!isWeekend(column) && element?.[column]?.['value'] && ['weekoff'].includes((element?.[column]?.['value']?.status || '').toLowerCase())\"\n class=\"attendance-chip attendance-weekoff\" title=\"Week Off\">-</span>\n\n <!-- Total Hours or Numeric Values -->\n <div *ngIf=\"column === 'totalHours'\" style=\"font-size: var(--fs-small); color: var(--label-text-color); font-weight: var(--fw-600);\">\n {{element?.[column]?.['value']}}\n </div>\n <div *ngIf=\"containsOnlyNumbers(element?.[column]?.['value'])\" style=\"font-size: var(--fs-small); color: var(--label-text-color); font-weight: var(--fw-600);\">\n {{element?.[column]?.['value']}}\n </div>\n </div>\n </ng-container>\n\n <!-- Skeleton Loader Cell matching new layout -->\n <ng-template #skeletonCell>\n <div *ngIf=\"column === 'employeeDetail'\" class=\"emp-cell-container\">\n <div class=\"skeleton\" style=\"width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;\"></div>\n <div class=\"emp-meta\" style=\"flex: 1;\">\n <div class=\"skeleton skeleton-text\" style=\"width: 120px; height: 12px; margin-bottom: 4px; border-radius: 2px;\"></div>\n <div class=\"skeleton skeleton-text\" style=\"width: 80px; height: 10px; border-radius: 2px;\"></div>\n </div>\n </div>\n <div *ngIf=\"column === 'summary'\" class=\"flex justify-center\">\n <div class=\"skeleton skeleton-text\" style=\"width: 36px; height: 16px; margin: 0 auto; border-radius: 20px;\"></div>\n </div>\n <div *ngIf=\"column != 'employeeDetail' && column != 'summary'\" class=\"flex justify-center\">\n <div class=\"skeleton\" style=\"width: 22px; height: 22px; border-radius: 6px; margin: 0 auto;\"></div>\n </div>\n </ng-template>\n </td>\n </ng-container>\n <!-- Render the columns -->\n <div [ngSwitch]=\"renderColumns\">\n <div *ngSwitchCase=\"'select'\">\n <tr mat-header-row *matHeaderRowDef=\"['select'].concat(displayedColumns) sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: ['select'].concat(displayedColumns)\"\n (click)=\"tableClick(row)\">\n </tr>\n </div>\n <div *ngSwitchDefault>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\" (click)=\"tableClick(row)\"></tr>\n </div>\n </div>\n <!-- SKS10FEB26 No Data Row -->\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell\" [attr.colspan]=\"displayedColumns.length + 1\">\n <div class=\"flex\" style=\"display: flex; justify-content: center; align-items: center; height: 100px;\">\n <div>\n No data/ records found\n </div>\n </div>\n </td>\n </tr>\n </table>\n </div>\n <div class=\"d-flex justify-content-end Legend-div\">\n <mat-paginator #paginator [pageSizeOptions]=\"itemsPerPage\" [length]=\"totalCount\" [pageSize]=\"pageSize\"\n [pageIndex]=\"pageIndex\" showFirstLastButtons (page)=\"pageParams($event)\"></mat-paginator>\n </div>\n </div>\n </div>\n</div>\n\n\n<!-- SK03OCT24 side screen for filter while export button clicked -->\n<app-common-screen *ngIf=\"exportSidescreen\" headerTitle=\"Export Data\"\n (sideScreenEmittedEvent)=\"exportSidescreen = false\">\n <div class=\"side-main-content\">\n <!-- MY 15OCT26 export file button loader -->\n <div\n class=\"d-flex align-items-center flex-row p-3 justify-content-center cursor-pointer short-button-white-bg button-hov\"\n [class.disabled]=\"exportButtonLoadingSpinner\"\n (click)=\"!exportButtonLoadingSpinner ? exportButtonSideNav() : null\">\n <div *ngIf=\"exportButtonLoadingSpinner\" class=\"spinner-grow spinner-grow-sm me-2\" role=\"status\" aria-hidden=\"true\"></div>\n <img *ngIf=\"!exportButtonLoadingSpinner\" src=\"../assets/images/icons/general/upload-icon.svg \" class=\"card-icon color me-1\"\n title=\"download\">\n <div>{{ exportButtonLoadingSpinner ? (('APP_SETTINGS_APPS.LOADING' | customTranslate : 'Loading') + '...') : ('APP_HRM_ATTENDANCE_TABLE.EXPORT_FILE' | customTranslate : 'Export File') }}</div>\n </div>\n <!-- SK03OCT24 components to be displayed in side screen -->\n <div *ngFor=\"let type of filterScreenConfigs\">\n <!-- MY 15OCT26 pass button loader state to multi-checkbox and multiple-filter -->\n <app-multi-checkbox *ngIf=\"type.type === 'multipleCheckBox' \" class=\"ms-2 me-2\"\n [label]=\"type?.labelPath || type?.label | customTranslate : type?.label\" [cardSize]=\"type?.cardSize\"\n [cardInlineSize]=\"type?.cardInlineSize\" [checkboxList]=\"type?.checkboxList\"\n [activeCheckboxList]=\"type?.activeCheckboxList\" [buttonList]=\"type?.buttons\"\n [displayValues]=\"type?.displayValues\" [componentData]=\"type\" [checkBoxStyles]=\"type?.checkBoxStyles\"\n [isButtonLoadingSpinner]=\"type?.isButtonLoadingSpinner || false\"\n (compDataEmit)=\"exportFieldsButtonEmit($event)\">\n </app-multi-checkbox>\n <app-multiple-filter *ngIf=\"type.type === 'multipleFilter' \" class=\"ms-2 me-2\" [isDateFilter]=\"type?.isDateFilter\"\n [label]=\"type?.labelPath || type?.label | customTranslate : type?.label\" [cardSize]=\"type?.cardSize\"\n [cardInlineSize]=\"type?.cardInlineSize\" [buttonList]=\"type?.buttons\" [displayValues]=\"type?.displayValues\"\n [componentData]=\"type\" [checkBoxStyles]=\"type?.checkBoxStyles\" [selectionData]=\"type?.selectionData\"\n [isButtonLoadingSpinner]=\"type?.isButtonLoadingSpinner || false\"\n (compDataEmit)=\"exportFilterButtonEmit($event)\" (selectedValuesEmit)=\"selectedValuesEmit($event)\"\n (filterDateEmit)=\"filterDateEmit($event)\">\n </app-multiple-filter>\n </div>\n </div>\n</app-common-screen>\n\n<!-- SK24OCT25 Sandwich confirm pop up -->\n<div *ngIf=\"confirmModal\" class=\"modal modal-backdrop show d-block\" id=\"confirmRecord\" tabindex=\"-1\"\n aria-labelledby=\"confirmRecordLabel\" [attr.aria-hidden]=\"!confirmModal\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <b class=\"modal-title fs-5\" id=\"confirmRecordLabel\">{{'APP.CONFIRM_SADWICH' | customTranslate : 'Confirm Sandwich'}}</b>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"\n (click)=\"confirmModal = false\"></button>\n </div>\n <div class=\"modal-body\">\n {{'APP.ARE_YOU_SURE_YOU_WANT_TO_CONVERT_THE_SANDWICH' | customTranslate : 'Are you sure want to convert sandwich leaves for the month'}} ?\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-primary\" data-bs-dismiss=\"modal\" aria-label=\"Close\"\n (click)=\"!buttonLoadingSpinner ? checkButtonClicked() : null\">\n <span class=\"{{ buttonLoadingSpinner ? 'spinner-grow' : '' }} spinner-grow-sm\" role=\"buttonValue\"\n aria-hidden=\"true\"></span>\n <span>{{ buttonLoadingSpinner ? ('APP_SETTINGS_APPS.LOADING' | customTranslate : 'Loading') + '...' :\n ('APP.YES' | customTranslate : 'Yes') }}\n </span>\n </button>\n <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\"\n (click)=\"confirmModal = false\">{{'APP.NO' | customTranslate : 'No'}}</button>\n </div>\n </div>\n </div>\n</div>\n",
|
|
8393
|
+
styles: [".table-wrapper{overflow-x:auto;max-width:100%}.table-container{max-height:600px;overflow-y:auto;display:block;width:100%}.table-layout{background:var(--fb-surface, #ffffff);border-radius:8px}.th{border-bottom:1px solid var(--fb-border-default, #e2e8f0);font-weight:var(--fw-600);font-size:var(--fs-normal);line-height:21px;color:var(--fb-text-primary, #0f172a)}.head-color{background:var(--fb-action-surface, #e0f2fe)!important;color:var(--fb-text-primary, #0f172a)!important}.body-color{color:var(--fb-text-primary, #0f172a);cursor:default}.search{display:flex;justify-content:space-between;border:1px solid var(--fb-border-default, #e2e8f0);background:var(--fb-surface, #ffffff);border-radius:6px;align-self:center}.search-bar{display:flex;flex-direction:row;align-items:center;width:100%;margin:5px}.card-btn{height:18px;width:18px}td.mat-cell:last-of-type{padding:8px;font-size:var(--fs-medium)}.table-title{font-weight:var(--fw-600);font-size:var(--fs-medium)}.search-component{top:20px;width:max-content;right:-30%}.sticky-column{background:var(--fb-surface, #ffffff)}.mat-sort-header-container{margin-left:5px}.body-color img{width:25px;padding:5px;cursor:pointer}.head-color.action-size{color:var(--fb-text-primary, #0f172a);font-size:var(--fs-primary);font-weight:var(--fw-600)}.lop-input{border:none;color:var(--fb-text-primary, #0f172a);max-width:50px}.mat-cell{padding:8px;white-space:nowrap;text-overflow:ellipsis}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-right:24px}::ng-deep [dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type){padding-right:10px!important;padding-left:unset!important}.mat-sort-header-container.mat-focus-indicator.ng-tns-c139-34{margin-left:5px}.mat-column-select{width:44px!important;min-width:44px!important;max-width:44px!important;text-align:center;padding:0!important;overflow:clip!important;text-overflow:clip!important}.mat-column-employeeDetail{width:260px!important;min-width:260px!important;max-width:260px!important;left:44px!important;padding-left:8px!important;padding-right:8px!important}.mat-column-summary{width:64px!important;min-width:64px!important;max-width:64px!important;text-align:center;padding:0 4px!important}.th-td{width:36px!important;min-width:36px!important;max-width:36px!important;text-align:center;padding:0!important}::ng-deep .mdc-data-table__cell,.mdc-data-table__header-cell{padding:0!important}::ng-deep .mat-mdc-checkbox-touch-target{height:28px!important}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding:0 8px}.mat-row{height:56px!important;min-height:56px!important;transition:background-color .15s ease}.mat-row:hover,.mat-row:hover .sticky-column,.mat-row:hover .sticky-col{background-color:var(--fb-row-hover, #f8fafc)!important}.mat-cell{height:56px!important;padding:0 2px!important;white-space:nowrap;color:var(--fb-text-primary, #0f172a)}.mat-header-row{height:52px!important;position:sticky;top:0;background:var(--fb-action-surface, #e0f2fe);z-index:20;border-bottom:1px solid var(--fb-border-default, #e2e8f0);color:var(--fb-text-primary, #0f172a)}.sticky-select .mdc-checkbox{opacity:.55;transition:opacity .15s ease}.mat-row:hover .sticky-select .mdc-checkbox,.sticky-select .mdc-checkbox--selected,.sticky-select .mdc-checkbox--indeterminate{opacity:1!important}.week-off{background:var(--week-off, #f8fafc)!important}.holiday{background:color-mix(in srgb,var(--holiday, #0284c7),var(--comp-bg-color, #ffffff) 88%)!important;color:var(--holiday, #0284c7)}.attendance-chip{width:22px;height:22px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;font-size:var(--fs-Usmall, 11px);font-weight:var(--fw-600, 600);cursor:pointer;transition:transform .1s ease;-webkit-user-select:none;user-select:none}.attendance-chip:hover{transform:scale(1.1)}.attendance-chip.attendance-present{background:color-mix(in srgb,var(--attendance-present, #16a34a),var(--comp-bg-color, #ffffff) 88%);color:var(--attendance-present, #16a34a)}.attendance-chip.attendance-absent{background:color-mix(in srgb,var(--attendance-absent, #ef4444),var(--comp-bg-color, #ffffff) 88%);color:var(--attendance-absent, #ef4444)}.attendance-chip.attendance-half{background:color-mix(in srgb,var(--attendance-half, #f59e0b),var(--comp-bg-color, #ffffff) 85%);color:color-mix(in srgb,var(--attendance-half, #f59e0b),black 45%)}.attendance-chip.attendance-holiday{background:color-mix(in srgb,var(--holiday, #0284c7),var(--comp-bg-color, #ffffff) 88%);color:var(--holiday, #0284c7)}.attendance-chip.attendance-review{background:color-mix(in srgb,var(--clr-warning, #f59e0b),var(--comp-bg-color, #ffffff) 85%);color:var(--clr-warning, #f59e0b)}.attendance-chip.attendance-weekoff{background:color-mix(in srgb,var(--attendance-weekoff, #64748b),var(--comp-bg-color, #ffffff) 90%);color:var(--attendance-weekoff, #64748b)}.att-missing{width:20px;height:20px;border:1px dashed color-mix(in srgb,var(--border-color, #e2e8f0),black 15%);border-radius:6px;display:inline-block}.att-future{color:var(--fc-text-color-light, #94a3b8);font-size:16px;line-height:1;display:inline-block;opacity:.5}.att-dash{color:var(--label-text-color-light, #64748b);font-size:14px}.emp-cell-container{display:flex;align-items:center;gap:10px;width:100%;padding:0 4px}.emp-avatar{width:32px;height:32px;min-width:32px;border-radius:50%;font-size:var(--fs-small, 12px);font-weight:var(--fw-600, 600);background:var(--fb-action-surface, #e0f2fe);color:var(--fb-action, #003566);display:flex;align-items:center;justify-content:center;flex-shrink:0}.emp-meta{display:flex;flex-direction:column;overflow:hidden;text-align:left;line-height:1.25;min-width:0}.emp-name-row{display:flex;align-items:center;gap:6px;overflow:hidden}.emp-name{font-size:var(--fs-normal, 13px);font-weight:var(--fw-600, 600);color:var(--fc-text-color-dark, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.emp-id-tag{font-size:var(--fs-Usmall, 11px);font-weight:var(--fw-500, 500);background:var(--hover-module-bg, #f1f5f9);color:var(--label-text-color, #475569);padding:1px 5px;border-radius:4px;border:1px solid var(--border-color, #e2e8f0);flex-shrink:0}.emp-sub-row{font-size:var(--fs-Usmall, 11px);color:var(--label-text-color-light, #64748b);font-weight:var(--fw-500, 500);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.summary-pill{padding:2px 8px;border-radius:20px;font-size:var(--fs-Usmall, 11px);font-weight:var(--fw-600, 600);background:var(--hover-module-bg, #f1f5f9);color:var(--label-text-color, #475569);border:1px solid var(--border-color, #e2e8f0);display:inline-block;white-space:nowrap}.summary-pill--target{background:color-mix(in srgb,var(--attendance-present, #16a34a),var(--comp-bg-color, #ffffff) 88%);color:var(--attendance-present, #16a34a);border-color:color-mix(in srgb,var(--attendance-present, #16a34a),var(--comp-bg-color, #ffffff) 70%)}.head-employee-label{font-size:var(--fs-small, 12px);font-weight:var(--fw-600, 600);color:var(--fc-text-color-dark, #0f172a)}.head-day-letter{font-size:var(--fs-Usmall, 11px);color:var(--fc-text-color-light, #64748b);font-weight:var(--fw-500, 500);line-height:1;text-transform:uppercase}.head-date-num{font-size:var(--fs-normal, 13px);font-weight:var(--fw-600, 600);color:var(--fc-text-color-dark, #0f172a);line-height:1.4;margin-top:2px}.head-today{background:var(--fb-action, #003566)!important;color:var(--fb-text-on-action, #ffffff)!important;border-radius:50%;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center}.head-muted{color:var(--fb-text-muted, #94a3b8)!important}.top-legend-bar{border-top:1px solid var(--fb-border-default, #e2e8f0);padding:8px 12px;font-size:var(--fs-small, 12px);background:var(--fb-surface, #ffffff)}.legend-text{font-size:var(--fs-small, 12px);color:var(--fc-text-color-dark, #0f172a);font-weight:var(--fw-500, 500)}.table-subtitle{font-size:var(--fs-normal, 13px);color:var(--label-text-color-light, #64748b);font-weight:var(--fw-500, 500)}@media screen and (min-width:600px){mat-table{font-size:18px}}@media screen and (max-width:882px){mat-table{font-size:var(--fs-medium)}.mat-column-name,.mat-column-weight{display:none}.mat-header-cell{padding:8px}}.hyper-link{text-decoration:none}.hyper-link:hover{color:var(--fb-action, #003566);text-decoration:underline;cursor:pointer}.button-hov:hover{background:var(--fb-action, #003566);color:var(--fb-text-on-action, #ffffff)}.btn-primary{color:var(--fb-text-on-action, #ffffff)!important;background-color:var(--fb-action, #003566)!important;border-color:var(--fb-action, #003566)!important;padding:4px 9px;border-radius:.375rem}.btn-primary:hover{color:var(--fb-text-on-action, #ffffff)!important;background-color:var(--fb-action-hover, #00284d)!important;border-color:var(--fb-action-hover, #00284d)!important}.btn-primary:active,.btn-primary.active,.show>.btn-primary.dropdown-toggle{color:var(--fb-text-on-action, #ffffff)!important;background-color:var(--fb-action-pressed, #001f3f)!important;border-color:var(--fb-action-pressed, #001f3f)!important}.btn-primary:disabled,.btn-primary.disabled{color:var(--fb-text-disabled, #94a3b8)!important;background-color:var(--fb-action-disabled, #e2e8f0)!important;border-color:var(--fb-action-disabled, #e2e8f0)!important}::ng-deep .clickable-img{height:36px!important;transition:unset!important;border:unset!important;border-radius:0!important}::ng-deep nxt-button.ms-2,::ng-deep nxt-button.me-2{margin-left:0!important;margin-right:0!important}.body-color img{border-radius:8px!important}.modal-backdrop{opacity:.9}.mat-table{width:100%;border-spacing:0}.mat-header-row{position:sticky;top:0;background:var(--fb-action-surface, #e0f2fe);color:var(--fb-text-primary, #0f172a);z-index:2}.picker-container{display:flex;align-items:center;font-size:18px;font-weight:600;border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px}.month-label{cursor:pointer;min-width:100px;text-align:center;font-size:var(--fs-medium, 14px)}.arrow-btn{border:none;background:transparent;font-size:20px;cursor:pointer}.popup{position:absolute;margin-top:45px;background:var(--fb-surface-elevated, #ffffff);padding:15px;box-shadow:0 4px 12px var(--fb-backdrop, rgba(0,0,0,.12));border-radius:var(--radius-medium, 8px);width:200px;z-index:1000}.year-section{display:flex;justify-content:center;align-items:center;gap:12px;margin-bottom:10px;font-size:var(--fs-medium, 14px)}.year-section button{background:var(--fb-surface-secondary, #f8fafc);color:var(--fb-text-primary, #0f172a);border:none;padding:3px 8px;font-size:14px;cursor:pointer}.month-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;font-size:var(--fs-medium, 14px)}.month-item{padding:6px;border-radius:4px;text-align:center;cursor:pointer;background-color:var(--fb-surface-secondary, #f8fafc)}.month-item.active{background:var(--fb-action, #003566);color:var(--fb-text-on-action, #ffffff)}.Legend-font{font-size:var(--fs-normal, 13px)}.table-margin,.Legend-div{border-top:solid .5px var(--fb-border-default, #e2e8f0)}.sticky-checkbox{position:sticky;left:0;z-index:1000;background:var(--fb-surface, #ffffff);min-width:48px;width:48px}th.sticky-checkbox{z-index:1100}\n"]
|
|
8046
8394
|
}]
|
|
8047
8395
|
}],
|
|
8048
|
-
ctorParameters: () => [
|
|
8396
|
+
ctorParameters: () => [
|
|
8397
|
+
{ type: i0.ChangeDetectorRef },
|
|
8398
|
+
{ type: ApiService },
|
|
8399
|
+
{ type: GlobalValuesService }
|
|
8400
|
+
],
|
|
8049
8401
|
propDecorators: {
|
|
8050
8402
|
data: [{ type: Input }],
|
|
8051
8403
|
displayedColumns: [{ type: Input }],
|
|
@@ -8062,7 +8414,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8062
8414
|
year: [{ type: Input }],
|
|
8063
8415
|
month: [{ type: Input }],
|
|
8064
8416
|
totalRecords: [{ type: Input }],
|
|
8417
|
+
totalCount: [{ type: Input }],
|
|
8065
8418
|
pageSize: [{ type: Input }],
|
|
8419
|
+
pageSizeOptions: [{ type: Input }],
|
|
8066
8420
|
pageIndex: [{ type: Input }],
|
|
8067
8421
|
isLoading: [{ type: Input }],
|
|
8068
8422
|
title: [{ type: Input }],
|
|
@@ -8086,6 +8440,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8086
8440
|
tableRowClick: [{ type: Output }],
|
|
8087
8441
|
searchValueChange: [{ type: Output }],
|
|
8088
8442
|
selectedValues: [{ type: Output }],
|
|
8443
|
+
pageChange: [{ type: Output }],
|
|
8444
|
+
pageDetails: [{ type: Output }],
|
|
8445
|
+
searchFilterData: [{ type: Output }],
|
|
8089
8446
|
searchText: [{ type: Output }],
|
|
8090
8447
|
exportButton: [{ type: Output }],
|
|
8091
8448
|
importButton: [{ type: Output }],
|