122 lines
6.4 KiB
HTML
122 lines
6.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Completed Jobs — Thor's Hammer Electrical</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&display=swap" rel="stylesheet">
|
|
<link rel="icon" href="{{ url_for('static', filename='images/Logo.png') }}">
|
|
<style>
|
|
body { font-family: system-ui, sans-serif; background-color: #080808; }
|
|
.font-oswald { font-family: 'Oswald', sans-serif; }
|
|
</style>
|
|
</head>
|
|
<body class="text-white min-h-screen" style="background-color: #080808;">
|
|
|
|
<!-- Header bar -->
|
|
<header style="background-color: #0f0f0f; border-bottom: 1px solid rgba(250,204,21,0.15);" class="sticky top-0 z-10">
|
|
<div class="max-w-7xl mx-auto px-4 py-4 flex items-center justify-between gap-4 flex-wrap">
|
|
<div class="flex items-center gap-3">
|
|
<img src="{{ url_for('static', filename='images/Logo.png') }}" alt="Logo"
|
|
class="h-8 w-8 rounded-full ring-1 ring-yellow-400/30">
|
|
<h1 class="font-oswald text-lg font-bold tracking-wide">
|
|
<span class="text-yellow-400">Thor's Hammer</span>
|
|
<span class="text-gray-400 font-light"> · Completed Jobs</span>
|
|
</h1>
|
|
</div>
|
|
<div class="flex items-center gap-3">
|
|
<a href="{{ url_for('admin') }}"
|
|
class="px-4 py-2 text-sm rounded-lg border border-white/10 text-gray-300
|
|
hover:bg-white/5 hover:text-white transition-all font-medium">
|
|
← Active Orders
|
|
</a>
|
|
<form action="{{ url_for('logout') }}" method="POST" class="inline">
|
|
<button type="submit"
|
|
class="px-4 py-2 text-sm rounded-lg bg-red-900/50 border border-red-500/30
|
|
text-red-300 hover:bg-red-900 transition-all font-medium">
|
|
Logout
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="max-w-7xl mx-auto px-4 py-8">
|
|
|
|
<!-- Flash messages -->
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
<div class="mb-6 space-y-2">
|
|
{% for category, message in messages %}
|
|
<div class="px-4 py-3 rounded-lg border text-sm
|
|
{% if category == 'success' %}bg-green-950 border-green-500/50 text-green-300
|
|
{% elif category == 'danger' %}bg-red-950 border-red-500/50 text-red-300
|
|
{% else %}bg-yellow-950 border-yellow-500/50 text-yellow-300{% endif %}">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<!-- Completed Jobs Table -->
|
|
<div class="rounded-2xl border border-white/8 overflow-hidden" style="background-color: #111111;">
|
|
<div class="px-6 py-5 border-b border-white/8">
|
|
<h2 class="font-oswald text-xl font-bold text-white">Completed Jobs</h2>
|
|
<p class="text-gray-500 text-xs mt-0.5">{{ completed_jobs | length }} job(s) completed</p>
|
|
</div>
|
|
|
|
{% if completed_jobs %}
|
|
<div class="overflow-x-auto">
|
|
<table class="w-full text-sm">
|
|
<thead>
|
|
<tr style="background-color: #161616; border-bottom: 1px solid rgba(255,255,255,0.06);">
|
|
<th class="px-4 py-3 text-left text-xs text-gray-500 uppercase tracking-wider font-medium">ID</th>
|
|
<th class="px-4 py-3 text-left text-xs text-gray-500 uppercase tracking-wider font-medium">Name</th>
|
|
<th class="px-4 py-3 text-left text-xs text-gray-500 uppercase tracking-wider font-medium">Job</th>
|
|
<th class="px-4 py-3 text-left text-xs text-gray-500 uppercase tracking-wider font-medium">Address</th>
|
|
<th class="px-4 py-3 text-left text-xs text-gray-500 uppercase tracking-wider font-medium">Phone</th>
|
|
<th class="px-4 py-3 text-left text-xs text-gray-500 uppercase tracking-wider font-medium">Completed</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for job in completed_jobs %}
|
|
<tr class="border-b border-white/5 hover:bg-white/2 transition-colors">
|
|
<td class="px-4 py-4 text-gray-500 text-xs font-mono">#{{ job[0] }}</td>
|
|
<td class="px-4 py-4 text-white font-medium">{{ job[1] }}</td>
|
|
<td class="px-4 py-4 text-gray-300 max-w-xs">
|
|
<span class="block truncate" title="{{ job[2] }}">{{ job[2] }}</span>
|
|
</td>
|
|
<td class="px-4 py-4 text-gray-400 text-xs">
|
|
{{ job[3] }}, {{ job[4] }}, {{ job[5] }} {{ job[6] }}
|
|
</td>
|
|
<td class="px-4 py-4 text-gray-400 text-xs">{{ job[7] }}</td>
|
|
<td class="px-4 py-4 text-green-400 text-xs">
|
|
<span class="flex items-center gap-1">
|
|
<span class="w-1.5 h-1.5 rounded-full bg-green-400 inline-block"></span>
|
|
{{ job[8] }}
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="py-16 text-center">
|
|
<i class="fa-solid fa-circle-check text-gray-600 text-4xl mb-3 block"></i>
|
|
<p class="text-gray-400 font-medium">No completed jobs yet</p>
|
|
<p class="text-gray-600 text-sm mt-1">Jobs marked as complete will appear here</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
</main>
|
|
|
|
</body>
|
|
</html>
|