Upgrade employee portal staff dashboard to v2
This commit is contained in:
@@ -7,12 +7,12 @@
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-[0.22em] text-brand-100">My Workspace</p>
|
||||
<h2 class="mt-2 text-2xl font-semibold">Employee Portal</h2>
|
||||
<p class="mt-2 max-w-3xl text-sm text-brand-100">Use this dashboard for your assigned work, attendance, leave, documents, payslips, profile and alerts.</p>
|
||||
<p class="mt-2 max-w-3xl text-sm text-brand-100">Punch attendance, view priority work, track documents, leave, payslips and alerts from one staff workspace.</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
{% if employee %}
|
||||
<a href="/employee/work" class="rounded-xl bg-white px-4 py-2 text-sm font-semibold text-brand-700 hover:bg-brand-50">Open My Work Board</a>
|
||||
<a href="/employee/attendance" class="rounded-xl border border-white/40 px-4 py-2 text-sm font-semibold text-white hover:bg-white/10">Full Attendance</a>
|
||||
<a href="/employee/attendance" class="rounded-xl bg-white px-4 py-2 text-sm font-semibold text-brand-700 hover:bg-brand-50">Punch / Attendance</a>
|
||||
<a href="/employee/work" class="rounded-xl border border-white/40 px-4 py-2 text-sm font-semibold text-white hover:bg-white/10">Open Work Board</a>
|
||||
{% else %}
|
||||
<a href="/employee/register" class="rounded-xl bg-white px-4 py-2 text-sm font-semibold text-brand-700 hover:bg-brand-50">Request Employee Linkage</a>
|
||||
{% endif %}
|
||||
@@ -24,13 +24,18 @@
|
||||
{% set tabs = [
|
||||
('overview','Overview'),
|
||||
('work','My Work Board'),
|
||||
('due-today','Due Today'),
|
||||
('overdue','Overdue'),
|
||||
('client-pending','Client Pending'),
|
||||
('returned','Returned / Blocked'),
|
||||
('attendance','My Attendance'),
|
||||
('profile','My Profile'),
|
||||
('leave','My Leave'),
|
||||
('documents','My Documents'),
|
||||
('payslips','My Payslips'),
|
||||
('offboarding','My Offboarding'),
|
||||
('alerts','My Alert')
|
||||
('alerts','My Alert'),
|
||||
('reports','My Reports')
|
||||
] %}
|
||||
|
||||
<section class="rounded-2xl border border-slate-200 bg-white p-3 shadow-soft">
|
||||
@@ -93,10 +98,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
tabs.forEach(function (button) {
|
||||
button.addEventListener('click', function () {
|
||||
loadTab(button.dataset.tab || 'overview', true);
|
||||
});
|
||||
document.addEventListener('click', function (event) {
|
||||
const button = event.target.closest('.employee-portal-tab');
|
||||
if (!button || !button.dataset.tab) return;
|
||||
event.preventDefault();
|
||||
loadTab(button.dataset.tab || 'overview', true);
|
||||
});
|
||||
|
||||
window.addEventListener('popstate', function (event) {
|
||||
|
||||
Reference in New Issue
Block a user