feat(fusion_clock): redesign dashboard — layered, role-aware, gradient cards (dark+light)
- Rework /fusion_clock/dashboard_data into a personal block (everyone) plus a team block (team lead = direct reports, manager = org-wide). A regular employee's payload never contains another employee's data. - New OWL stacked layout: gradient KPI cards (Today/Week/OT/Streak), Today's Shift, Recent Activity, Upcoming Leave, Recent Penalties; team band adds Present/Absent/Late/Pending, roster, and Needs Attention. - Dark/light via compile-time $o-webclient-color-scheme branching; drop the old runtime html.o_dark dashboard block. - Open the Dashboard menu to group_fusion_clock_user (lead/manager imply). - Add HttpCase permission/no-leak tests. Bump 3.13.2 -> 3.14.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -553,116 +553,148 @@ html.o_dark {
|
||||
}
|
||||
|
||||
// ===========================================================
|
||||
// Dashboard Summary Cards
|
||||
// Dashboard — layered, role-aware (gradient KPIs + stacked layout)
|
||||
// Dark/light resolved at COMPILE TIME via $o-webclient-color-scheme.
|
||||
// Gradient KPI cards are identical in both modes (white on gradient);
|
||||
// only page / section-card / text tokens swap.
|
||||
// ===========================================================
|
||||
.fclk-dash-card {
|
||||
position: relative;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
$o-webclient-color-scheme: bright !default;
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
||||
$_fclk-dash-page-hex: #f3f4f6;
|
||||
$_fclk-dash-card-hex: #ffffff;
|
||||
$_fclk-dash-border-hex: #e5e7eb;
|
||||
$_fclk-dash-text-hex: #1f2937;
|
||||
$_fclk-dash-muted-hex: #6b7280;
|
||||
$_fclk-dash-row-hex: #f0f0f2;
|
||||
|
||||
@if $o-webclient-color-scheme == dark {
|
||||
$_fclk-dash-page-hex: #0f1117 !global;
|
||||
$_fclk-dash-card-hex: #1a1d23 !global;
|
||||
$_fclk-dash-border-hex: #2a2d35 !global;
|
||||
$_fclk-dash-text-hex: #f1f1f4 !global;
|
||||
$_fclk-dash-muted-hex: #9ca3af !global;
|
||||
$_fclk-dash-row-hex: #2a2d35 !global;
|
||||
}
|
||||
|
||||
$fclk-dash-page: var(--fclk-dash-page, #{$_fclk-dash-page-hex});
|
||||
$fclk-dash-card: var(--fclk-dash-card, #{$_fclk-dash-card-hex});
|
||||
$fclk-dash-border: var(--fclk-dash-border, #{$_fclk-dash-border-hex});
|
||||
$fclk-dash-text: var(--fclk-dash-text, #{$_fclk-dash-text-hex});
|
||||
$fclk-dash-muted: var(--fclk-dash-muted, #{$_fclk-dash-muted-hex});
|
||||
$fclk-dash-row: var(--fclk-dash-row, #{$_fclk-dash-row-hex});
|
||||
|
||||
$fclk-g-today: linear-gradient(135deg, #10b981 0%, #0ea5a4 100%);
|
||||
$fclk-g-week: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
|
||||
$fclk-g-ot: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
|
||||
$fclk-g-streak: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
|
||||
$fclk-g-present: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
|
||||
$fclk-g-absent: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
|
||||
$fclk-g-late: linear-gradient(135deg, #eab308 0%, #f59e0b 100%);
|
||||
$fclk-g-pending: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
|
||||
|
||||
.fclk-dash {
|
||||
background: $fclk-dash-page;
|
||||
min-height: 100%;
|
||||
|
||||
.fclk-dash-wrap { max-width: 1200px; margin: 0 auto; padding: 20px; }
|
||||
|
||||
.fclk-dash-header {
|
||||
display: flex; justify-content: space-between; align-items: flex-start;
|
||||
flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.fclk-dash-card-icon {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 12px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.fclk-dash-card-value {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.fclk-dash-card-label {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.2px;
|
||||
}
|
||||
|
||||
.fclk-dash-card--total {
|
||||
background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
|
||||
border: 1px solid #bfdbfe;
|
||||
|
||||
.fclk-dash-card-icon { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
|
||||
.fclk-dash-card-value { color: #1e3a5f; }
|
||||
.fclk-dash-card-label { color: #3b82f6; }
|
||||
}
|
||||
|
||||
.fclk-dash-card--present {
|
||||
background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
|
||||
border: 1px solid #a7f3d0;
|
||||
|
||||
.fclk-dash-card-icon { background: rgba(16, 185, 129, 0.15); color: #059669; }
|
||||
.fclk-dash-card-value { color: #064e3b; }
|
||||
.fclk-dash-card-label { color: #10b981; }
|
||||
}
|
||||
|
||||
.fclk-dash-card--absent {
|
||||
background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
|
||||
border: 1px solid #fecaca;
|
||||
|
||||
.fclk-dash-card-icon { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
|
||||
.fclk-dash-card-value { color: #7f1d1d; }
|
||||
.fclk-dash-card-label { color: #ef4444; }
|
||||
}
|
||||
|
||||
.fclk-dash-card--late {
|
||||
background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
|
||||
border: 1px solid #fde68a;
|
||||
|
||||
.fclk-dash-card-icon { background: rgba(245, 158, 11, 0.15); color: #d97706; }
|
||||
.fclk-dash-card-value { color: #78350f; }
|
||||
.fclk-dash-card-label { color: #f59e0b; }
|
||||
}
|
||||
|
||||
html.o_dark {
|
||||
.fclk-dash-card--total {
|
||||
background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.1) 100%);
|
||||
border-color: rgba(59, 130, 246, 0.25);
|
||||
.fclk-dash-card-value { color: #93c5fd; }
|
||||
.fclk-dash-card-label { color: #60a5fa; }
|
||||
.fclk-dash-card-icon { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
|
||||
.fclk-dash-hello { font-size: 22px; font-weight: 800; color: $fclk-dash-text; }
|
||||
.fclk-dash-date { font-size: 13px; color: $fclk-dash-muted; margin-top: 2px; }
|
||||
.fclk-dash-headctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
|
||||
.fclk-dash-statusbadge {
|
||||
border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700;
|
||||
background: rgba(16, 185, 129, .15); color: #10b981;
|
||||
border: 1px solid rgba(16, 185, 129, .35);
|
||||
&.is-out {
|
||||
background: rgba(107, 114, 128, .15); color: $fclk-dash-muted;
|
||||
border-color: rgba(107, 114, 128, .3);
|
||||
}
|
||||
}
|
||||
.fclk-dash-btn-primary {
|
||||
background: $fclk-g-today; color: #fff; border: none; border-radius: 10px;
|
||||
padding: 8px 16px; font-weight: 700; font-size: 13px; cursor: pointer;
|
||||
}
|
||||
.fclk-dash-btn-ghost {
|
||||
background: transparent; color: $fclk-dash-muted; border: 1px solid $fclk-dash-border;
|
||||
border-radius: 10px; padding: 8px 12px; font-size: 13px; cursor: pointer;
|
||||
}
|
||||
|
||||
.fclk-dash-card--present {
|
||||
background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.08) 100%);
|
||||
border-color: rgba(16, 185, 129, 0.25);
|
||||
.fclk-dash-card-value { color: #6ee7b7; }
|
||||
.fclk-dash-card-label { color: #34d399; }
|
||||
.fclk-dash-card-icon { background: rgba(16, 185, 129, 0.2); color: #34d399; }
|
||||
.fclk-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
|
||||
.fclk-kpi {
|
||||
border-radius: 16px; padding: 16px; color: #fff;
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, .10);
|
||||
}
|
||||
.fclk-kpi-ic {
|
||||
width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .22);
|
||||
display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 12px;
|
||||
}
|
||||
.fclk-kpi-val { font-size: 26px; font-weight: 800; line-height: 1; }
|
||||
.fclk-kpi-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; opacity: .85; margin-top: 6px; }
|
||||
|
||||
.fclk-kpi--today { background: $fclk-g-today; }
|
||||
.fclk-kpi--week { background: $fclk-g-week; }
|
||||
.fclk-kpi--ot { background: $fclk-g-ot; }
|
||||
.fclk-kpi--streak { background: $fclk-g-streak; }
|
||||
.fclk-kpi--present { background: $fclk-g-present; }
|
||||
.fclk-kpi--absent { background: $fclk-g-absent; }
|
||||
.fclk-kpi--late { background: $fclk-g-late; }
|
||||
.fclk-kpi--pending { background: $fclk-g-pending; }
|
||||
|
||||
.fclk-dash-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
|
||||
.fclk-dash-card {
|
||||
background: $fclk-dash-card; border: 1px solid $fclk-dash-border;
|
||||
border-radius: 14px; padding: 16px;
|
||||
}
|
||||
.fclk-dash-card h4 {
|
||||
margin: 0 0 12px; font-size: 14px; color: $fclk-dash-text;
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
}
|
||||
.fclk-dash-line {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
font-size: 13px; padding: 7px 0; border-top: 1px solid $fclk-dash-row; color: $fclk-dash-text;
|
||||
&:first-of-type { border-top: none; }
|
||||
}
|
||||
.fclk-dash-muted { color: $fclk-dash-muted; }
|
||||
.fclk-pin { color: #10b981; font-weight: 700; }
|
||||
.fclk-pyel { color: #d97706; font-weight: 700; }
|
||||
.fclk-pred { color: #dc2626; font-weight: 700; }
|
||||
.fclk-dash-empty { text-align: center; color: $fclk-dash-muted; padding: 18px 0; font-size: 13px; }
|
||||
|
||||
.fclk-dash-divider {
|
||||
display: flex; align-items: center; gap: 12px; margin: 22px 0 14px;
|
||||
span {
|
||||
font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px;
|
||||
color: $fclk-dash-muted; font-weight: 700; white-space: nowrap;
|
||||
}
|
||||
&::before, &::after { content: ""; flex: 1; height: 1px; background: $fclk-dash-border; }
|
||||
}
|
||||
|
||||
.fclk-dash-card--absent {
|
||||
background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.08) 100%);
|
||||
border-color: rgba(239, 68, 68, 0.25);
|
||||
.fclk-dash-card-value { color: #fca5a5; }
|
||||
.fclk-dash-card-label { color: #f87171; }
|
||||
.fclk-dash-card-icon { background: rgba(239, 68, 68, 0.18); color: #f87171; }
|
||||
.fclk-dash-av {
|
||||
display: inline-flex; width: 26px; height: 26px; border-radius: 50%;
|
||||
background: $fclk-dash-row; color: $fclk-dash-text; font-size: 11px; font-weight: 700;
|
||||
align-items: center; justify-content: center; margin-right: 8px;
|
||||
}
|
||||
.fclk-dash-late-badge {
|
||||
background: rgba(217, 119, 6, .15); color: #d97706; border-radius: 999px;
|
||||
padding: 2px 8px; font-size: 11px; font-weight: 700; margin-left: 6px;
|
||||
}
|
||||
|
||||
.fclk-dash-card--late {
|
||||
background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.08) 100%);
|
||||
border-color: rgba(245, 158, 11, 0.25);
|
||||
.fclk-dash-card-value { color: #fcd34d; }
|
||||
.fclk-dash-card-label { color: #fbbf24; }
|
||||
.fclk-dash-card-icon { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
|
||||
.fclk-dash-actions { display: flex; flex-wrap: wrap; gap: 10px; }
|
||||
.fclk-dash-act {
|
||||
background: $fclk-dash-page; border: 1px solid $fclk-dash-border; border-radius: 10px;
|
||||
padding: 9px 14px; font-size: 13px; color: $fclk-dash-text; cursor: pointer;
|
||||
&:hover { border-color: $fclk-blue; }
|
||||
}
|
||||
|
||||
.fclk-dash-card:hover {
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
||||
@media (max-width: 992px) {
|
||||
.fclk-kpi-row { grid-template-columns: repeat(2, 1fr); }
|
||||
.fclk-dash-2col { grid-template-columns: 1fr; }
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.fclk-kpi-row { grid-template-columns: 1fr; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user