Spaces:
Running
<!DOCTYPE html>
Browse files<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TimeTrack Pro - Construction Hours Logger</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
:root {
--primary: #3b82f6;
--secondary: #10b981;
--card: #ffffff;
--text: #111827;
--muted: #6b7280;
--border: #e5e7eb;
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
body {
font-family: 'Inter', sans-serif;
background-color: #f9fafb;
color: var(--text);
}
.card {
background-color: var(--card);
border-radius: 0.5rem;
box-shadow: var(--shadow);
border: 1px solid var(--border);
}
.btn {
transition: all 0.2s ease;
}
.btn-primary {
background-color: var(--primary);
color: white;
}
.btn-primary:hover {
background-color: #2563eb;
}
.btn-secondary {
background-color: var(--secondary);
color: white;
}
.btn-secondary:hover {
background-color: #059669;
}
.btn-danger {
background-color: #ef4444;
color: white;
}
.btn-danger:hover {
background-color: #dc2626;
}
.btn-ghost {
background-color: transparent;
color: var(--primary);
border: 1px solid var(--primary);
}
.btn-ghost:hover {
background-color: rgba(59, 130, 246, 0.1);
}
</style>
</head>
<body class="min-h-screen bg-gray-50">
<!-- Notification Toast -->
<div id="notification" class="fixed left-1/2 transform -translate-x-1/2 -top-16 transition-all duration-300 z-50 px-4 py-3 rounded-lg shadow-lg bg-white border border-gray-200 hidden"></div>
<!-- Theme Toggle -->
<div class="fixed top-4 right-4 flex items-center gap-2 z-50">
<div class="theme-toggle relative w-12 h-6 rounded-full bg-gray-200 cursor-pointer" id="themeToggle">
<div class="knob absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform"></div>
</div>
<span class="theme-toggle-label text-sm font-medium">Dark</span>
</div>
<!-- Auth Section -->
<div id="authShell" class="min-h-screen flex flex-col items-center justify-center p-4">
<div id="topLogo" class="mb-8">
<img src="https://i.ibb.co/HLKfKpvC/DDFGTDGDsdfsdf-G.png" alt="TimeTrack Pro Logo" class="w-64 max-w-full">
</div>
<!-- Login Form -->
<div id="loginSection" class="w-full max-w-md">
<div class="card p-6">
<h1 class="text-2xl font-bold text-center mb-6">Sign In</h1>
<div class="space-y-4">
<div class="flex gap-3">
<input type="text" id="firstName" placeholder="First name" class="flex-1 p-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
<input type="text" id="lastName" placeholder="Last name" class="flex-1 p-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
</div>
<input type="password" id="pinUnique" placeholder="PIN" class="w-full p-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
<button id="loginButton" class="btn btn-primary w-full py-3 rounded-lg font-medium">Login</button>
<button id="createAccountButton" class="btn btn-ghost w-full py-2 text-sm">Create Account</button>
<p class="text-center text-sm text-gray-500">Access limited to registered users</p>
</div>
</div>
</div>
<!-- Create Account Form -->
<div id="createAccountSection" class="w-full max-w-md hidden">
<div class="card p-6">
<h1 class="text-2xl font-bold text-center mb-6">Create Account</h1>
<div class="space-y-4">
<div class="flex gap-3">
<input type="text" id="createAccountFirstNameUnique" placeholder="First name" class="flex-1 p-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
<input type="text" id="createAccountLastNameUnique" placeholder="Last name" class="flex-1 p-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
</div>
<input type="password" id="createAccountPinUnique" placeholder="PIN (4+ digits)" class="w-full p-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
<input type="password" id="createAccountRePinUnique" placeholder="Re-enter PIN" class="w-full p-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
<button id="submitButton" class="btn btn-primary w-full py-3 rounded-lg font-medium">Submit</button>
<button id="backButton" class="btn btn-danger w-full py-2 text-sm">Back</button>
</div>
</div>
</div>
</div>
<!-- Main App Content -->
<div id="mainContent" class="hidden container mx-auto p-4 max-w-6xl">
<!-- Impersonation Banner -->
<div id="impersonationBanner" class="sticky top-0 z-40 bg-yellow-50 border-b border-yellow-300 text-yellow-800 p-3 hidden">
<div class="container mx-auto flex justify-between items-center">
<span>Impersonating <strong id="impersonatingName"></strong></span>
<button id="stopImpersonateBtn" class="btn btn-danger px-3 py-1 text-sm">Stop</button>
</div>
</div>
<!-- Header -->
<div class="text-center my-6">
<img src="https://i.ibb.co/HLKfKpvC/DDFGTDGDsdfsdf-G.png" alt="TimeTrack Pro Logo" class="w-64 mx-auto">
</div>
<!-- Period Controls -->
<div class="flex flex-col items-center mb-6">
<div class="card p-3 w-full max-w-2xl flex items-center justify-between">
<select id="payPeriodSelect" class="flex-1 p-2 border rounded-lg focus:ring-2 focus:ring-blue-500"></select>
<button id="hamburgerBtn" class="ml-3 p-2 rounded-lg hover:bg-gray-100">☰</button>
</div>
<div id="periodActionsRow" class="flex flex-wrap justify-center gap-2 mt-3">
<button id="menuEditPeriod" class="btn btn-ghost flex items-center gap-1">
<i data-feather="edit"></i> Edit
</button>
<button id="menuAddPeriod" class="btn btn-ghost flex items-center gap-1">
<i data-feather="plus"></i> New
</button>
<button id="menuRemovePeriods" class="btn btn-ghost flex items-center gap-1">
<i data-feather="trash-2"></i> Remove
</button>
<button id="menuDaysManager" class="btn btn-ghost flex items-center gap-1">
<i data-feather="calendar"></i> Days
</button>
<button id="openAdminBtn" class="btn btn-ghost flex items-center gap-1 hidden">
<i data-feather="shield"></i> Admin
</button>
</div>
</div>
<!-- Period Editor -->
<div id="dateEditContainer" class="card p-4 mb-6 max-w-2xl mx-auto hidden">
<h4 class="text-lg font-semibold text-center mb-2">Pay Period Date Select</h4>
<p class="text-sm text-gray-500 text-center mb-4">Select the start and end dates for the pay period</p>
<div class="flex flex-wrap justify-center gap-4 mb-4">
<div>
<label class="block text-sm font-medium mb-1">Start</label>
<input type="date" id="startDateInput" class="p-2 border rounded-lg">
</div>
<div>
<label class="block text-sm font-medium mb-1">End</label>
<input type="date" id="endDateInput" class="p-2 border rounded-lg">
</div>
</div>
<div class="flex justify-center gap-3">
<button id="savePeriodBtn" class="btn btn-primary px-4 py-2">Save</button>
<button id="cancelPeriodBtn" class="btn btn-ghost px-4 py-2">Cancel</button>
</div>
</div>
<!-- Main Content Sections -->
<div id="dayTables" class="card p-4 mb-6"></div>
<div id="jobSummary" class="card p-4 mb-6"></div>
<div id="adminAggregate" class="card p-4 mb-6 hidden"></div>
<!-- Action Buttons -->
<div id="mainActionRow" class="flex justify-center gap-3 mb-6 hidden">
<button id="generateInvoice" class="btn btn-primary px-4 py-2">Generate Invoice</button>
<button id="toggleLogs" class="btn btn-ghost px-4 py-2">Show Logs</button>
<button id="toggleMeta" class="btn btn-ghost px-4 py-2">Show Meta Data</button>
</div>
<!-- Log and Meta Panels -->
<div id="logPanel" class="card p-4 mb-6 max-h-48 overflow-auto hidden"></div>
<div id="metaPanel" class="card p-4 mb-6 max-h-56 overflow-auto hidden whitespace-pre"></div>
<!-- Footer -->
<div class="text-center mt-8 mb-4">
<button id="footerLogout" class="text-gray-500 hover:text-gray-700 hidden">Logout</button>
</div>
</div>
<!-- Modals -->
<div id="descModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="card p-6 max-w-md w-full mx-4">
<h2 class="text-xl font-bold text-center mb-4">Description</h2>
<div id="descModalText" class="mb-4 break-words"></div>
<div class="text-center">
<button id="closeDescModal" class="btn btn-ghost px-4 py-2">Close</button>
</div>
</div>
</div>
<div id="removePeriodsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="card p-6 max-w-md w-full mx-4">
<h3 class="text-lg font-bold text-center mb-2">Select Pay Periods to Delete</h3>
<p class="text-sm text-gray-500 text-center mb-4">Check the box for any pay periods you want to remove</p>
<div id="removePeriodsList" class="space-y-2 mb-4"></div>
<div class="flex justify-center gap-3">
<button id="confirmRemovePeriods" class="btn btn-danger px-4 py-2">Delete</button>
<button id="cancelRemovePeriods" class="btn btn-ghost px-4 py-2">Cancel</button>
</div>
</div>
</div>
<div id="daysWorkedModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="card p-6 max-w-md w-full mx-4">
<h2 class="text-xl font-bold text-center mb-4">Days Worked Manager</h2>
<div id="daysWorkedList" class="mb-4"></div>
<div class="flex justify-center gap-3">
<button id="saveD
- README.md +8 -5
- index.html +548 -18
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: BuildTracker Pro 🔨
|
| 3 |
+
colorFrom: gray
|
| 4 |
+
colorTo: red
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://deepsite.hf.co).
|
|
@@ -1,19 +1,549 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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0">
|
| 6 |
+
<title>BuildTracker Pro - Construction Hours Logger</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
|
| 10 |
+
<style>
|
| 11 |
+
:root {
|
| 12 |
+
--primary: #3b82f6;
|
| 13 |
+
--primary-dark: #2563eb;
|
| 14 |
+
--secondary: #10b981;
|
| 15 |
+
--secondary-dark: #059669;
|
| 16 |
+
--accent: #f59e0b;
|
| 17 |
+
--card: #ffffff;
|
| 18 |
+
--card-dark: #1f2937;
|
| 19 |
+
--text: #111827;
|
| 20 |
+
--text-dark: #f9fafb;
|
| 21 |
+
--muted: #6b7280;
|
| 22 |
+
--muted-dark: #9ca3af;
|
| 23 |
+
--border: #e5e7eb;
|
| 24 |
+
--border-dark: #374151;
|
| 25 |
+
--border-strong: #d1d5db;
|
| 26 |
+
--border-strong-dark: #4b5563;
|
| 27 |
+
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 28 |
+
--shadow-dark: 0 4px 6px rgba(0, 0, 0, 0.3);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
body {
|
| 32 |
+
font-family: 'Inter', sans-serif;
|
| 33 |
+
background-color: #f9fafb;
|
| 34 |
+
color: var(--text);
|
| 35 |
+
transition: all 0.3s ease;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
body.dark {
|
| 39 |
+
background-color: #111827;
|
| 40 |
+
color: var(--text-dark);
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.card {
|
| 44 |
+
background-color: var(--card);
|
| 45 |
+
border-radius: 12px;
|
| 46 |
+
box-shadow: var(--shadow);
|
| 47 |
+
border: 1px solid var(--border);
|
| 48 |
+
transition: all 0.3s ease;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.dark .card {
|
| 52 |
+
background-color: var(--card-dark);
|
| 53 |
+
box-shadow: var(--shadow-dark);
|
| 54 |
+
border-color: var(--border-dark);
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.btn {
|
| 58 |
+
transition: all 0.2s ease;
|
| 59 |
+
border-radius: 8px;
|
| 60 |
+
font-weight: 500;
|
| 61 |
+
display: inline-flex;
|
| 62 |
+
align-items: center;
|
| 63 |
+
gap: 4px;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
.btn-primary {
|
| 67 |
+
background-color: var(--primary);
|
| 68 |
+
color: white;
|
| 69 |
+
border: none;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.btn-primary:hover {
|
| 73 |
+
background-color: var(--primary-dark);
|
| 74 |
+
transform: translateY(-1px);
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.btn-secondary {
|
| 78 |
+
background-color: var(--secondary);
|
| 79 |
+
color: white;
|
| 80 |
+
border: none;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.btn-secondary:hover {
|
| 84 |
+
background-color: var(--secondary-dark);
|
| 85 |
+
transform: translateY(-1px);
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
.btn-danger {
|
| 89 |
+
background-color: #ef4444;
|
| 90 |
+
color: white;
|
| 91 |
+
border: none;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.btn-danger:hover {
|
| 95 |
+
background-color: #dc2626;
|
| 96 |
+
transform: translateY(-1px);
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.btn-ghost {
|
| 100 |
+
background-color: transparent;
|
| 101 |
+
color: var(--primary);
|
| 102 |
+
border: 1px solid var(--primary);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.btn-ghost:hover {
|
| 106 |
+
background-color: rgba(59, 130, 246, 0.1);
|
| 107 |
+
transform: translateY(-1px);
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.dark .btn-ghost {
|
| 111 |
+
color: #60a5fa;
|
| 112 |
+
border-color: #60a5fa;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.dark .btn-ghost:hover {
|
| 116 |
+
background-color: rgba(96, 165, 250, 0.1);
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.input-field {
|
| 120 |
+
border: 2px solid var(--border);
|
| 121 |
+
border-radius: 8px;
|
| 122 |
+
padding: 12px;
|
| 123 |
+
transition: all 0.2s ease;
|
| 124 |
+
background-color: white;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.input-field:focus {
|
| 128 |
+
outline: none;
|
| 129 |
+
border-color: var(--primary);
|
| 130 |
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.dark .input-field {
|
| 134 |
+
background-color: #374151;
|
| 135 |
+
border-color: var(--border-dark);
|
| 136 |
+
color: white;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.dark .input-field:focus {
|
| 140 |
+
border-color: #60a5fa;
|
| 141 |
+
box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.day-card {
|
| 145 |
+
border: 2px solid var(--border-strong);
|
| 146 |
+
border-radius: 10px;
|
| 147 |
+
transition: all 0.2s ease;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
.dark .day-card {
|
| 151 |
+
border-color: var(--border-strong-dark);
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.day-card:hover {
|
| 155 |
+
border-color: var(--primary);
|
| 156 |
+
transform: translateY(-2px);
|
| 157 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.dark .day-card:hover {
|
| 161 |
+
border-color: #60a5fa;
|
| 162 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
.vanta-bg {
|
| 166 |
+
position: fixed;
|
| 167 |
+
top: 0;
|
| 168 |
+
left: 0;
|
| 169 |
+
width: 100%;
|
| 170 |
+
height: 100%;
|
| 171 |
+
z-index: -1;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.glass-effect {
|
| 175 |
+
background: rgba(255, 255, 255, 0.85);
|
| 176 |
+
backdrop-filter: blur(10px);
|
| 177 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
.dark .glass-effect {
|
| 181 |
+
background: rgba(17, 24, 39, 0.85);
|
| 182 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
.logo-container {
|
| 186 |
+
background: linear-gradient(135deg, #3b82f6, #10b981);
|
| 187 |
+
border-radius: 20px;
|
| 188 |
+
padding: 4px;
|
| 189 |
+
display: inline-block;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
.logo-inner {
|
| 193 |
+
background: white;
|
| 194 |
+
border-radius: 16px;
|
| 195 |
+
padding: 16px;
|
| 196 |
+
display: flex;
|
| 197 |
+
align-items: center;
|
| 198 |
+
justify-content: center;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
.dark .logo-inner {
|
| 202 |
+
background: #1f2937;
|
| 203 |
+
}
|
| 204 |
+
</style>
|
| 205 |
+
</head>
|
| 206 |
+
<body class="min-h-screen">
|
| 207 |
+
<!-- Vanta.js Background -->
|
| 208 |
+
<div id="vanta-bg" class="vanta-bg"></div>
|
| 209 |
+
|
| 210 |
+
<!-- Notification Toast -->
|
| 211 |
+
<div id="notification" class="fixed left-1/2 transform -translate-x-1/2 -top-16 transition-all duration-300 z-50 px-4 py-3 rounded-lg shadow-lg bg-white border border-gray-200 hidden"></div>
|
| 212 |
+
|
| 213 |
+
<!-- Theme Toggle -->
|
| 214 |
+
<div class="fixed top-4 right-4 flex items-center gap-2 z-50">
|
| 215 |
+
<div class="theme-toggle relative w-12 h-6 rounded-full bg-gray-200 cursor-pointer" id="themeToggle">
|
| 216 |
+
<div class="knob absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform"></div>
|
| 217 |
+
</div>
|
| 218 |
+
<span class="theme-toggle-label text-sm font-medium">Dark</span>
|
| 219 |
+
</div>
|
| 220 |
+
|
| 221 |
+
<!-- Auth Section -->
|
| 222 |
+
<div id="authShell" class="min-h-screen flex flex-col items-center justify-center p-4">
|
| 223 |
+
<div id="topLogo" class="mb-8">
|
| 224 |
+
<div class="logo-container">
|
| 225 |
+
<div class="logo-inner">
|
| 226 |
+
<img src="https://i.ibb.co/HLKfKpvC/DDFGTDGDsdfsdf-G.png" alt="BuildTracker Pro Logo" class="w-64 max-w-full">
|
| 227 |
+
</div>
|
| 228 |
+
</div>
|
| 229 |
+
</div>
|
| 230 |
+
|
| 231 |
+
<!-- Login Form -->
|
| 232 |
+
<div id="loginSection" class="w-full max-w-md">
|
| 233 |
+
<div class="card p-8 glass-effect">
|
| 234 |
+
<h1 class="text-2xl font-bold text-center mb-6 text-gray-800 dark:text-white">Sign In</h1>
|
| 235 |
+
<div class="space-y-4">
|
| 236 |
+
<div class="flex flex-col sm:flex-row gap-3">
|
| 237 |
+
<input type="text" id="firstName" placeholder="First name" class="input-field flex-1 min-w-0">
|
| 238 |
+
<input type="text" id="lastName" placeholder="Last name" class="input-field flex-1 min-w-0">
|
| 239 |
+
</div>
|
| 240 |
+
<input type="password" id="pinUnique" placeholder="PIN" class="input-field w-full">
|
| 241 |
+
<button id="loginButton" class="btn btn-primary w-full py-3 rounded-lg font-medium">Login</button>
|
| 242 |
+
<button id="createAccountButton" class="btn btn-ghost w-full py-2 text-sm">Create Account</button>
|
| 243 |
+
<p class="text-center text-sm text-gray-500 dark:text-gray-400">Access limited to registered users</p>
|
| 244 |
+
</div>
|
| 245 |
+
</div>
|
| 246 |
+
</div>
|
| 247 |
+
|
| 248 |
+
<!-- Create Account Form -->
|
| 249 |
+
<div id="createAccountSection" class="w-full max-w-md hidden">
|
| 250 |
+
<div class="card p-8 glass-effect">
|
| 251 |
+
<h1 class="text-2xl font-bold text-center mb-6 text-gray-800 dark:text-white">Create Account</h1>
|
| 252 |
+
<div class="space-y-4">
|
| 253 |
+
<div class="flex flex-col sm:flex-row gap-3">
|
| 254 |
+
<input type="text" id="createAccountFirstNameUnique" placeholder="First name" class="input-field flex-1 min-w-0">
|
| 255 |
+
<input type="text" id="createAccountLastNameUnique" placeholder="Last name" class="input-field flex-1 min-w-0">
|
| 256 |
+
</div>
|
| 257 |
+
<input type="password" id="createAccountPinUnique" placeholder="PIN (4+ digits)" class="input-field w-full">
|
| 258 |
+
<input type="password" id="createAccountRePinUnique" placeholder="Re-enter PIN" class="input-field w-full">
|
| 259 |
+
<button id="submitButton" class="btn btn-primary w-full py-3 rounded-lg font-medium">Submit</button>
|
| 260 |
+
<button id="backButton" class="btn btn-danger w-full py-2 text-sm">Back</button>
|
| 261 |
+
</div>
|
| 262 |
+
</div>
|
| 263 |
+
</div>
|
| 264 |
+
</div>
|
| 265 |
+
|
| 266 |
+
<!-- Main App Content -->
|
| 267 |
+
<div id="mainContent" class="hidden container mx-auto p-4 max-w-6xl">
|
| 268 |
+
<!-- Impersonation Banner -->
|
| 269 |
+
<div id="impersonationBanner" class="sticky top-0 z-40 bg-yellow-50 border-b border-yellow-300 text-yellow-800 p-3 hidden dark:bg-yellow-900 dark:border-yellow-700 dark:text-yellow-200">
|
| 270 |
+
<div class="container mx-auto flex justify-between items-center">
|
| 271 |
+
<span>Impersonating <strong id="impersonatingName"></strong></span>
|
| 272 |
+
<button id="stopImpersonateBtn" class="btn btn-danger px-3 py-1 text-sm">Stop</button>
|
| 273 |
+
</div>
|
| 274 |
+
</div>
|
| 275 |
+
|
| 276 |
+
<!-- Header -->
|
| 277 |
+
<div class="text-center my-8">
|
| 278 |
+
<div class="logo-container inline-block">
|
| 279 |
+
<div class="logo-inner">
|
| 280 |
+
<img src="https://i.ibb.co/HLKfKpvC/DDFGTDGDsdfsdf-G.png" alt="BuildTracker Pro Logo" class="w-64 mx-auto">
|
| 281 |
+
</div>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<!-- Period Controls -->
|
| 286 |
+
<div class="flex flex-col items-center mb-8">
|
| 287 |
+
<div class="card p-4 w-full max-w-2xl flex items-center justify-between glass-effect">
|
| 288 |
+
<select id="payPeriodSelect" class="input-field flex-1"></select>
|
| 289 |
+
<button id="hamburgerBtn" class="ml-3 p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700">
|
| 290 |
+
<i data-feather="menu"></i>
|
| 291 |
+
</button>
|
| 292 |
+
</div>
|
| 293 |
+
|
| 294 |
+
<div id="periodActionsRow" class="flex flex-wrap justify-center gap-3 mt-4">
|
| 295 |
+
<button id="menuEditPeriod" class="btn btn-ghost flex items-center gap-2">
|
| 296 |
+
<i data-feather="edit"></i> Edit
|
| 297 |
+
</button>
|
| 298 |
+
<button id="menuAddPeriod" class="btn btn-ghost flex items-center gap-2">
|
| 299 |
+
<i data-feather="plus"></i> New
|
| 300 |
+
</button>
|
| 301 |
+
<button id="menuRemovePeriods" class="btn btn-ghost flex items-center gap-2">
|
| 302 |
+
<i data-feather="trash-2"></i> Remove
|
| 303 |
+
</button>
|
| 304 |
+
<button id="menuDaysManager" class="btn btn-ghost flex items-center gap-2">
|
| 305 |
+
<i data-feather="calendar"></i> Days
|
| 306 |
+
</button>
|
| 307 |
+
<button id="openAdminBtn" class="btn btn-ghost flex items-center gap-2 hidden">
|
| 308 |
+
<i data-feather="shield"></i> Admin
|
| 309 |
+
</button>
|
| 310 |
+
</div>
|
| 311 |
+
</div>
|
| 312 |
+
|
| 313 |
+
<!-- Period Editor -->
|
| 314 |
+
<div id="dateEditContainer" class="card p-6 mb-8 max-w-2xl mx-auto glass-effect hidden">
|
| 315 |
+
<h4 class="text-lg font-semibold text-center mb-3 text-gray-800 dark:text-white">Pay Period Date Select</h4>
|
| 316 |
+
<p class="text-sm text-gray-500 text-center mb-6">Select the start and end dates for the pay period</p>
|
| 317 |
+
<div class="flex flex-wrap justify-center gap-6 mb-6">
|
| 318 |
+
<div>
|
| 319 |
+
<label class="block text-sm font-medium mb-2 text-gray-700 dark:text-gray-300">Start</label>
|
| 320 |
+
<input type="date" id="startDateInput" class="input-field">
|
| 321 |
+
</div>
|
| 322 |
+
<div>
|
| 323 |
+
<label class="block text-sm font-medium mb-2 text-gray-700 dark:text-gray-300">End</label>
|
| 324 |
+
<input type="date" id="endDateInput" class="input-field">
|
| 325 |
+
</div>
|
| 326 |
+
</div>
|
| 327 |
+
<div class="flex justify-center gap-3">
|
| 328 |
+
<button id="savePeriodBtn" class="btn btn-primary px-6 py-2">Save</button>
|
| 329 |
+
<button id="cancelPeriodBtn" class="btn btn-ghost px-6 py-2">Cancel</button>
|
| 330 |
+
</div>
|
| 331 |
+
</div>
|
| 332 |
+
|
| 333 |
+
<!-- Main Content Sections -->
|
| 334 |
+
<div id="dayTables" class="card p-6 mb-8 glass-effect">
|
| 335 |
+
<h3 class="text-xl font-bold mb-4 text-gray-800 dark:text-white">Daily Time Tracking</h3>
|
| 336 |
+
<!-- Day cards will be dynamically inserted here with visible borders -->
|
| 337 |
+
</div>
|
| 338 |
+
|
| 339 |
+
<div id="jobSummary" class="card p-6 mb-8 glass-effect">
|
| 340 |
+
<h3 class="text-xl font-bold mb-4 text-gray-800 dark:text-white">Job Summary</h3>
|
| 341 |
+
<!-- Job summary content will be dynamically inserted here -->
|
| 342 |
+
</div>
|
| 343 |
+
|
| 344 |
+
<div id="adminAggregate" class="card p-6 mb-8 glass-effect hidden">
|
| 345 |
+
<h3 class="text-xl font-bold mb-4 text-gray-800 dark:text-white">Admin Overview</h3>
|
| 346 |
+
<!-- Admin aggregate content will be dynamically inserted here -->
|
| 347 |
+
</div>
|
| 348 |
+
|
| 349 |
+
<!-- Action Buttons -->
|
| 350 |
+
<div id="mainActionRow" class="flex justify-center gap-4 mb-8 hidden">
|
| 351 |
+
<button id="generateInvoice" class="btn btn-primary px-6 py-3 flex items-center gap-2">
|
| 352 |
+
<i data-feather="file-text"></i> Generate Invoice
|
| 353 |
+
</button>
|
| 354 |
+
<button id="toggleLogs" class="btn btn-ghost px-6 py-3 flex items-center gap-2">
|
| 355 |
+
<i data-feather="list"></i> Show Logs
|
| 356 |
+
</button>
|
| 357 |
+
<button id="toggleMeta" class="btn btn-ghost px-6 py-3 flex items-center gap-2">
|
| 358 |
+
<i data-feather="info"></i> Show Meta Data
|
| 359 |
+
</button>
|
| 360 |
+
</div>
|
| 361 |
+
|
| 362 |
+
<!-- Log and Meta Panels -->
|
| 363 |
+
<div id="logPanel" class="card p-6 mb-8 max-h-48 overflow-auto glass-effect hidden">
|
| 364 |
+
<h4 class="text-lg font-semibold mb-3 text-gray-800 dark:text-white">Activity Log</h4>
|
| 365 |
+
<!-- Log content will be dynamically inserted here -->
|
| 366 |
+
</div>
|
| 367 |
+
|
| 368 |
+
<div id="metaPanel" class="card p-6 mb-8 max-h-56 overflow-auto glass-effect hidden whitespace-pre">
|
| 369 |
+
<h4 class="text-lg font-semibold mb-3 text-gray-800 dark:text-white">Meta Data</h4>
|
| 370 |
+
<!-- Meta data content will be dynamically inserted here -->
|
| 371 |
+
</div>
|
| 372 |
+
|
| 373 |
+
<!-- Footer -->
|
| 374 |
+
<div class="text-center mt-12 mb-6">
|
| 375 |
+
<button id="footerLogout" class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hidden flex items-center gap-2 mx-auto">
|
| 376 |
+
<i data-feather="log-out"></i> Logout
|
| 377 |
+
</button>
|
| 378 |
+
</div>
|
| 379 |
+
</div>
|
| 380 |
+
|
| 381 |
+
<!-- Modals -->
|
| 382 |
+
<div id="descModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 383 |
+
<div class="card p-6 max-w-md w-full mx-4 glass-effect">
|
| 384 |
+
<h2 class="text-xl font-bold text-center mb-4 text-gray-800 dark:text-white">Description</h2>
|
| 385 |
+
<div id="descModalText" class="mb-4 break-words text-gray-700 dark:text-gray-300"></div>
|
| 386 |
+
<div class="text-center">
|
| 387 |
+
<button id="closeDescModal" class="btn btn-ghost px-4 py-2">Close</button>
|
| 388 |
+
</div>
|
| 389 |
+
</div>
|
| 390 |
+
</div>
|
| 391 |
+
|
| 392 |
+
<div id="removePeriodsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 393 |
+
<div class="card p-6 max-w-md w-full mx-4 glass-effect">
|
| 394 |
+
<h3 class="text-lg font-bold text-center mb-2 text-gray-800 dark:text-white">Select Pay Periods to Delete</h3>
|
| 395 |
+
<p class="text-sm text-gray-500 text-center mb-4">Check the box for any pay periods you want to remove</p>
|
| 396 |
+
<div id="removePeriodsList" class="space-y-2 mb-4"></div>
|
| 397 |
+
<div class="flex justify-center gap-3">
|
| 398 |
+
<button id="confirmRemovePeriods" class="btn btn-danger px-4 py-2">Delete</button>
|
| 399 |
+
<button id="cancelRemovePeriods" class="btn btn-ghost px-4 py-2">Cancel</button>
|
| 400 |
+
</div>
|
| 401 |
+
</div>
|
| 402 |
+
</div>
|
| 403 |
+
|
| 404 |
+
<div id="daysWorkedModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 405 |
+
<div class="card p-6 max-w-md w-full mx-4 glass-effect">
|
| 406 |
+
<h2 class="text-xl font-bold text-center mb-4 text-gray-800 dark:text-white">Days Worked Manager</h2>
|
| 407 |
+
<div id="daysWorkedList" class="mb-4"></div>
|
| 408 |
+
<div class="flex justify-center gap-3">
|
| 409 |
+
<button id="saveDaysWorkedModal" class="btn btn-primary px-4 py-2">Save</button>
|
| 410 |
+
<button id="closeDaysWorkedModal" class="btn btn-ghost px-4 py-2">Cancel</button>
|
| 411 |
+
</div>
|
| 412 |
+
</div>
|
| 413 |
+
</div>
|
| 414 |
+
|
| 415 |
+
<div id="adminModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 416 |
+
<div class="card p-6 w-full max-w-4xl glass-effect">
|
| 417 |
+
<h2 class="text-xl font-bold text-center mb-2 text-gray-800 dark:text-white">Admin Panel</h2>
|
| 418 |
+
<p class="text-sm text-gray-500 text-center mb-4">Manage users, roles, and data</p>
|
| 419 |
+
<div class="flex justify-center gap-3 mb-4">
|
| 420 |
+
<button id="adminCreateUser" class="btn btn-primary px-4 py-2 flex items-center gap-2">
|
| 421 |
+
<i data-feather="user-plus"></i> New User
|
| 422 |
+
</button>
|
| 423 |
+
<button id="adminRefresh" class="btn btn-ghost px-4 py-2 flex items-center gap-2">
|
| 424 |
+
<i data-feather="refresh-cw"></i> Refresh
|
| 425 |
+
</button>
|
| 426 |
+
<button id="adminClose" class="btn btn-danger px-4 py-2 flex items-center gap-2">
|
| 427 |
+
<i data-feather="x"></i> Close
|
| 428 |
+
</button>
|
| 429 |
+
</div>
|
| 430 |
+
<div id="adminUsers" class="overflow-auto max-h-96"></div>
|
| 431 |
+
</div>
|
| 432 |
+
</div>
|
| 433 |
+
|
| 434 |
+
<!-- Scripts -->
|
| 435 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
|
| 436 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.25/jspdf.plugin.autotable.min.js"></script>
|
| 437 |
+
|
| 438 |
+
<script>
|
| 439 |
+
// Initialize Vanta.js background
|
| 440 |
+
let vantaEffect;
|
| 441 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 442 |
+
// Initialize Vanta.js
|
| 443 |
+
vantaEffect = VANTA.NET({
|
| 444 |
+
el: "#vanta-bg",
|
| 445 |
+
mouseControls: true,
|
| 446 |
+
touchControls: true,
|
| 447 |
+
gyroControls: false,
|
| 448 |
+
minHeight: 200.00,
|
| 449 |
+
minWidth: 200.00,
|
| 450 |
+
scale: 1.00,
|
| 451 |
+
scaleMobile: 1.00,
|
| 452 |
+
color: 0x3b82f6,
|
| 453 |
+
backgroundColor: 0xf9fafb,
|
| 454 |
+
points: 12.00,
|
| 455 |
+
maxDistance: 22.00,
|
| 456 |
+
spacing: 18.00
|
| 457 |
+
});
|
| 458 |
+
|
| 459 |
+
// Initialize feather icons
|
| 460 |
+
feather.replace();
|
| 461 |
+
|
| 462 |
+
// Set light theme by default
|
| 463 |
+
document.documentElement.classList.remove('dark');
|
| 464 |
+
document.querySelector('.theme-toggle-label').textContent = 'Light';
|
| 465 |
+
|
| 466 |
+
// Theme toggle functionality
|
| 467 |
+
document.getElementById('themeToggle').addEventListener('click', function() {
|
| 468 |
+
const html = document.documentElement;
|
| 469 |
+
const isDark = html.classList.toggle('dark');
|
| 470 |
+
document.querySelector('.theme-toggle-label').textContent = isDark ? 'Dark' : 'Light';
|
| 471 |
+
|
| 472 |
+
// Update Vanta.js background for theme
|
| 473 |
+
if (vantaEffect) {
|
| 474 |
+
vantaEffect.destroy();
|
| 475 |
+
}
|
| 476 |
+
vantaEffect = VANTA.NET({
|
| 477 |
+
el: "#vanta-bg",
|
| 478 |
+
mouseControls: true,
|
| 479 |
+
touchControls: true,
|
| 480 |
+
gyroControls: false,
|
| 481 |
+
minHeight: 200.00,
|
| 482 |
+
minWidth: 200.00,
|
| 483 |
+
scale: 1.00,
|
| 484 |
+
scaleMobile: 1.00,
|
| 485 |
+
color: isDark ? 0x60a5fa : 0x3b82f6,
|
| 486 |
+
backgroundColor: isDark ? 0x111827 : 0xf9fafb,
|
| 487 |
+
points: 12.00,
|
| 488 |
+
maxDistance: 22.00,
|
| 489 |
+
spacing: 18.00
|
| 490 |
+
});
|
| 491 |
+
|
| 492 |
+
// Update knob position
|
| 493 |
+
const knob = document.querySelector('.theme-toggle .knob');
|
| 494 |
+
knob.style.transform = isDark ? 'translateX(24px)' : 'translateX(0)';
|
| 495 |
+
});
|
| 496 |
+
});
|
| 497 |
+
|
| 498 |
+
// Notification function
|
| 499 |
+
function showNotification(message, type = 'info') {
|
| 500 |
+
const notification = document.getElementById('notification');
|
| 501 |
+
notification.textContent = message;
|
| 502 |
+
notification.className = `fixed left-1/2 transform -translate-x-1/2 top-4 transition-all duration-300 z-50 px-4 py-3 rounded-lg shadow-lg ${
|
| 503 |
+
type === 'error' ? 'bg-red-50 border-red-500 text-red-700' :
|
| 504 |
+
type === 'success' ? 'bg-green-50 border-green-500 text-green-700' :
|
| 505 |
+
'bg-blue-50 border-blue-500 text-blue-700'
|
| 506 |
+
}`;
|
| 507 |
+
|
| 508 |
+
setTimeout(() => {
|
| 509 |
+
notification.classList.add('hidden');
|
| 510 |
+
}, 3000);
|
| 511 |
+
}
|
| 512 |
+
|
| 513 |
+
// Example day card structure (for reference)
|
| 514 |
+
function createDayCard(dayData) {
|
| 515 |
+
return `
|
| 516 |
+
<div class="day-card p-4 mb-4">
|
| 517 |
+
<div class="flex justify-between items-center mb-3">
|
| 518 |
+
<h4 class="font-semibold text-lg">${dayData.date}</h4>
|
| 519 |
+
<span class="bg-blue-100 text-blue-800 px-2 py-1 rounded-full text-sm font-medium dark:bg-blue-900 dark:text-blue-200">
|
| 520 |
+
${dayData.hours} hours
|
| 521 |
+
</span>
|
| 522 |
+
</div>
|
| 523 |
+
<div class="space-y-2">
|
| 524 |
+
${dayData.jobs.map(job => `
|
| 525 |
+
<div class="flex justify-between items-center p-2 bg-gray-50 rounded-lg dark:bg-gray-800">
|
| 526 |
+
<span class="font-medium">${job.name}</span>
|
| 527 |
+
<span class="text-gray-600 dark:text-gray-400">${job.hours}h</span>
|
| 528 |
+
</div>
|
| 529 |
+
`).join('')}
|
| 530 |
+
</div>
|
| 531 |
+
</div>
|
| 532 |
+
`;
|
| 533 |
+
}
|
| 534 |
+
</script>
|
| 535 |
+
|
| 536 |
+
<!-- App scripts would be loaded here -->
|
| 537 |
+
<script src="./js/globals.js"></script>
|
| 538 |
+
<script src="./js/helpers.js"></script>
|
| 539 |
+
<script src="./js/periods.js"></script>
|
| 540 |
+
<script src="./js/data.js"></script>
|
| 541 |
+
<script src="./js/admin_aggregate.js"></script>
|
| 542 |
+
<script src="./js/render.js"></script>
|
| 543 |
+
<script src="./js/job_actions.js"></script>
|
| 544 |
+
<script src="./js/period_controls.js"></script>
|
| 545 |
+
<script src="./js/invoice.js"></script>
|
| 546 |
+
<script src="./js/auth_admin.js"></script>
|
| 547 |
+
<script src="./js/init.js"></script>
|
| 548 |
+
</body>
|
| 549 |
</html>
|