3m-portal/dashboard.html
Vadym Samoilenko 53a85c788d Add full auth system: SQLite sessions, email invites, admin console
- Real email/password login backed by SQLite (better-sqlite3)
- HttpOnly cookie sessions with 8h sliding TTL
- Admin role: invite users via Mailgun magic-link, manage roles/status
- Per-user One2Edit username mapping for job filtering
- Self-service forgot-password / reset-password via email
- Admin console (admin.html) with user table, invite modal, row actions
- New pages: change-password, forgot-password, reset-password, accept-invite
- Gated /api proxy: requires valid session, anti-hijack sessionId check
- Bootstrap initial admins from INITIAL_ADMINS env var on first boot
- Remove Oliver login button, SSO buttons, and legacy api.js/login.js
- deploy.sh: add build-essential (for native module), npm install, data dir

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 11:26:40 +01:00

96 lines
4.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3M - OMG Portal</title>
<link rel="icon" type="image/png" href="Images/Favicon_logo.png">
<link rel="stylesheet" href="styles.css">
</head>
<body class="dashboard-page">
<!-- Dashboard Header -->
<div class="dashboard-header-bar">
<div class="dashboard-title-section">
<img src="Images/login_logo.png" alt="3M Logo" class="dashboard-logo">
<h1>Jobs</h1>
</div>
<div class="dashboard-actions">
<button id="adminBtn" class="admin-button" style="display:none;" onclick="window.location.href='admin.html'">Admin</button>
<button id="refreshBtn" class="refresh-button">Refresh</button>
<button id="signOutBtn" class="sign-out-button">Sign Out</button>
</div>
</div>
<!-- Dashboard Content -->
<div class="dashboard-content">
<!-- Project Header -->
<div class="project-header">
<div class="project-info">
<h2>Overall Progress</h2>
<div id="overallProgressContainer" style="width: 100%; margin-top: 15px;">
<p id="overallProgressText" class="job-info-line" style="margin-bottom: 10px;"><strong>0 of 0 elements done (0%)</strong></p>
<div class="progress-bar-container">
<div class="progress-bar">
<div class="progress-segment progress-done" id="overallDone" style="width: 0%"></div>
<div class="progress-segment progress-finish" id="overallFinish" style="width: 0%"></div>
<div class="progress-segment progress-remaining" id="overallRemaining" style="width: 100%"></div>
</div>
<div class="progress-legend">
<span class="legend-item">
<span class="legend-color legend-done"></span>
<span id="overallDoneText">Done: 0 (0%)</span>
</span>
<span class="legend-item">
<span class="legend-color legend-finish"></span>
<span id="overallFinishText">Finished: 0 (0%)</span>
</span>
<span class="legend-item">
<span class="legend-color legend-remaining"></span>
<span id="overallTotalText">Total: 0</span>
</span>
</div>
</div>
</div>
</div>
</div>
<!-- Filters -->
<div class="dashboard-filters">
<input
type="search"
id="searchInput"
class="search-input"
placeholder="Search by title, document, language…"
autocomplete="off"
>
<label class="workflow-filter">
<span>Workflow stage</span>
<select id="workflowFilter" class="workflow-select">
<option value="all">All</option>
<option value="Edit">Edit</option>
<option value="Client - Review/Approval">Client - Review/Approval</option>
</select>
</label>
<span id="resultCount" class="result-count"></span>
</div>
<!-- Loading Message -->
<div id="loadingMessage" class="loading-message" style="display: none;">
<p>Loading jobs...</p>
</div>
<!-- Error Message -->
<div id="errorMessage" class="error-message" style="display: none;"></div>
<!-- Jobs Grid -->
<div id="jobsGrid" class="jobs-grid"></div>
<!-- Empty State -->
<div id="emptyState" class="empty-state" style="display: none;">
<p>No jobs found</p>
</div>
</div>
<script src="dashboard.js"></script>
</body>
</html>