Theme Handling
This commit is contained in:
parent
7f3ceb5005
commit
2fabc526bd
|
|
@ -39,8 +39,9 @@ $mini-absent-text: var(--gh-dn);
|
|||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
background: linear-gradient(135deg, $brand-primary, var(--gh-btn));
|
||||
padding: 12px 12px;
|
||||
background: radial-gradient(circle at 85% -20%, color-mix(in srgb, var(--gh-bd) 45%, transparent) 0, transparent 55%),
|
||||
linear-gradient(135deg, var(--gh-sb) 0%, var(--gh-am) 100%);
|
||||
color: $color-white;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,97 @@
|
|||
import { Component, Input, ChangeDetectionStrategy } from "@angular/core";
|
||||
|
||||
// KPI card of the admin landing page. Appearance only: a soft tint of the accent colour
|
||||
// (color1, a palette colour) as background, the icon on a solid accent tile.
|
||||
// The icon file is drawn as a mask so it shows in white. color2 is kept for the
|
||||
// existing bindings but no longer used.
|
||||
@Component({
|
||||
selector: 'app-landing-page-card',
|
||||
template: `
|
||||
<div class="grid" style="height:120px; margin: 10px 1px 0 0; background-image:
|
||||
linear-gradient(to right, {{color1}}, {{color2}}); border-radius: 10px;">
|
||||
<div class="col-8">
|
||||
<span style="display: block; font-size: small; color:white; padding: 10px 0 0 10px;">{{description}}</span>
|
||||
<span style="display: block; font-size: 1.7em; color:white; padding: 0px 0 0 10px;">{{value}}</span>
|
||||
</div>
|
||||
<div class="col-4" style="padding:0">
|
||||
<img src="{{iconSrc}}" />
|
||||
<div class="lp-card" [style.--lp-c]="color1">
|
||||
<div class="lp-text">
|
||||
<span class="lp-label">{{description}}</span>
|
||||
<span class="lp-value">{{value}}</span>
|
||||
</div>
|
||||
<span class="lp-icon"><span class="lp-glyph" [style.--lp-icon]="'url("' + iconSrc + '")'"></span></span>
|
||||
</div>
|
||||
`,
|
||||
styles: [],
|
||||
styles: [`
|
||||
.lp-card {
|
||||
--lp-c: var(--gh-btn);
|
||||
position: relative;
|
||||
height: 120px;
|
||||
margin: 10px 1px 0 0;
|
||||
padding: 16px 18px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
overflow: hidden;
|
||||
border: 1px solid color-mix(in srgb, var(--lp-c) 22%, var(--gh-tb));
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(135deg,
|
||||
color-mix(in srgb, var(--lp-c) 10%, var(--gh-tb)) 0%,
|
||||
color-mix(in srgb, var(--lp-c) 22%, var(--gh-tb)) 100%);
|
||||
box-shadow: 0 1px 3px color-mix(in srgb, var(--lp-c) 12%, transparent);
|
||||
transition: transform .15s ease, box-shadow .15s ease;
|
||||
}
|
||||
.lp-card::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -28px;
|
||||
bottom: -38px;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border-radius: 50%;
|
||||
background: color-mix(in srgb, var(--lp-c) 10%, transparent);
|
||||
pointer-events: none;
|
||||
}
|
||||
.lp-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 18px color-mix(in srgb, var(--lp-c) 22%, transparent);
|
||||
}
|
||||
.lp-text {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
.lp-label {
|
||||
font-size: calc(var(--gh-fz) * 15 / 14);
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
color: color-mix(in srgb, var(--lp-c) 45%, var(--gh-ht));
|
||||
}
|
||||
.lp-value {
|
||||
font-size: 1.75em;
|
||||
font-weight: 700;
|
||||
line-height: 1.15;
|
||||
color: color-mix(in srgb, var(--lp-c) 70%, var(--gh-ht));
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.lp-icon {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
flex: 0 0 52px;
|
||||
height: 52px;
|
||||
border-radius: 14px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
background: var(--lp-c);
|
||||
box-shadow: 0 4px 10px color-mix(in srgb, var(--lp-c) 35%, transparent);
|
||||
}
|
||||
.lp-glyph {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: var(--gh-tb);
|
||||
-webkit-mask: var(--lp-icon) center / contain no-repeat;
|
||||
mask: var(--lp-icon) center / contain no-repeat;
|
||||
}
|
||||
`],
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
standalone: false,
|
||||
})
|
||||
|
||||
export class LandingPageCardComponent {
|
||||
|
|
@ -25,4 +100,4 @@ export class LandingPageCardComponent {
|
|||
@Input() iconSrc: string;
|
||||
@Input() color1: string;
|
||||
@Input() color2: string;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,46 +79,46 @@
|
|||
@if (dashboardData?.liveEmployee >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Live Employee'" [value]="$safeNavigationMigration(dashboardData?.liveEmployee)"
|
||||
[iconSrc]="'assets/hrm-card-icons/Live Employee.svg'" [color2]="'#53AE93'" [color1]="'#2DB9AF'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Live Employee.svg'" [color2]="'var(--gh-btn)'" [color1]="'var(--gh-btn)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.leftEmployee >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Left Employee'" [value]="$safeNavigationMigration(dashboardData?.leftEmployee)"
|
||||
[iconSrc]="'assets/hrm-card-icons/Left.svg'" [color1]="'#9B579D'" [color2]="'#E98AE7'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Left.svg'" [color1]="'var(--gh-muted)'" [color2]="'var(--gh-muted)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.newJoiner >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'New Joiner'" [value]="$safeNavigationMigration(dashboardData?.newJoiner)"
|
||||
[iconSrc]="'assets/hrm-card-icons/New Joiner.svg'" [color1]="'#B87E59'" [color2]="'#F2D981'">
|
||||
[iconSrc]="'assets/hrm-card-icons/New Joiner.svg'" [color1]="'var(--gh-ok)'" [color2]="'var(--gh-ok)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.postingMissing >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Posting Missing'" [value]="$safeNavigationMigration(dashboardData?.postingMissing)"
|
||||
[iconSrc]="'assets/hrm-card-icons/Posting Missing.svg'" [color1]="'#8E9E4C'" [color2]="'#FFD371'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Posting Missing.svg'" [color1]="'var(--gh-warn)'" [color2]="'var(--gh-warn)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.confirmationWaiting >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Confirmation Waiting'" [value]="$safeNavigationMigration(dashboardData?.confirmationWaiting)"
|
||||
[iconSrc]="'assets/hrm-card-icons/Confirmation Waiting.svg'" [color1]="'#2D99EC'" [color2]="'#4191CD'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Confirmation Waiting.svg'" [color1]="'var(--gh-info)'" [color2]="'var(--gh-info)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.nextSalaryDate != undefined) {
|
||||
<div class="col-12 md:col-6 lg:col-3" style="position: relative;">
|
||||
<div class="col-12 md:col-6 lg:col-3 lp-salary-col" style="position: relative;">
|
||||
<app-landing-page-card [description]="'Current Salary Month'"
|
||||
[value]="$safeNavigationMigration(dashboardData?.nextSalaryDate) | date : 'MMM-yyyy'"
|
||||
[iconSrc]="'assets/hrm-card-icons/Next Pay Date.svg'" [color1]="'#944DEB'" [color2]="'#AB50D5'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Next Pay Date.svg'" [color1]="'var(--gh-sb)'" [color2]="'var(--gh-sb)'">
|
||||
</app-landing-page-card>
|
||||
<div style="position: absolute; bottom: 10px; right: 10px; left: 10px; z-index: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px;">
|
||||
<span style="font-size: 16px; font-weight: bold; color: var(--gh-tb);"> Expected Disbursement Date:
|
||||
<span class="lp-disburse" kendoTooltip title="Expected Disbursement Date: {{expectedSalaryDatestring}}" style="font-size: 16px; font-weight: bold; color: color-mix(in srgb, var(--gh-sb) 70%, var(--gh-ht));"><span class="lp-disburse-label"> Expected Disbursement Date:</span>
|
||||
<b> {{expectedSalaryDatestring}} </b></span>
|
||||
<button (click)="openSalaryDatePopup()" kendoTooltip title="Set Expected Salary Date" kendoButton
|
||||
style="padding: 3px 8px; font-size: 12px; line-height: 1.4;">
|
||||
|
|
@ -131,49 +131,49 @@
|
|||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Profile Completion (%)'"
|
||||
[value]="$safeNavigationMigration(dashboardData?.profileComplitionPercent)" [iconSrc]="'assets/hrm-card-icons/Profile Complition.svg'"
|
||||
[color1]="'#EF875F'" [color2]="'#E18A4F'">
|
||||
[color1]="'var(--gh-bd)'" [color2]="'var(--gh-bd)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.leaveinNextweek >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Leave In Next Week'" [value]="$safeNavigationMigration(dashboardData?.leaveinNextweek)"
|
||||
[iconSrc]="'assets/hrm-card-icons/Leave in next Week.svg'" [color1]="'#355E7D'" [color2]="'#6998AB'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Leave in next Week.svg'" [color1]="'var(--gh-info)'" [color2]="'var(--gh-info)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.pendingApproval >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Pending Approval'" [value]="$safeNavigationMigration(dashboardData?.pendingApproval)"
|
||||
[iconSrc]="'assets/hrm-card-icons/Pending Approval.svg'" [color1]="'#588481'" [color2]="'#35A181'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Pending Approval.svg'" [color1]="'var(--gh-btn)'" [color2]="'var(--gh-btn)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.longPending >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Long Pending'" [value]="$safeNavigationMigration(dashboardData?.longPending)"
|
||||
[iconSrc]="'assets/hrm-card-icons/Long Pending.svg'" [color1]="'#ECA02E'" [color2]="'#FFC75F'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Long Pending.svg'" [color1]="'var(--gh-warn)'" [color2]="'var(--gh-warn)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.rosterMissing >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Roster Missing'" [value]="$safeNavigationMigration(dashboardData?.rosterMissing)"
|
||||
[iconSrc]="'assets/hrm-card-icons/Posting Missing.svg'" [color1]="'#8E9E4C'" [color2]="'#FFD371'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Posting Missing.svg'" [color1]="'var(--gh-warn)'" [color2]="'var(--gh-warn)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.presentDays >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Present'" [value]="$safeNavigationMigration(dashboardData?.presentDays)"
|
||||
[iconSrc]="'assets/hrm-card-icons/Present.svg'" [color1]="'#0DA56B'" [color2]="'#74E2A0'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Present.svg'" [color1]="'var(--gh-ok)'" [color2]="'var(--gh-ok)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
@if (dashboardData?.absentDays >= 0) {
|
||||
<div class="col-12 md:col-6 lg:col-3">
|
||||
<app-landing-page-card [description]="'Absent'" [value]="$safeNavigationMigration(dashboardData?.absentDays)"
|
||||
[iconSrc]="'assets/hrm-card-icons/Absent.svg'" [color1]="'#F35588'" [color2]="'#A18292'">
|
||||
[iconSrc]="'assets/hrm-card-icons/Absent.svg'" [color1]="'var(--gh-dn)'" [color2]="'var(--gh-dn)'">
|
||||
</app-landing-page-card>
|
||||
</div>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ table.k-content.k-calendar-content.k-calendar-table.ng-star-inserted {
|
|||
padding: 0 !important;
|
||||
}
|
||||
.lp-profile__banner {
|
||||
height: 88px;
|
||||
height: 50px;
|
||||
flex-shrink: 0;
|
||||
background:
|
||||
radial-gradient(circle at 85% -20%, color-mix(in srgb, var(--gh-bd) 45%, transparent) 0, transparent 55%),
|
||||
|
|
@ -186,7 +186,7 @@ table.k-content.k-calendar-content.k-calendar-table.ng-star-inserted {
|
|||
align-items: flex-end;
|
||||
gap: 14px;
|
||||
padding: 0 20px;
|
||||
margin-top: -38px;
|
||||
margin-top: -32px;
|
||||
}
|
||||
.lp-profile__avatar {
|
||||
width: 76px;
|
||||
|
|
@ -323,3 +323,18 @@ table.k-content.k-calendar-content.k-calendar-table.ng-star-inserted {
|
|||
flex-basis: 110px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Current Salary Month card: in a narrow card only the expected disbursement date is shown;
|
||||
the full text stays in the tooltip on hover */
|
||||
.lp-salary-col {
|
||||
container-type: inline-size;
|
||||
}
|
||||
@container (max-width: 420px) {
|
||||
.lp-disburse-label {
|
||||
display: none;
|
||||
}
|
||||
.lp-disburse {
|
||||
font-size: 14px !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"background : \"auto\", a palette colour name (\"tint\", \"selection\", \"border\", \"white\"), or one of",
|
||||
" \"tint-primary\", \"tint-accent\", \"tint-button\", \"tint-highlight\", \"cool-gray\", \"neutral-gray\", \"warm-gray\", \"soft-blue-gray\", \"darker-gray\"."
|
||||
],
|
||||
"palette": "3. Navy + Amber",
|
||||
"palette": "3. Navy + Amber",
|
||||
"font": "ui-sans-serif",
|
||||
"fontSize": 14,
|
||||
"menu": "auto",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user