@rangertechnologies/fusion-ui 0.1.9 → 0.1.10
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.
|
@@ -17,12 +17,13 @@ import * as i1$2 from "@angular/cdk/overlay";
|
|
|
17
17
|
import { OverlayModule } from "@angular/cdk/overlay";
|
|
18
18
|
import * as i10$1 from "@rangertechnologies/ngnxt";
|
|
19
19
|
import { NxtAppModule, NxtButtonComponent, NxtFileUpload } from "@rangertechnologies/ngnxt";
|
|
20
|
-
import * as i4$
|
|
20
|
+
import * as i4$2 from "@angular/material/tooltip";
|
|
21
21
|
import { MatTooltipModule } from "@angular/material/tooltip";
|
|
22
22
|
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 i4$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({
|
|
@@ -3492,7 +3495,7 @@ var SideScreenComponent = class SideScreenComponent {
|
|
|
3492
3495
|
},
|
|
3493
3496
|
{
|
|
3494
3497
|
kind: "directive",
|
|
3495
|
-
type: i4$
|
|
3498
|
+
type: i4$2.MatTooltip,
|
|
3496
3499
|
selector: "[matTooltip]",
|
|
3497
3500
|
inputs: [
|
|
3498
3501
|
"matTooltipPosition",
|
|
@@ -7003,7 +7006,7 @@ var DataTableComponent = class DataTableComponent {
|
|
|
7003
7006
|
},
|
|
7004
7007
|
{
|
|
7005
7008
|
kind: "directive",
|
|
7006
|
-
type: i4$
|
|
7009
|
+
type: i4$2.MatTooltip,
|
|
7007
7010
|
selector: "[matTooltip]",
|
|
7008
7011
|
inputs: [
|
|
7009
7012
|
"matTooltipPosition",
|
|
@@ -7469,7 +7472,14 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7469
7472
|
year;
|
|
7470
7473
|
month;
|
|
7471
7474
|
totalRecords = 0;
|
|
7475
|
+
totalCount = 0;
|
|
7472
7476
|
pageSize = 10;
|
|
7477
|
+
pageSizeOptions = [
|
|
7478
|
+
10,
|
|
7479
|
+
25,
|
|
7480
|
+
50,
|
|
7481
|
+
100
|
|
7482
|
+
];
|
|
7473
7483
|
pageIndex = 0;
|
|
7474
7484
|
isLoading = false;
|
|
7475
7485
|
title = "";
|
|
@@ -7508,6 +7518,7 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7508
7518
|
tableRowClick = new EventEmitter();
|
|
7509
7519
|
searchValueChange = new EventEmitter();
|
|
7510
7520
|
selectedValues = new EventEmitter();
|
|
7521
|
+
pageChange = new EventEmitter();
|
|
7511
7522
|
searchText = new EventEmitter();
|
|
7512
7523
|
exportButton = new EventEmitter();
|
|
7513
7524
|
importButton = new EventEmitter();
|
|
@@ -7680,6 +7691,53 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7680
7691
|
if (this.leaveTypeSet.has(status)) return "✕";
|
|
7681
7692
|
return status.slice(0, 2);
|
|
7682
7693
|
}
|
|
7694
|
+
hasAttendanceChip(val, column) {
|
|
7695
|
+
const { status } = this.resolveAttendanceValue(val);
|
|
7696
|
+
if (!status) return false;
|
|
7697
|
+
if (status === "week off" || status === "wo" || status === "w" || status === "off") return false;
|
|
7698
|
+
return true;
|
|
7699
|
+
}
|
|
7700
|
+
isWeekOffState(val, column) {
|
|
7701
|
+
const { status } = this.resolveAttendanceValue(val);
|
|
7702
|
+
if (status === "week off" || status === "wo" || status === "w" || status === "off") return true;
|
|
7703
|
+
if (!status && this.isWeekend(column)) return true;
|
|
7704
|
+
return false;
|
|
7705
|
+
}
|
|
7706
|
+
getDateRangeText() {
|
|
7707
|
+
if (this.titleOn && this.title) return this.title;
|
|
7708
|
+
const firstDate = new Date(this.selectedYear, this.selectedMonth, 1);
|
|
7709
|
+
const lastDate = new Date(this.selectedYear, this.selectedMonth + 1, 0);
|
|
7710
|
+
const dayNames = [
|
|
7711
|
+
"Sun",
|
|
7712
|
+
"Mon",
|
|
7713
|
+
"Tue",
|
|
7714
|
+
"Wed",
|
|
7715
|
+
"Thu",
|
|
7716
|
+
"Fri",
|
|
7717
|
+
"Sat"
|
|
7718
|
+
];
|
|
7719
|
+
const monthNames = [
|
|
7720
|
+
"Jan",
|
|
7721
|
+
"Feb",
|
|
7722
|
+
"Mar",
|
|
7723
|
+
"Apr",
|
|
7724
|
+
"May",
|
|
7725
|
+
"Jun",
|
|
7726
|
+
"Jul",
|
|
7727
|
+
"Aug",
|
|
7728
|
+
"Sep",
|
|
7729
|
+
"Oct",
|
|
7730
|
+
"Nov",
|
|
7731
|
+
"Dec"
|
|
7732
|
+
];
|
|
7733
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
7734
|
+
return `${`${dayNames[firstDate.getDay()]} ${monthNames[firstDate.getMonth()]} ${pad(firstDate.getDate())} ${firstDate.getFullYear()}`} to ${`${dayNames[lastDate.getDay()]} ${monthNames[lastDate.getMonth()]} ${pad(lastDate.getDate())} ${lastDate.getFullYear()}`}`;
|
|
7735
|
+
}
|
|
7736
|
+
onPageChange(event) {
|
|
7737
|
+
this.pageIndex = event.pageIndex;
|
|
7738
|
+
this.pageSize = event.pageSize;
|
|
7739
|
+
this.pageChange.emit(event);
|
|
7740
|
+
}
|
|
7683
7741
|
prevMonth() {
|
|
7684
7742
|
if (this.selectedMonth === 0) {
|
|
7685
7743
|
this.selectedMonth = 11;
|
|
@@ -7811,7 +7869,9 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7811
7869
|
year: "year",
|
|
7812
7870
|
month: "month",
|
|
7813
7871
|
totalRecords: "totalRecords",
|
|
7872
|
+
totalCount: "totalCount",
|
|
7814
7873
|
pageSize: "pageSize",
|
|
7874
|
+
pageSizeOptions: "pageSizeOptions",
|
|
7815
7875
|
pageIndex: "pageIndex",
|
|
7816
7876
|
isLoading: "isLoading",
|
|
7817
7877
|
title: "title",
|
|
@@ -7837,6 +7897,7 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7837
7897
|
tableRowClick: "tableRowClick",
|
|
7838
7898
|
searchValueChange: "searchValueChange",
|
|
7839
7899
|
selectedValues: "selectedValues",
|
|
7900
|
+
pageChange: "pageChange",
|
|
7840
7901
|
searchText: "searchText",
|
|
7841
7902
|
exportButton: "exportButton",
|
|
7842
7903
|
importButton: "importButton",
|
|
@@ -7859,8 +7920,8 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7859
7920
|
}],
|
|
7860
7921
|
usesOnChanges: true,
|
|
7861
7922
|
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{
|
|
7923
|
+
template: "<!-- MR 09NOV26 Introduce AttendanceTableComponent and harden CustomTranslatePipe -->\n<!-- MR 10NOV26 Restructure AttendanceTableComponent layout to match Image 1 spec -->\n<div class=\"attendance-table-container\">\n <!-- Top Bar: Navigation, Legend, Subtitle & Toolbar -->\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-3\">\n <div class=\"picker-container position-relative d-inline-flex align-items-center\">\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] | slice:0:3 }} {{ 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\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-text-muted fw-bold px-1\">-</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.WEEK_OFF' | customTranslate : 'Week Off' }}</span>\n </div>\n </div>\n </div>\n\n <!-- Actions & Search Toolbar -->\n <div class=\"d-flex align-items-center gap-2 ms-auto\">\n <div class=\"search\" *ngIf=\"searchBar\">\n <div class=\"search-bar d-flex align-items-center px-2 py-1\">\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 <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 22\" fill=\"none\" class=\"ms-1 search-icon\">\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 </div>\n </div>\n\n <!-- Export Button -->\n <button type=\"button\"\n class=\"toolbar-action-btn\"\n (click)=\"exportButton.emit($event)\"\n title=\"Export\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path>\n <polyline points=\"7 10 12 15 17 10\"></polyline>\n <line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"></line>\n </svg>\n </button>\n\n <!-- Import Button -->\n <button type=\"button\"\n class=\"toolbar-action-btn\"\n (click)=\"importButton.emit($event)\"\n title=\"Import\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path>\n <polyline points=\"17 8 12 3 7 8\"></polyline>\n <line x1=\"12\" y1=\"3\" x2=\"12\" y2=\"15\"></line>\n </svg>\n </button>\n\n <button *ngIf=\"isSandwichLeave && isCheckButton !== false\"\n type=\"button\"\n class=\"btn btn-primary btn-sm ms-2\"\n (click)=\"confirmModal = true\">\n {{ 'APP_HRM_ATTENDANCE.CHECK' | customTranslate : 'Check' }}\n </button>\n </div>\n </div>\n\n <!-- Subtitle Date Range Bar -->\n <div class=\"attendance-range-row d-flex justify-content-end align-items-center mb-2\">\n <span class=\"range-date-text\">{{ getDateRangeText() }}</span>\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: 44px;\">\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\" matSort class=\"attendance-mat-table\">\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-col]=\"isWeekend(column)\"\n [class.today-header]=\"isToday(column)\"\n [class.employee-detail-col]=\"column === 'employeeDetail'\"\n [class.calendar-day-col]=\"column !== 'employeeDetail' && column !== 'summary'\"\n [class.summary-col]=\"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 *ngIf=\"isToday(column); else standardDateNum\" class=\"head-today-circle\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.date : '' }}\n </span>\n <ng-template #standardDateNum>\n <span class=\"head-date-num\" [class.head-muted]=\"isWeekend(column)\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.date : '' }}\n </span>\n </ng-template>\n </div>\n </ng-container>\n\n <!-- Summary Column Header (\"DAYS\") -->\n <ng-container *ngIf=\"column === 'summary'\">\n <div class=\"d-flex flex-column align-items-center py-1\">\n <span class=\"days-header-label\">{{ 'APP_HRM_ATTENDANCE_TABLE.DAYS' | customTranslate : 'DAYS' }}</span>\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"mt-1\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"></line>\n <polyline points=\"9 16 12 19 16 14\"></polyline>\n </svg>\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-col]=\"isWeekend(column)\"\n [class.employee-detail-col]=\"column === 'employeeDetail'\"\n [class.calendar-day-col]=\"column !== 'employeeDetail' && column !== 'summary'\"\n [class.summary-col]=\"column === 'summary'\"\n class=\"body-cell text-center\"\n (click)=\"onCellClick(element, column)\">\n\n <!-- Employee Detail Cell (Avatar & Info with Inline ID Badge) -->\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=\"d-flex align-items-center gap-1 text-truncate\">\n <span class=\"emp-name fw-semibold text-truncate\">\n {{ element.employeeName || element.name || '' }}\n </span>\n <span class=\"emp-id-badge\" *ngIf=\"element.employeeId || element.empId\">\n {{ element.employeeId || element.empId }}\n </span>\n </div>\n <div class=\"emp-subtitle text-muted text-truncate\" *ngIf=\"element.designation || element.department || element.location\">\n {{ element.designation || element.department || element.location || '' }}\n </div>\n </div>\n </div>\n\n <!-- Calendar Day Attendance 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 <!-- Status Chip for Punches (Present, Absent, Half day, Holiday) -->\n <span *ngIf=\"hasAttendanceChip(element[column], column); else plainStateTemplate\"\n class=\"attendance-chip\"\n [ngClass]=\"getAttendanceChipClass(element[column])\">\n {{ getAttendanceChipSymbol(element[column]) }}\n </span>\n <!-- Plain State (Week Off dash or Unpunched dot) -->\n <ng-template #plainStateTemplate>\n <span *ngIf=\"isWeekOffState(element[column], column)\" class=\"attendance-text-muted\">-</span>\n <span *ngIf=\"!isWeekOffState(element[column], column)\" class=\"attendance-text-dot\">.</span>\n </ng-template>\n </div>\n\n <!-- Summary Column (\"0/22\", \"0/30\") -->\n <div *ngIf=\"column === 'summary'\" class=\"days-summary-cell fw-semibold text-center\">\n {{ element.presentDays !== undefined ? element.presentDays : (element.present || 0) }}/{{ 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\n <!-- Paginator Footer -->\n <div class=\"d-flex justify-content-end align-items-center mt-2\">\n <mat-paginator [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"pageSize\"\n [length]=\"totalCount || totalRecords || dataSource.data.length\"\n [showFirstLastButtons]=\"true\"\n (page)=\"onPageChange($event)\"\n class=\"attendance-paginator\">\n </mat-paginator>\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",
|
|
7924
|
+
styles: [".attendance-table-container{width:100%;background:var(--comp-bg-color, #ffffff);border-radius:8px}.attendance-top-bar{margin-bottom:4px}.picker-container{-webkit-user-select:none;user-select:none;border:1px solid var(--border-color, #e2e8f0);border-radius:6px;padding:3px 6px;background:#fff}.month-label{font-size:13px;color:var(--fc-text-color-dark, #0f172a)}.arrow-btn{font-size:14px;padding:2px;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:230px;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:19px;height:18px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;line-height:1}.attendance-present{background-color:#dcfce7;color:#16a34a}.attendance-absent{background-color:#fee2e2;color:#ef4444}.attendance-half{background-color:#fef3c7;color:#d97706}.attendance-holiday{background-color:#e0e7ff;color:#4338ca}.attendance-text-muted{color:#94a3b8;font-size:12px;font-weight:600}.attendance-text-dot{color:#cbd5e1;font-size:13px;font-weight:700;display:inline-block;transform:translateY(-2px)}.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:150px}.search-icon{flex-shrink:0}.toolbar-action-btn{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border-color, #e2e8f0);border-radius:6px;background:#fff;color:var(--label-text-color, #64748b);cursor:pointer;transition:all .15s ease-in-out}.toolbar-action-btn:hover{background:#f8fafc;color:var(--fc-primary-color, #0140c1);border-color:#cbd5e1}.attendance-range-row{margin-top:-4px}.range-date-text{font-size:12px;color:var(--label-text-color, #64748b);font-weight:500}.table-container{overflow-x:auto;position:relative;border:1px solid var(--border-color, #e2e8f0);border-radius:6px;background:#fff}.attendance-mat-table{table-layout:fixed;width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}.head-cell{background:var(--comp-bg-color, #ffffff);border-bottom:1px solid var(--border-color, #e2e8f0);color:var(--fc-text-color, #1e293b);padding:4px 1px!important}.body-cell{border-bottom:1px solid #f1f5f9;background:var(--comp-bg-color, #ffffff);padding:4px 1px!important;height:44px}tr.table-data-row:hover td{background-color:#f8fafc}.checkbox-col{width:38px!important;min-width:38px!important;max-width:38px!important}.employee-detail-col{width:175px!important;min-width:175px!important;max-width:175px!important}.calendar-day-col{width:30px!important;min-width:30px!important;max-width:30px!important}.summary-col{width:48px!important;min-width:48px!important;max-width:48px!important}.head-day-letter{font-size:10px;font-weight:600;color:var(--label-text-color, #64748b)}.head-date-num{font-size:11px;font-weight:600;color:var(--fc-text-color-dark, #0f172a)}.head-today-circle{width:20px;height:20px;border-radius:50%;background-color:#0b2253;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}.head-muted{color:#94a3b8}.weekend-col{background-color:#f8fafc!important}.sticky-column{position:sticky!important;z-index:2;background-color:inherit}.avatar-circle{width:28px;height:28px;border-radius:50%;background-color:#e0f2fe;color:#0369a1;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600}.emp-name{font-size:12px;color:var(--fc-text-color-dark, #0f172a);font-weight:600}.emp-id-badge{background-color:#f1f5f9;color:#64748b;border-radius:4px;font-size:10px;padding:1px 4px;font-weight:500}.emp-subtitle{font-size:10px;color:#64748b;line-height:1.2}.days-header-label{font-size:9px;font-weight:600;color:#64748b;text-transform:uppercase}.days-summary-cell{font-size:11px;font-weight:600;color:#334155}.attendance-paginator{background:transparent;font-size:12px}.custom-modal-overlay{background:#00000073;z-index:1050}\n"],
|
|
7864
7925
|
dependencies: [
|
|
7865
7926
|
{
|
|
7866
7927
|
kind: "ngmodule",
|
|
@@ -7892,12 +7953,6 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
7892
7953
|
"ngIfElse"
|
|
7893
7954
|
]
|
|
7894
7955
|
},
|
|
7895
|
-
{
|
|
7896
|
-
kind: "directive",
|
|
7897
|
-
type: i1$4.NgStyle,
|
|
7898
|
-
selector: "[ngStyle]",
|
|
7899
|
-
inputs: ["ngStyle"]
|
|
7900
|
-
},
|
|
7901
7956
|
{
|
|
7902
7957
|
kind: "ngmodule",
|
|
7903
7958
|
type: FormsModule
|
|
@@ -8002,6 +8057,24 @@ var AttendanceTableComponent = class AttendanceTableComponent {
|
|
|
8002
8057
|
kind: "ngmodule",
|
|
8003
8058
|
type: MatPaginatorModule
|
|
8004
8059
|
},
|
|
8060
|
+
{
|
|
8061
|
+
kind: "component",
|
|
8062
|
+
type: i4$1.MatPaginator,
|
|
8063
|
+
selector: "mat-paginator",
|
|
8064
|
+
inputs: [
|
|
8065
|
+
"color",
|
|
8066
|
+
"pageIndex",
|
|
8067
|
+
"length",
|
|
8068
|
+
"pageSize",
|
|
8069
|
+
"pageSizeOptions",
|
|
8070
|
+
"hidePageSize",
|
|
8071
|
+
"showFirstLastButtons",
|
|
8072
|
+
"selectConfig",
|
|
8073
|
+
"disabled"
|
|
8074
|
+
],
|
|
8075
|
+
outputs: ["page"],
|
|
8076
|
+
exportAs: ["matPaginator"]
|
|
8077
|
+
},
|
|
8005
8078
|
{
|
|
8006
8079
|
kind: "ngmodule",
|
|
8007
8080
|
type: MatTooltipModule
|
|
@@ -8041,8 +8114,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8041
8114
|
CustomTranslatePipe
|
|
8042
8115
|
],
|
|
8043
8116
|
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
|
-
styles: [".attendance-table-container{width:100%;background:var(--comp-bg-color, #ffffff);border-radius:8px}.attendance-top-bar{
|
|
8117
|
+
template: "<!-- MR 09NOV26 Introduce AttendanceTableComponent and harden CustomTranslatePipe -->\n<!-- MR 10NOV26 Restructure AttendanceTableComponent layout to match Image 1 spec -->\n<div class=\"attendance-table-container\">\n <!-- Top Bar: Navigation, Legend, Subtitle & Toolbar -->\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-3\">\n <div class=\"picker-container position-relative d-inline-flex align-items-center\">\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] | slice:0:3 }} {{ 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\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-text-muted fw-bold px-1\">-</span>\n <span class=\"legend-text\">{{ 'APP_HRM_ATTENDANCE_TABLE.WEEK_OFF' | customTranslate : 'Week Off' }}</span>\n </div>\n </div>\n </div>\n\n <!-- Actions & Search Toolbar -->\n <div class=\"d-flex align-items-center gap-2 ms-auto\">\n <div class=\"search\" *ngIf=\"searchBar\">\n <div class=\"search-bar d-flex align-items-center px-2 py-1\">\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 <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 22\" fill=\"none\" class=\"ms-1 search-icon\">\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 </div>\n </div>\n\n <!-- Export Button -->\n <button type=\"button\"\n class=\"toolbar-action-btn\"\n (click)=\"exportButton.emit($event)\"\n title=\"Export\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path>\n <polyline points=\"7 10 12 15 17 10\"></polyline>\n <line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"></line>\n </svg>\n </button>\n\n <!-- Import Button -->\n <button type=\"button\"\n class=\"toolbar-action-btn\"\n (click)=\"importButton.emit($event)\"\n title=\"Import\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path>\n <polyline points=\"17 8 12 3 7 8\"></polyline>\n <line x1=\"12\" y1=\"3\" x2=\"12\" y2=\"15\"></line>\n </svg>\n </button>\n\n <button *ngIf=\"isSandwichLeave && isCheckButton !== false\"\n type=\"button\"\n class=\"btn btn-primary btn-sm ms-2\"\n (click)=\"confirmModal = true\">\n {{ 'APP_HRM_ATTENDANCE.CHECK' | customTranslate : 'Check' }}\n </button>\n </div>\n </div>\n\n <!-- Subtitle Date Range Bar -->\n <div class=\"attendance-range-row d-flex justify-content-end align-items-center mb-2\">\n <span class=\"range-date-text\">{{ getDateRangeText() }}</span>\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: 44px;\">\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\" matSort class=\"attendance-mat-table\">\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-col]=\"isWeekend(column)\"\n [class.today-header]=\"isToday(column)\"\n [class.employee-detail-col]=\"column === 'employeeDetail'\"\n [class.calendar-day-col]=\"column !== 'employeeDetail' && column !== 'summary'\"\n [class.summary-col]=\"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 *ngIf=\"isToday(column); else standardDateNum\" class=\"head-today-circle\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.date : '' }}\n </span>\n <ng-template #standardDateNum>\n <span class=\"head-date-num\" [class.head-muted]=\"isWeekend(column)\">\n {{ headerLabels && displayedColumns ? headerLabels[displayedColumns.indexOf(column)]?.date : '' }}\n </span>\n </ng-template>\n </div>\n </ng-container>\n\n <!-- Summary Column Header (\"DAYS\") -->\n <ng-container *ngIf=\"column === 'summary'\">\n <div class=\"d-flex flex-column align-items-center py-1\">\n <span class=\"days-header-label\">{{ 'APP_HRM_ATTENDANCE_TABLE.DAYS' | customTranslate : 'DAYS' }}</span>\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"mt-1\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"></line>\n <polyline points=\"9 16 12 19 16 14\"></polyline>\n </svg>\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-col]=\"isWeekend(column)\"\n [class.employee-detail-col]=\"column === 'employeeDetail'\"\n [class.calendar-day-col]=\"column !== 'employeeDetail' && column !== 'summary'\"\n [class.summary-col]=\"column === 'summary'\"\n class=\"body-cell text-center\"\n (click)=\"onCellClick(element, column)\">\n\n <!-- Employee Detail Cell (Avatar & Info with Inline ID Badge) -->\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=\"d-flex align-items-center gap-1 text-truncate\">\n <span class=\"emp-name fw-semibold text-truncate\">\n {{ element.employeeName || element.name || '' }}\n </span>\n <span class=\"emp-id-badge\" *ngIf=\"element.employeeId || element.empId\">\n {{ element.employeeId || element.empId }}\n </span>\n </div>\n <div class=\"emp-subtitle text-muted text-truncate\" *ngIf=\"element.designation || element.department || element.location\">\n {{ element.designation || element.department || element.location || '' }}\n </div>\n </div>\n </div>\n\n <!-- Calendar Day Attendance 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 <!-- Status Chip for Punches (Present, Absent, Half day, Holiday) -->\n <span *ngIf=\"hasAttendanceChip(element[column], column); else plainStateTemplate\"\n class=\"attendance-chip\"\n [ngClass]=\"getAttendanceChipClass(element[column])\">\n {{ getAttendanceChipSymbol(element[column]) }}\n </span>\n <!-- Plain State (Week Off dash or Unpunched dot) -->\n <ng-template #plainStateTemplate>\n <span *ngIf=\"isWeekOffState(element[column], column)\" class=\"attendance-text-muted\">-</span>\n <span *ngIf=\"!isWeekOffState(element[column], column)\" class=\"attendance-text-dot\">.</span>\n </ng-template>\n </div>\n\n <!-- Summary Column (\"0/22\", \"0/30\") -->\n <div *ngIf=\"column === 'summary'\" class=\"days-summary-cell fw-semibold text-center\">\n {{ element.presentDays !== undefined ? element.presentDays : (element.present || 0) }}/{{ 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\n <!-- Paginator Footer -->\n <div class=\"d-flex justify-content-end align-items-center mt-2\">\n <mat-paginator [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"pageSize\"\n [length]=\"totalCount || totalRecords || dataSource.data.length\"\n [showFirstLastButtons]=\"true\"\n (page)=\"onPageChange($event)\"\n class=\"attendance-paginator\">\n </mat-paginator>\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",
|
|
8118
|
+
styles: [".attendance-table-container{width:100%;background:var(--comp-bg-color, #ffffff);border-radius:8px}.attendance-top-bar{margin-bottom:4px}.picker-container{-webkit-user-select:none;user-select:none;border:1px solid var(--border-color, #e2e8f0);border-radius:6px;padding:3px 6px;background:#fff}.month-label{font-size:13px;color:var(--fc-text-color-dark, #0f172a)}.arrow-btn{font-size:14px;padding:2px;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:230px;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:19px;height:18px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;line-height:1}.attendance-present{background-color:#dcfce7;color:#16a34a}.attendance-absent{background-color:#fee2e2;color:#ef4444}.attendance-half{background-color:#fef3c7;color:#d97706}.attendance-holiday{background-color:#e0e7ff;color:#4338ca}.attendance-text-muted{color:#94a3b8;font-size:12px;font-weight:600}.attendance-text-dot{color:#cbd5e1;font-size:13px;font-weight:700;display:inline-block;transform:translateY(-2px)}.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:150px}.search-icon{flex-shrink:0}.toolbar-action-btn{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border-color, #e2e8f0);border-radius:6px;background:#fff;color:var(--label-text-color, #64748b);cursor:pointer;transition:all .15s ease-in-out}.toolbar-action-btn:hover{background:#f8fafc;color:var(--fc-primary-color, #0140c1);border-color:#cbd5e1}.attendance-range-row{margin-top:-4px}.range-date-text{font-size:12px;color:var(--label-text-color, #64748b);font-weight:500}.table-container{overflow-x:auto;position:relative;border:1px solid var(--border-color, #e2e8f0);border-radius:6px;background:#fff}.attendance-mat-table{table-layout:fixed;width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}.head-cell{background:var(--comp-bg-color, #ffffff);border-bottom:1px solid var(--border-color, #e2e8f0);color:var(--fc-text-color, #1e293b);padding:4px 1px!important}.body-cell{border-bottom:1px solid #f1f5f9;background:var(--comp-bg-color, #ffffff);padding:4px 1px!important;height:44px}tr.table-data-row:hover td{background-color:#f8fafc}.checkbox-col{width:38px!important;min-width:38px!important;max-width:38px!important}.employee-detail-col{width:175px!important;min-width:175px!important;max-width:175px!important}.calendar-day-col{width:30px!important;min-width:30px!important;max-width:30px!important}.summary-col{width:48px!important;min-width:48px!important;max-width:48px!important}.head-day-letter{font-size:10px;font-weight:600;color:var(--label-text-color, #64748b)}.head-date-num{font-size:11px;font-weight:600;color:var(--fc-text-color-dark, #0f172a)}.head-today-circle{width:20px;height:20px;border-radius:50%;background-color:#0b2253;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}.head-muted{color:#94a3b8}.weekend-col{background-color:#f8fafc!important}.sticky-column{position:sticky!important;z-index:2;background-color:inherit}.avatar-circle{width:28px;height:28px;border-radius:50%;background-color:#e0f2fe;color:#0369a1;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600}.emp-name{font-size:12px;color:var(--fc-text-color-dark, #0f172a);font-weight:600}.emp-id-badge{background-color:#f1f5f9;color:#64748b;border-radius:4px;font-size:10px;padding:1px 4px;font-weight:500}.emp-subtitle{font-size:10px;color:#64748b;line-height:1.2}.days-header-label{font-size:9px;font-weight:600;color:#64748b;text-transform:uppercase}.days-summary-cell{font-size:11px;font-weight:600;color:#334155}.attendance-paginator{background:transparent;font-size:12px}.custom-modal-overlay{background:#00000073;z-index:1050}\n"]
|
|
8046
8119
|
}]
|
|
8047
8120
|
}],
|
|
8048
8121
|
ctorParameters: () => [{ type: i0.ChangeDetectorRef }],
|
|
@@ -8062,7 +8135,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8062
8135
|
year: [{ type: Input }],
|
|
8063
8136
|
month: [{ type: Input }],
|
|
8064
8137
|
totalRecords: [{ type: Input }],
|
|
8138
|
+
totalCount: [{ type: Input }],
|
|
8065
8139
|
pageSize: [{ type: Input }],
|
|
8140
|
+
pageSizeOptions: [{ type: Input }],
|
|
8066
8141
|
pageIndex: [{ type: Input }],
|
|
8067
8142
|
isLoading: [{ type: Input }],
|
|
8068
8143
|
title: [{ type: Input }],
|
|
@@ -8086,6 +8161,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8086
8161
|
tableRowClick: [{ type: Output }],
|
|
8087
8162
|
searchValueChange: [{ type: Output }],
|
|
8088
8163
|
selectedValues: [{ type: Output }],
|
|
8164
|
+
pageChange: [{ type: Output }],
|
|
8089
8165
|
searchText: [{ type: Output }],
|
|
8090
8166
|
exportButton: [{ type: Output }],
|
|
8091
8167
|
importButton: [{ type: Output }],
|
|
@@ -8390,7 +8466,7 @@ var FusionCardComponent = class FusionCardComponent {
|
|
|
8390
8466
|
},
|
|
8391
8467
|
{
|
|
8392
8468
|
kind: "directive",
|
|
8393
|
-
type: i4$
|
|
8469
|
+
type: i4$2.MatTooltip,
|
|
8394
8470
|
selector: "[matTooltip]",
|
|
8395
8471
|
inputs: [
|
|
8396
8472
|
"matTooltipPosition",
|