Files
hr-portal-v5-designs/designs/19-my-leave.html
T
2026-05-09 19:35:10 +00:00

262 lines
16 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Leave — HR Portal</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: #FAFAFA; color: #111827; display: flex; min-height: 100vh; }
.sidebar { width: 240px; min-height: 100vh; background: #FFFFFF; border-right: 1px solid #E5E7EB; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 50; }
.sidebar-logo { padding: 20px 20px 16px; display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: #111827; border-bottom: 1px solid #F3F4F6; }
.logo-icon { width: 32px; height: 32px; background: #4F46E5; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.logo-icon svg { width: 16px; height: 16px; }
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; margin: 1px 8px; border-radius: 6px; font-size: 14px; font-weight: 500; color: #6B7280; text-decoration: none; cursor: pointer; }
.nav-item:hover { background: #F9FAFB; color: #111827; }
.nav-item.active { background: #EEF2FF; color: #4F46E5; font-weight: 600; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-footer { padding: 16px; border-top: 1px solid #F3F4F6; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: #10B981; color: #FFF; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.user-name { font-size: 13px; font-weight: 600; color: #111827; }
.user-role { font-size: 11px; color: #9CA3AF; }
.logout-btn { width: 100%; margin-top: 8px; padding: 7px; border: 1.5px solid #E5E7EB; border-radius: 6px; background: transparent; color: #6B7280; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.main-wrapper { margin-left: 240px; flex: 1; display: flex; flex-direction: column; }
.topnav { height: 64px; background: #FFFFFF; border-bottom: 1px solid #E5E7EB; display: flex; align-items: center; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 40; }
.topnav-name { font-size: 14px; font-weight: 500; color: #374151; }
.topnav-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid #E5E7EB; background: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.icon-btn svg { width: 18px; height: 18px; color: #6B7280; }
.notif-badge { position: absolute; top: -4px; right: -4px; background: #EF4444; color: #FFF; font-size: 10px; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #FFFFFF; }
.topnav-avatar { width: 36px; height: 36px; border-radius: 50%; background: #10B981; color: #FFF; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; cursor: pointer; }
.content { padding: 28px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 700; }
.btn-primary { padding: 9px 18px; background: #4F46E5; color: #FFF; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.btn-primary svg { width: 16px; height: 16px; }
/* BALANCE CARDS */
.balance-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.balance-card { background: #FFFFFF; border-radius: 10px; border: 1px solid #E5E7EB; box-shadow: 0 1px 3px rgba(0,0,0,0.06); padding: 20px; }
.bc-type { font-size: 12px; color: #9CA3AF; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.bc-available { font-size: 32px; font-weight: 800; color: #111827; margin-bottom: 2px; }
.bc-sub { font-size: 13px; color: #9CA3AF; margin-bottom: 12px; }
.bc-bar { height: 6px; background: #F3F4F6; border-radius: 3px; overflow: hidden; }
.bc-fill { height: 100%; border-radius: 3px; }
/* REQUEST FORM */
.request-form-card { background: #FFFFFF; border-radius: 10px; border: 1.5px solid #4F46E5; box-shadow: 0 0 0 3px rgba(79,70,229,0.08); margin-bottom: 24px; overflow: hidden; }
.form-card-header { padding: 16px 20px; background: #EEF2FF; border-bottom: 1px solid #C7D2FE; display: flex; align-items: center; justify-content: space-between; }
.form-card-title { font-size: 15px; font-weight: 600; color: #4F46E5; }
.form-close { color: #9CA3AF; cursor: pointer; }
.request-form { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group {}
.form-label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
width: 100%; padding: 9px 13px; border: 1.5px solid #E5E7EB; border-radius: 6px;
font-size: 14px; font-family: 'Inter', sans-serif; color: #111827;
background: #FFFFFF; outline: none; appearance: none;
transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79,70,229,0.08); }
.form-textarea { min-height: 70px; resize: vertical; }
.col-span-2 { grid-column: 1 / -1; }
.days-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: #EEF2FF; color: #4F46E5; border-radius: 6px; font-size: 14px; font-weight: 600; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.btn-cancel { padding: 9px 18px; border: 1.5px solid #E5E7EB; border-radius: 6px; background: #FFFFFF; color: #374151; font-size: 14px; cursor: pointer; }
.btn-submit { padding: 9px 20px; background: #4F46E5; color: #FFF; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-submit:hover { background: #4338CA; }
/* HISTORY TABLE */
.table-card { background: #FFFFFF; border-radius: 10px; border: 1px solid #E5E7EB; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow: hidden; }
.table-card-header { padding: 16px 20px; border-bottom: 1px solid #F3F4F6; }
.table-card-title { font-size: 15px; font-weight: 600; color: #111827; }
table { width: 100%; border-collapse: collapse; }
thead { background: #F9FAFB; border-bottom: 1px solid #E5E7EB; }
th { padding: 11px 16px; font-size: 12px; font-weight: 600; color: #6B7280; text-align: left; text-transform: uppercase; letter-spacing: 0.4px; }
tbody tr { border-bottom: 1px solid #F3F4F6; transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #FAFAFA; }
td { padding: 13px 16px; font-size: 14px; color: #374151; vertical-align: middle; }
.badge { padding: 3px 9px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-blue { background: #EFF6FF; color: #3B82F6; }
.badge-orange { background: #FFF7ED; color: #EA580C; }
.badge-purple { background: #F5F3FF; color: #7C3AED; }
.badge-green { background: #ECFDF5; color: #059669; }
.badge-yellow { background: #FFFBEB; color: #D97706; }
.badge-red { background: #FEF2F2; color: #DC2626; }
.reason-text { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; color: #9CA3AF; }
</style>
</head>
<body>
<aside class="sidebar">
<div class="sidebar-logo"><div class="logo-icon"><svg viewBox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg></div>HR Portal</div>
<nav class="sidebar-nav">
<a href="18-employee-dashboard.html" class="nav-item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>My Dashboard</a>
<a href="19-my-leave.html" class="nav-item active"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="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"/></svg>My Leave</a>
<a href="#" class="nav-item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>My Attendance</a>
<a href="#" class="nav-item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="5" width="20" height="14" rx="2"/><line x1="2" y1="10" x2="22" y2="10"/></svg>My Payslips</a>
<a href="#" class="nav-item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>Expense Claims</a>
<a href="06-employee-profile.html" class="nav-item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>My Profile</a>
<a href="20-org-chart.html" class="nav-item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="1" width="6" height="5" rx="1"/><rect x="1" y="14" width="6" height="5" rx="1"/><rect x="17" y="14" width="6" height="5" rx="1"/><path d="M4 14v-4a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4"/><line x1="12" y1="6" x2="12" y2="9"/></svg>Org Chart</a>
</nav>
<div class="sidebar-footer">
<div class="user-row"><div class="user-avatar">JD</div><div><div class="user-name">John Davis</div><div class="user-role">Software Engineer</div></div></div>
<button class="logout-btn">Sign Out</button>
</div>
</aside>
<div class="main-wrapper">
<header class="topnav">
<span class="topnav-name">Employee Portal</span>
<div class="topnav-actions">
<div class="icon-btn"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 17H2a3 3 0 0 0 3-3V9a7 7 0 0 1 14 0v5a3 3 0 0 0 3 3zm-8.27 4a2 2 0 0 1-3.46 0"/></svg><span class="notif-badge">2</span></div>
<div class="topnav-avatar">JD</div>
</div>
</header>
<main class="content">
<div class="page-header">
<div class="page-title">My Leave</div>
<button class="btn-primary">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
New Leave Request
</button>
</div>
<!-- BALANCE CARDS -->
<div class="balance-cards">
<div class="balance-card">
<div class="bc-type">Annual Leave</div>
<div class="bc-available">14</div>
<div class="bc-sub">days remaining of 20</div>
<div class="bc-bar"><div class="bc-fill" style="width:70%;background:#4F46E5;"></div></div>
<div style="font-size:11px;color:#9CA3AF;margin-top:6px;">6 days used · 0 pending</div>
</div>
<div class="balance-card">
<div class="bc-type">Sick Leave</div>
<div class="bc-available">8</div>
<div class="bc-sub">days remaining of 10</div>
<div class="bc-bar"><div class="bc-fill" style="width:80%;background:#F59E0B;"></div></div>
<div style="font-size:11px;color:#9CA3AF;margin-top:6px;">2 days used · 0 pending</div>
</div>
<div class="balance-card">
<div class="bc-type">Casual Leave</div>
<div class="bc-available">3</div>
<div class="bc-sub">days remaining of 5</div>
<div class="bc-bar"><div class="bc-fill" style="width:60%;background:#10B981;"></div></div>
<div style="font-size:11px;color:#9CA3AF;margin-top:6px;">2 days used · 0 pending</div>
</div>
</div>
<!-- NEW LEAVE REQUEST FORM (shown open) -->
<div class="request-form-card">
<div class="form-card-header">
<span class="form-card-title">New Leave Request</span>
<svg class="form-close" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</div>
<div class="request-form">
<div class="form-group">
<label class="form-label">Leave Type <span style="color:#EF4444;">*</span></label>
<select class="form-select">
<option selected>Annual Leave</option>
<option>Sick Leave</option>
<option>Casual Leave</option>
</select>
</div>
<div class="form-group">
<label class="form-label">Days</label>
<div class="days-badge">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="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"/></svg>
3 days
</div>
</div>
<div class="form-group">
<label class="form-label">From Date <span style="color:#EF4444;">*</span></label>
<input class="form-input" type="date" value="2026-05-26">
</div>
<div class="form-group">
<label class="form-label">To Date <span style="color:#EF4444;">*</span></label>
<input class="form-input" type="date" value="2026-05-28">
</div>
<div class="form-group col-span-2">
<label class="form-label">Reason <span style="color:#EF4444;">*</span></label>
<textarea class="form-textarea" placeholder="Please describe the reason for your leave request...">Family event and personal commitments over the long weekend.</textarea>
</div>
<div class="form-actions">
<button class="btn-cancel">Cancel</button>
<button class="btn-submit">Submit Request</button>
</div>
</div>
</div>
<!-- LEAVE HISTORY -->
<div class="table-card">
<div class="table-card-header">
<div class="table-card-title">Leave History</div>
</div>
<table>
<thead>
<tr>
<th>Leave Type</th>
<th>From</th>
<th>To</th>
<th>Days</th>
<th>Status</th>
<th>Reason</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="badge badge-purple">Casual</span></td>
<td>May 26</td>
<td>May 28</td>
<td>3</td>
<td><span class="badge badge-yellow">Pending</span></td>
<td><span class="reason-text">Family event and personal commitments</span></td>
</tr>
<tr>
<td><span class="badge badge-blue">Annual</span></td>
<td>Apr 7</td>
<td>Apr 11</td>
<td>5</td>
<td><span class="badge badge-green">Approved</span></td>
<td><span class="reason-text">Spring vacation — Hawaii</span></td>
</tr>
<tr>
<td><span class="badge badge-orange">Sick</span></td>
<td>Mar 22</td>
<td>Mar 22</td>
<td>1</td>
<td><span class="badge badge-green">Approved</span></td>
<td><span class="reason-text">Severe headache and fever</span></td>
</tr>
<tr>
<td><span class="badge badge-blue">Annual</span></td>
<td>Feb 14</td>
<td>Feb 14</td>
<td>1</td>
<td><span class="badge badge-green">Approved</span></td>
<td><span class="reason-text">Anniversary celebration</span></td>
</tr>
<tr>
<td><span class="badge badge-orange">Sick</span></td>
<td>Jan 9</td>
<td>Jan 10</td>
<td>2</td>
<td><span class="badge badge-green">Approved</span></td>
<td><span class="reason-text">Flu — doctor's certificate attached</span></td>
</tr>
</tbody>
</table>
</div>
</main>
</div>
</body>
</html>