Features: - Manager-centric parking spot management - Fair assignment algorithm (parking/presence ratio) - Presence tracking calendar - Closing days (specific & weekly recurring) - Guarantees and exclusions - Authelia/LLDAP integration for SSO Stack: - FastAPI backend - SQLite database - Vanilla JS frontend - Docker deployment
133 lines
5.9 KiB
HTML
133 lines
5.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Manage Users - Parking Manager</title>
|
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
|
<link rel="stylesheet" href="/css/styles.css">
|
|
</head>
|
|
<body>
|
|
<aside class="sidebar">
|
|
<div class="sidebar-header">
|
|
<h1>Parking Manager</h1>
|
|
</div>
|
|
<nav class="sidebar-nav"></nav>
|
|
<div class="sidebar-footer">
|
|
<div class="user-menu">
|
|
<button class="user-button" id="userMenuButton">
|
|
<div class="user-avatar">
|
|
<svg width="20" height="20" 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"></path>
|
|
<circle cx="12" cy="7" r="4"></circle>
|
|
</svg>
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name" id="userName">Loading...</div>
|
|
<div class="user-role" id="userRole">-</div>
|
|
</div>
|
|
</button>
|
|
<div class="user-dropdown" id="userDropdown" style="display: none;">
|
|
<a href="/profile" class="dropdown-item">Profile</a>
|
|
<a href="/settings" class="dropdown-item">Settings</a>
|
|
<hr class="dropdown-divider">
|
|
<button class="dropdown-item" id="logoutButton">Logout</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<main class="main-content">
|
|
<header class="page-header">
|
|
<h2>Manage Users</h2>
|
|
<div class="header-actions">
|
|
<input type="text" id="searchInput" class="form-input" placeholder="Search users...">
|
|
</div>
|
|
</header>
|
|
|
|
<div class="content-wrapper">
|
|
<div class="card">
|
|
<div class="data-table-container">
|
|
<table class="data-table" id="usersTable">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Email</th>
|
|
<th>Role</th>
|
|
<th>Office</th>
|
|
<th>Managed Offices</th>
|
|
<th>Parking Quota</th>
|
|
<th>Spot Prefix</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="usersBody"></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<!-- Edit User Modal -->
|
|
<div class="modal" id="userModal" style="display: none;">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h3 id="userModalTitle">Edit User</h3>
|
|
<button class="modal-close" id="closeUserModal">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form id="userForm">
|
|
<input type="hidden" id="userId">
|
|
<div class="form-group">
|
|
<label for="editName">Name</label>
|
|
<input type="text" id="editName" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="editEmail">Email</label>
|
|
<input type="email" id="editEmail" disabled>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="editRole">Role</label>
|
|
<select id="editRole" required>
|
|
<option value="employee">Employee</option>
|
|
<option value="manager">Manager</option>
|
|
<option value="admin">Admin</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="editOffice">Office</label>
|
|
<select id="editOffice">
|
|
<option value="">No office</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group" id="quotaGroup" style="display: none;">
|
|
<label for="editQuota">Parking Quota</label>
|
|
<input type="number" id="editQuota" min="0" value="0">
|
|
<small class="text-muted">Number of parking spots this manager can assign</small>
|
|
</div>
|
|
<div class="form-group" id="prefixGroup" style="display: none;">
|
|
<label for="editPrefix">Spot Prefix</label>
|
|
<input type="text" id="editPrefix" maxlength="2" placeholder="A, B, C...">
|
|
<small class="text-muted">Letter prefix for parking spots (e.g., A for spots A1, A2...)</small>
|
|
</div>
|
|
<div class="form-group" id="managedOfficesGroup" style="display: none;">
|
|
<label>Managed Offices</label>
|
|
<div id="managedOfficesCheckboxes" class="checkbox-group"></div>
|
|
<small class="text-muted">Select offices this manager controls</small>
|
|
</div>
|
|
<div class="form-actions">
|
|
<button type="button" class="btn btn-secondary" id="cancelUser">Cancel</button>
|
|
<button type="submit" class="btn btn-dark">Save</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/js/api.js"></script>
|
|
<script src="/js/utils.js"></script>
|
|
<script src="/js/nav.js"></script>
|
|
<script src="/js/admin-users.js"></script>
|
|
</body>
|
|
</html>
|