HRM-10/HRM.UI/ClientApp/src/app/ess/user-ssdashboard/user-ssdashboard.component.html

718 lines
34 KiB
HTML
Raw Normal View History

2026-11-03 13:06:00 +06:00
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
@if (apiService.isSelService === true) {
<div>
<app-background-canvas></app-background-canvas>
</div>
}
<app-loading-panel></app-loading-panel>
<div class="ss-dashboard" [ngClass]="{'customGrid': apiService.isSelService === true}">
<div class="grid dashboard-row align-items-stretch">
<div class="col-12 md:col-12 lg:col-4 xl:col-4">
<div class="ss-card profile-card">
<div class="profile-header">
<div class="profile-avatar-wrap">
<!-- No lazy loading here: this one is at the top of the page and always
visible, so deferring it only delays the fetch. -->
<img alt="profilePicture" [src]="this.employeePhoto" class="profile-avatar" (error)="onOwnPhotoError()" />
</div>
<div class="profile-details">
<h2 class="profile-name">{{employee?.name}}</h2>
<span class="profile-empno">{{employee?.employeeNo}}</span>
</div>
<div class="profile-actions profile-actions--desktop">
<button kendoTooltip class="action-btn btn-edit" kendoButton title="Edit Profile" [routerLink]="'/ess/self-profile'">
<i class="pi pi-user-edit"></i>
</button>
@if (!apiService.isSSO) {
<button kendoTooltip class="action-btn btn-key" kendoButton title="Change Password" [routerLink]="'/authentication/change-password'">
<i class="pi pi-key"></i>
</button>
}
@if (switchUserId != undefined) {
<button kendoTooltip class="action-btn btn-switch" kendoButton title="Switch to Admin" (click)="switchUser()">
<i class="pi pi-sort-alt" style="transform:rotate(90deg)"></i>
</button>
}
</div>
<div class="profile-actions--mobile" (click)="$event.stopPropagation()">
<div class="mob-btns" [class.mob-btns--open]="profileMenuOpen">
<button class="action-btn" [routerLink]="'/ess/self-profile'" (click)="profileMenuOpen=false">
<i class="pi pi-user-edit"></i>
</button>
@if (!apiService.isSSO) {
<button class="action-btn"
(click)="router.navigate(['/authentication/change-password']); profileMenuOpen=false">
<i class="pi pi-key"></i>
</button>
}
@if (switchUserId != undefined) {
<button class="action-btn"
(click)="switchUser(); profileMenuOpen=false">
<i class="pi pi-sort-alt" style="transform:rotate(90deg)"></i>
</button>
}
</div>
<button class="action-btn btn-settings" (click)="toggleProfileMenu()">
<i class="pi pi-cog" [class.pi-times]="profileMenuOpen"></i>
</button>
</div>
</div>
<div class="wm-layer" aria-hidden="true">
<svg width="100%" height="100%" viewBox="0 0 160 260" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg">
<defs>
<pattern id="wm-dots" x="0" y="0" width="16" height="16" patternUnits="userSpaceOnUse">
<circle cx="3" cy="3" r="1.5" fill="#3B3B98" opacity="0.18"/>
</pattern>
<linearGradient id="wm-fade" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stop-color="white" stop-opacity="1"/>
<stop offset="45%" stop-color="white" stop-opacity="0"/>
</linearGradient>
<mask id="wm-dotmask">
<rect width="160" height="260" fill="url(#wm-fade)"/>
</mask>
</defs>
<rect width="160" height="260" fill="url(#wm-dots)" mask="url(#wm-dotmask)"/>
<path d="M160,0 Q160,130 80,260 L160,260 Z" fill="#3B3B98" opacity="0.05"/>
<path d="M160,30 Q155,130 100,260 L160,260 Z" fill="#3B3B98" opacity="0.05"/>
<path d="M160,65 Q148,150 120,260 L160,260 Z" fill="#3B3B98" opacity="0.06"/>
<circle cx="130" cy="130" r="70" fill="none" stroke="#3B3B98" stroke-width="1" opacity="0.10"/>
<circle cx="130" cy="130" r="52" fill="none" stroke="#3B3B98" stroke-width="1" opacity="0.10"/>
<circle cx="130" cy="130" r="35" fill="none" stroke="#3B3B98" stroke-width="1.5" opacity="0.12"/>
<circle cx="130" cy="130" r="18" fill="#3B3B98" opacity="0.06"/>
<circle cx="130" cy="130" r="7" fill="#3B3B98" opacity="0.13"/>
</svg>
</div>
<div class="profile-meta-list">
<div class="meta-row">
<span class="meta-key">Designation</span>
<span class="meta-val">{{employee?.designation}}</span>
</div>
<div class="meta-row">
<span class="meta-key">Division</span>
<span class="meta-val">{{employee?.division}}</span>
</div>
<div class="meta-row">
<span class="meta-key">Department</span>
<span class="meta-val">{{employee?.department}}</span>
</div>
<div class="meta-row">
<span class="meta-key">Role</span>
<span class="meta-val">Self Service</span>
</div>
<div class="meta-row">
<span class="meta-key">Joining Date</span>
<span class="meta-val">{{$safeNavigationMigration(employee?.joiningDate) | date: 'MMM dd, yyyy'}}</span>
</div>
<div class="meta-row">
<span class="meta-key">Line Manager</span>
<span class="meta-val">{{employee?.lineManager}}</span>
</div>
</div>
<div class="profile-completion">
<div class="completion-row">
<span class="completion-label">Profile Completion</span>
<span class="completion-pct">{{employee?.profileCompletionPercent}}%</span>
</div>
<a [routerLink]="'/ess/self-profile'" style="text-decoration:none">
<kendo-progressbar [value]="$safeNavigationMigration(employee?.profileCompletionPercent)" [animation]="{duration: 3000}"
class="ss-progressbar">
</kendo-progressbar>
</a>
</div>
</div>
</div>
<div class="col-12 md:col-12 lg:col-8 xl:col-8">
<div class="right-panel">
<div class="stats-row">
<div class="ss-card stat-card stat-pending" (click)="toggleCard()" style="cursor:pointer">
@if (pendingJobCount > 0) {
<span class="stat-live-badge">{{pendingJobCount}}</span>
}
<!-- <div class="stat-dropdown-btn" (click)="$event.stopPropagation(); toggleDropdown('pending')" [class.active]="activeDropdown === 'pending'">
<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
<circle cx="7" cy="3" r="1.2" fill="currentColor"/>
<circle cx="7" cy="7" r="1.2" fill="currentColor"/>
<circle cx="7" cy="11" r="1.2" fill="currentColor"/>
</svg>
</div>
<div class="stat-dropdown-menu" *ngIf="activeDropdown === 'pending'" (click)="$event.stopPropagation()">
<div class="dropdown-header">Pending Approvals</div>
<div class="dropdown-item" *ngFor="let item of pendingList">
<span class="dot dot-red"></span>
<span>{{item.title}}</span>
</div>
<div class="dropdown-divider"></div>
<div class="dropdown-item view-all" (click)="viewAll('pending')">View all →</div>
</div> -->
<svg class="stat-watermark" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="50" cy="50" r="38" stroke="#E05555" stroke-width="4"/>
<path d="M50 22 L50 55" stroke="#E05555" stroke-width="7" stroke-linecap="round"/>
<circle cx="50" cy="68" r="5" fill="#E05555"/>
</svg>
<div class="stat-icon-wrap">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"/>
<polyline points="12 6 12 12 16 14"/>
</svg>
</div>
<div class="stat-body">
<span class="stat-label">Pending Approval</span>
<span class="stat-number">{{pendingJobCount}}</span>
</div>
</div>
<div class="ss-card stat-card stat-notif" (click)="toggleNotification()">
@if (notificationUnreadCount > 0) {
<span class="stat-live-badge">{{notificationUnreadCount}}</span>
}
<!-- <div class="stat-dropdown-btn" (click)="toggleDropdown('notif')" [class.active]="activeDropdown === 'notif'">
<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
<circle cx="7" cy="3" r="1.2" fill="currentColor"/>
<circle cx="7" cy="7" r="1.2" fill="currentColor"/>
<circle cx="7" cy="11" r="1.2" fill="currentColor"/>
</svg>
</div>
<div class="stat-dropdown-menu" *ngIf="activeDropdown === 'notif'" (click)="$event.stopPropagation()">
<div class="dropdown-header">Recent Notifications</div>
<div class="dropdown-item" *ngFor="let task of _wfMovementTask">
<span class="dot dot-green"></span>
<span>{{task.title}}</span>
</div>
<div class="dropdown-divider"></div>
<div class="dropdown-item view-all" (click)="viewAll('notif')">View all →</div>
</div> -->
<svg class="stat-watermark" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M50 15 C32 15 22 27 22 40 L22 58 L14 68 L86 68 L78 58 L78 40 C78 27 68 15 50 15Z" stroke="#2DA55D" stroke-width="4"/>
<path d="M43 68 C43 73 46.5 76 50 76 C53.5 76 57 73 57 68" stroke="#2DA55D" stroke-width="4" stroke-linecap="round"/>
</svg>
<div class="stat-icon-wrap">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/>
<path d="M13.73 21a2 2 0 0 1-3.46 0"/>
</svg>
</div>
<div class="stat-body">
<span class="stat-label">Notifications</span>
<span class="stat-number">{{notificationUnreadCount}}</span>
</div>
</div>
<div class="ss-card stat-card stat-holiday">
<!-- <div class="stat-dropdown-btn" (click)="toggleDropdown('holiday')" [class.active]="activeDropdown === 'holiday'">
<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
<circle cx="7" cy="3" r="1.2" fill="currentColor"/>
<circle cx="7" cy="7" r="1.2" fill="currentColor"/>
<circle cx="7" cy="11" r="1.2" fill="currentColor"/>
</svg>
</div>
<div class="stat-dropdown-menu" *ngIf="activeDropdown === 'holiday'" (click)="$event.stopPropagation()">
<div class="dropdown-header">Upcoming Holidays</div>
<div class="dropdown-item" *ngFor="let h of temporaryList">
<span class="dot dot-purple"></span>
<div>
<div>{{h.description}}</div>
<div class="dropdown-sub">{{h.date}}</div>
</div>
</div>
<div class="dropdown-divider"></div>
<div class="dropdown-item view-all" (click)="viewAll('holiday')">View all →</div>
</div> -->
<svg class="stat-watermark" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="12" y="22" width="76" height="66" rx="8" stroke="#7B5CEA" stroke-width="4"/>
<line x1="12" y1="40" x2="88" y2="40" stroke="#7B5CEA" stroke-width="4"/>
<line x1="30" y1="15" x2="30" y2="30" stroke="#7B5CEA" stroke-width="4" stroke-linecap="round"/>
<line x1="70" y1="15" x2="70" y2="30" stroke="#7B5CEA" stroke-width="4" stroke-linecap="round"/>
<rect x="38" y="52" width="24" height="20" rx="4" fill="#7B5CEA"/>
</svg>
<div class="stat-icon-wrap">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"/>
<line x1="16" y1="2" x2="16" y2="6"/>
<line x1="8" y1="2" x2="8" y2="6"/>
<line x1="3" y1="10" x2="21" y2="10"/>
<circle cx="12" cy="16" r="2" fill="currentColor"/>
</svg>
</div>
<div class="stat-body">
<span class="stat-label">Upcoming Holiday</span>
@if (temporaryList.length > 0) {
<span class="stat-holiday-name">{{temporaryList[0]?.description}}</span>
<span class="stat-holiday-date">{{temporaryList[0]?.date}}</span>
} @else {
<div class="stat-empty-state">
<span class="stat-empty-title">No holidays ahead</span>
<span class="stat-empty-pill">
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
<polyline points="20 6 9 17 4 12"/>
</svg>
Enjoy the streak!
</span>
</div>
}
</div>
</div>
</div>
<div class="ss-card quick-actions-card">
<div class="qa-header">
<span class="qa-title">Quick Actions</span>
</div>
<div class="quick-access-scroll">
<div class="quick-access-track">
@for (item of quickAccessItems; track item; let idx = $index) {
<div class="qa-item"
[class.qa-item-fixed]="quickAccessItems.length > 5"
(click)="onExternalLinkClick(item)">
<span class="qa-arrow">
<svg width="12" height="12" viewBox="0 0 12 12" fill="none">
<path d="M2.5 9.5L9.5 2.5M9.5 2.5H4M9.5 2.5V8" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</span>
<div class="qa-icon-wrap" [ngClass]="'qa-icon--' + getIconColorKey(item.text)">
@switch (item.text) {
@case ('Apply Leave') {
<svg width="22" height="22" viewBox="0 0 24 24" fill="none"><path d="M13 3v6h6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/><path d="M19 9L13 3H7C5.9 3 5 3.9 5 5v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V9z" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 12h6M9 16h4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>
}
@case ('Attendance') {
<svg width="22" height="22" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="8" r="4" stroke="currentColor" stroke-width="1.8"/><path d="M5 20c0-2.8 3.1-5 7-5s7 2.2 7 5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M16 6l1.5 1.5L20 5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>
}
@case ('Payslip') {
<svg width="22" height="22" viewBox="0 0 24 24" fill="none"><rect x="4" y="3" width="16" height="18" rx="2" stroke="currentColor" stroke-width="1.8"/><path d="M9 8h3.5a2 2 0 010 4H9V8z" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/><path d="M9 12h4a2 2 0 010 4H9v-4z" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/><path d="M11.5 6v2M11.5 16v2" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>
}
@case ('Pay-slip') {
<svg width="22" height="22" viewBox="0 0 24 24" fill="none"><rect x="4" y="3" width="16" height="18" rx="2" stroke="currentColor" stroke-width="1.8"/><path d="M9 8h3.5a2 2 0 010 4H9V8z" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/><path d="M9 12h4a2 2 0 010 4H9v-4z" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/><path d="M11.5 6v2M11.5 16v2" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>
}
@case ('Tax') {
<svg width="22" height="22" viewBox="0 0 24 24" fill="none"><path d="M6 3h12a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V5a2 2 0 012-2z" stroke="currentColor" stroke-width="1.8"/><path d="M9 8l6 6M15 8l-6 6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>
}
@case ('Goals') {
<svg width="22" height="22" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="1.8"/><circle cx="12" cy="12" r="5" stroke="currentColor" stroke-width="1.8"/><circle cx="12" cy="12" r="2" fill="currentColor"/></svg>
}
@case ('Profile') {
<svg width="22" height="22" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="8" r="4" stroke="currentColor" stroke-width="1.8"/><path d="M4 20c0-3.3 3.6-6 8-6s8 2.7 8 6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>
}
@case ('Leave Balance') {
<svg width="22" height="22" viewBox="0 0 24 24" fill="none"><rect x="3" y="4" width="18" height="17" rx="2" stroke="currentColor" stroke-width="1.8"/><path d="M16 2v4M8 2v4M3 9h18" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="12" cy="14" r="2" stroke="currentColor" stroke-width="1.6"/></svg>
}
@default {
<i [ngClass]="getIcon(item.text)"></i>
}
}
</div>
<span class="qa-label">{{item.text}}</span>
</div>
}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="grid dashboard-row" style="margin-top: 0px;">
<div class="col-12 md:col-6 lg:col-3 xl:col-3">
<div class="ss-card info-card">
<div class="info-card-header">
<div class="info-card-title-wrap">
<i class="pi pi-calendar-minus"></i>
<span class="info-card-title">Leave Balance</span>
</div>
<span class="view-all-link" (click)="ForwardToLeave()">View All</span>
</div>
@if (leaveBalance.length > 0) {
<div class="leave-list">
@for (item of leaveBalance; track item.type) {
<div class="leave-item">
<div class="leave-item-row">
<span class="leave-type">{{ item.type }}</span>
<div class="leave-meta">
<span class="leave-availed">-{{ item.availed }} used</span>
<span class="leave-count" [style.color]="item.color">{{ item.count }}</span>
</div>
</div>
<div class="leave-bar-track"
kendoTooltip [title]="'Opening: ' + item.opening + ' · Availed: ' + item.availed + ' · Balance: ' + item.count"
position="top">
<div class="leave-bar"
[style.--bar-width]="item.width"
[style.background]="item.color">
</div>
</div>
<div class="leave-tooltip-row">
<span>Opening: {{ item.opening }}</span>
<span>{{ item.count }}/{{ item.opening }}</span>
</div>
</div>
}
</div>
} @else {
<div class="empty-state">
<div class="empty-icon-wrap">
<i class="pi pi-calendar-minus"></i>
</div>
<span class="empty-title">No data available</span>
<span class="empty-sub">No leave balance found</span>
</div>
}
</div>
</div>
<div class="col-12 md:col-6 lg:col-3 xl:col-3">
<div class="ss-card info-card">
<div class="info-card-header">
<div class="info-card-title-wrap">
<i class="pi pi-users"></i>
<span class="info-card-title">Team Members</span>
</div>
<span class="view-all-link" (click)="ForwardToTeamMembers()">View All</span>
</div>
@if (members.length > 0) {
<div class="member-list">
@for (emp of members; track $index) {
<div class="member-item">
<div class="member-avatar"
[ngStyle]="!emp.photo ? { background: emp.bg, color: emp.color } : {}">
@if (emp.photo) {
<img [src]="emp.photo" alt="{{ emp.name }}" class="member-avatar-img"
loading="lazy" decoding="async" (error)="onPhotoError(emp)" />
} @else {
{{ emp.initials }}
}
</div>
<div class="member-info">
<span class="member-name">{{ emp.name }}</span>
<span class="member-role">{{ emp.role }}</span>
</div>
</div>
}
</div>
} @else {
<div class="empty-state">
<div class="empty-icon-wrap">
<i class="pi pi-user-plus"></i>
</div>
<span class="empty-title">No data available</span>
<span class="empty-sub">No New joiner </span>
</div>
}
</div>
</div>
<div class="col-12 md:col-6 lg:col-3 xl:col-3">
<div class="ss-card info-card">
<div class="info-card-header">
<div class="info-card-title-wrap">
<i class="pi pi-user-plus"></i>
<span class="info-card-title">New joiner</span>
</div>
<span class="view-all-link" (click)="navigateTo('/ess/employee-dictionary')">View All</span>
</div>
@if (newJoiners.length > 0) {
<div class="member-list">
@for (emp of newJoiners; track $index) {
<div class="member-item">
<div class="member-avatar"
[ngStyle]="!emp.photo ? { background: emp.bg, color: emp.color } : {}">
@if (emp.photo) {
<img [src]="emp.photo" alt="{{ emp.name }}" class="member-avatar-img"
loading="lazy" decoding="async" (error)="onPhotoError(emp)" />
} @else {
{{ emp.initials }}
}
</div>
<div class="member-info">
<span class="member-name">{{ emp.name }}</span>
<span class="member-role">{{ emp.role }}</span>
</div>
</div>
}
</div>
} @else {
<div class="empty-state">
<div class="empty-icon-wrap">
<i class="pi pi-user-plus"></i>
</div>
<span class="empty-title">No data available</span>
<span class="empty-sub">No new junior employees</span>
</div>
}
</div>
</div>
<div class="col-12 md:col-6 lg:col-3 xl:col-3">
<div class="ss-card info-card">
<div class="info-card-header">
<div class="info-card-title-wrap">
<i class="pi pi-calendar"></i>
<span class="info-card-title">Attendance Summary</span>
<span class="info-card-subtitle" style="font-weight: bold;">({{ currentDate | date: 'MMM yyyy' }})</span>
</div>
<span class="view-all-link" (click)="ForwardToAttendanceRegularized()">View All</span>
</div>
@if (attendanceSummary.length > 0) {
<div class="attendance-list">
@for (item of attendanceSummary; track item.label) {
<div class="attn-item">
<div class="attn-icon" [ngClass]="item.iconClass">
<i [class]="item.icon"></i>
</div>
<span class="attn-label">{{ item.label }}</span>
<span class="attn-val" [ngClass]="item.valClass">{{ item.value }}</span>
</div>
}
</div>
} @else {
<div class="empty-state">
<div class="empty-icon-wrap">
<i class="pi pi-check-circle"></i>
</div>
<span class="empty-title">No data available</span>
<span class="empty-sub">No attendance data available</span>
</div>
}
</div>
</div>
</div>
<div class="grid dashboard-row" style="margin-top: 0px;">
<div class="col-12 md:col-12 lg:col-6 xl:col-6">
<div class="ss-card feed-card">
<div class="feed-header">
<div class="feed-title-wrap">
<div class="feed-title-icon feed-title-icon--activity">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/>
</svg>
</div>
<span class="feed-title">Recent Activity</span>
</div>
</div>
<div class="feed-body">
@for (dataItem of dashboardActivities; track dataItem; let i = $index) {
<div
class="activity-item"
[ngStyle]="{'cursor': dataItem.urlLinks ? 'pointer' : 'default'}"
(click)="dataItem.urlLinks ? ForwardToActivity(dataItem) : null">
<div class="activity-icon-wrap"
[ngClass]="{
'aicon-green': dataItem.iconType === 1,
'aicon-blue': dataItem.iconType === 2,
'aicon-purple': dataItem.iconType === 3,
'aicon-orange': dataItem.iconType === 4,
'aicon-teal': dataItem.iconType === 5,
'aicon-default': !dataItem.iconType
}">
<i class="pi"
[ngClass]="{
'pi-check': dataItem.iconType === 1,
'pi-clock': dataItem.iconType === 2,
'pi-star': dataItem.iconType === 3,
'pi-file': dataItem.iconType === 4,
'pi-calendar': dataItem.iconType === 5,
'pi-circle': !dataItem.iconType
}"></i>
</div>
<div class="activity-content">
<div class="activity-title">{{ dataItem.category || dataItem.description }}</div>
@if (dataItem.description) {
<div class="activity-sub">{{ dataItem.description }}</div>
}
@if (dataItem.sentTime) {
<div class="activity-time">
{{ getRelativeTime(dataItem.sentTime) }}
</div>
}
</div>
@if (dataItem.urlLinks) {
<i class="pi pi-link activity-link-icon"></i>
}
</div>
}
</div>
</div>
</div>
<div class="col-12 md:col-12 lg:col-6 xl:col-6">
<div class="ss-card feed-card">
<div class="feed-header">
<div class="feed-title-wrap">
<div class="feed-title-icon feed-title-icon--updates">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/>
<path d="M13.73 21a2 2 0 0 1-3.46 0"/>
</svg>
</div>
<span class="feed-title">Company Updates & Notification</span>
</div>
<div class="feed-search">
<i class="pi pi-search feed-search-icon"></i>
<input type="text" class="feed-search-input" placeholder="Search updates…"
aria-label="Search company updates"
[(ngModel)]="companyUpdateSearch" (ngModelChange)="applyCompanyUpdateSearch()"/>
@if (companyUpdateSearch) {
<i class="pi pi-times feed-search-clear"
(click)="clearCompanyUpdateSearch()" title="Clear search"></i>
}
</div>
<button type="button" class="feed-view-all" routerLink="/ess/company-updates"
title="See every company update and notification">
View all
</button>
</div>
<div class="feed-body feed-body--updates">
@if (companyUpdateSearch && filteredCompanyUpdates.length === 0) {
<div class="empty-state">
<div class="empty-icon-wrap">
<i class="pi pi-search"></i>
</div>
<span class="empty-title">No matching updates</span>
<span class="empty-sub">Try a different type or description</span>
</div>
}
@for (dataItem of filteredCompanyUpdates; track dataItem; let i = $index) {
<div class="update-item" >
<div class="update-icon-wrap"
[ngClass]="{
'uicon-manual': dataItem.type === 1,
'uicon-system': dataItem.type === 2,
'uicon-news': dataItem.type === 3,
'uicon-policy': dataItem.type === 4,
'uicon-push': dataItem.type === 5,
'uicon-default': !dataItem.type
}">
<i class="pi"
[ngClass]="{
'pi-pencil': dataItem.type === 1,
'pi-cog': dataItem.type === 2,
'pi-megaphone': dataItem.type === 3,
'pi-file': dataItem.type === 4,
'pi-bell': dataItem.type === 5,
'pi-circle': !dataItem.type
}"></i>
<!-- <span class="new-pulse" *ngIf="dataItem.new === true"></span> -->
@if (isWithinPulseDays(dataItem)) {
<span class="days-pulse"></span>
}
</div>
<div class="update-content">
<div class="update-tag-row">
<span class="update-tag" [ngClass]="{'tag-manual': dataItem.type === 1,
'tag-system': dataItem.type === 2, 'tag-news': dataItem.type === 3,
'tag-policy': dataItem.type === 4, 'tag-push': dataItem.type === 5,
'tag-default': !dataItem.type}">
{{ getUpdateTypeLabel(dataItem.type) }}
</span>
@if (dataItem.sentTime) {
<span class="update-time">
{{ getRelativeTime(dataItem.sentTime) }}
</span>
}
@if (dataItem.isAttachment === 1) {
<span class="update-attachment-group">
<span class="update-attachment" (click)="onAttachmentClick(dataItem, 'view')" title="View attachment">
<i class="pi pi-eye"></i>
</span>
<span class="update-attachment" (click)="onAttachmentClick(dataItem, 'download')" title="Download attachment">
<i class="pi pi-download"></i>
</span>
</span>
}
</div>
<div class="update-text">
@if (dataItem.notificationUrl) {
<a [class.clickable]="dataItem.notificationUrl" (click)="openNotifLink(dataItem.notificationUrl)">
{{ dataItem.description }}
</a>
}
@if (!dataItem.notificationUrl) {
<span>{{ dataItem.description }}</span>
}
</div>
</div>
</div>
}
</div>
</div>
</div>
</div>
</div>
<div class="main-container">
<button class="fab" (click)="toggleCard()">
<i [ngClass]="showCard ? 'pi pi-times' : 'pi pi-plus'"></i>
</button>
<div class="sliding-card" [ngClass]="{'show-card': showCard}">
@if (pendingJobCount > 0) {
<div>
<div class="panel-section-title">Awaiting Your Action</div>
<div class="panel-job-list">
@for (dataItem of pendingJobDTOs; track dataItem; let i = $index) {
<div
class="panel-job-item"
(click)="onAwaitingAction(dataItem)"
[ngStyle]="{'cursor': dataItem.link ? 'pointer' : 'default'}">
<span class="panel-job-icon-wrap">
<i class="pi pi-clock panel-job-icon" [ngStyle]="{'color': colors[i % colors.length]}"></i>
<span class="panel-job-badge">{{ i + 1 }}</span>
</span>
<span class="panel-job-text">{{dataItem.objectDescription}}</span>
</div>
}
</div>
</div>
}
<!-- the same month calendar as the landing page ("My Calendar - Oct 2026" in its own header); narrow here, so entries
show as dots. A click on an entry opens it, on a day opens that day. -->
<div class="panel-calendar">
<app-calendar-mini-scheduler [height]="360" (dateSelected)="openCalendarDay($event)"
(itemSelected)="openCalendarItem($event)"></app-calendar-mini-scheduler>
</div>
@if (pendingJobCount === 0 && temporaryList.length > 0) {
<div>
<div class="panel-section-title" style="margin-top:16px;">Upcoming Holidays</div>
@for (dataItem of temporaryList; track dataItem; let i = $index) {
<div class="panel-holiday-row">
<span class="panel-holi-date" [ngStyle]="{'background': backgroundColors[i % backgroundColors.length]}">{{dataItem.date}}</span>
<span class="panel-holi-desc">{{dataItem.description}}</span>
</div>
}
</div>
}
</div>
</div>
@if (showModal) {
2026-11-16 19:05:45 +06:00
<div class="card" class="blur-background">
<kendo-dialog (close)="onPopUpClose()" [minWidth]="390">
<kendo-dialog-titlebar>Access Types</kendo-dialog-titlebar>
<div class="grid">
<div class="col-12">
<fieldset>
<div class="button-container1">
@for (type of payrollTypes; track type) {
<button kendoButton class="access-type-button" (click)="selectAccessType(type.id)">
<img [src]="getImagePath(type.id)" alt="{{ type.description }}" class="access-type-image" />
<span class="button-text">{{ type.description }}</span>
</button>
}
</div>
</fieldset>
</div>
2026-11-03 13:06:00 +06:00
</div>
2026-11-16 19:05:45 +06:00
</kendo-dialog>
</div>
2026-11-03 13:06:00 +06:00
}
@if (showAttachment) {
<div class="blur-background">
@if (showAttachment) {
<kendo-dialog (close)="onAttachmentClose()"
[width]="1000"
[maxHeight]="650"
[draggable]="true">
<kendo-dialog-titlebar>Document Viewer</kendo-dialog-titlebar>
<app-master-attachment-picker
[base64Data]="currentAttachment"
[fileName]="currentFileName"
[fileSizeLabel]="currentFileSizeLabel"
[forceViewerMode]="true">
</app-master-attachment-picker>
</kendo-dialog>
}
</div>
}
<!-- A day picked on the small calendar: what is on it, new event or task, open / edit (shared with My Calendar) -->
<app-calendar-day-dialog #dayDialog (changed)="onCalendarChanged()"></app-calendar-day-dialog>