Files
Bennys-Board/templates/quotes_admin.html
2025-11-27 00:00:50 +00:00

44 lines
2.6 KiB
HTML

{% extends 'base.html' %}{% block title %}Quotes Admin — {{ brand }}{% endblock %}
{% block content %}
<div class="flex items-center justify-between mb-4">
<h1 class="text-2xl font-bold">Quote Requests</h1>
<nav class="text-sm space-x-2">
{% for k,l in [('active','Active'),('open','Open'),('completed','Completed'),('deleted','Deleted'),('all','All')] %}
<a class="px-3 py-1 rounded border {{ 'bg-white/10' if show==k else 'border-white/10 hover:border-white/30' }}" href="?show={{k}}">{{l}}</a>
{% endfor %}
</nav>
</div>
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-5">
{% for r in rows %}
<article class="card glass p-5 flex flex-col gap-4 {{ 'opacity-60' if r.deleted_at }}">
<header class="flex items-start justify-between">
<div>
<div class="text-xs text-white/60">#{{r.id}} • {{ (r.created_at|string)[:19].replace('T',' ') }}</div>
<h2 class="text-lg font-semibold">{{ r.name }}</h2>
<a class="text-sm underline" href="mailto:{{ r.email }}">{{ r.email }}</a>
</div>
<div class="flex gap-2">
{% set st = r.status or 'open' %}
<span class="px-2 py-0.5 rounded text-[11px] border {{ 'border-emerald-400 text-emerald-200' if st=='completed' else 'border-sky-400 text-sky-200' }}">{{ st }}</span>
<span class="px-2 py-0.5 rounded text-[11px] border">{{ r.timeline or '-' }}</span>
</div>
</header>
<dl class="grid grid-cols-2 gap-2 text-sm">
<div><dt class="text-white/60">Need</dt><dd class="font-medium">{{ r.need or '-' }}</dd></div>
<div><dt class="text-white/60">Scope</dt><dd class="font-medium">{{ r.scope_size or '-' }}</dd></div>
<div><dt class="text-white/60">Extras</dt><dd class="font-medium">{{ r.extras or '-' }}</dd></div>
<div><dt class="text-white/60">Budget</dt><dd class="font-medium">{{ r.budget_feel or '-' }}</dd></div>
<div><dt class="text-white/60">Est. Hours</dt><dd class="font-medium">{{ r.est_hours }}</dd></div>
<div><dt class="text-white/60">Est. Cost</dt><dd class="font-medium">${{ '%.2f'|format(r.est_cost or 0) }}</dd></div>
</dl>
<div class="text-sm bg-black/30 rounded border border-white/10 p-3 max-h-28 overflow-auto">{{ r.description or '—' }}</div>
<div class="mt-auto flex items-center justify-between gap-2">
<form method="post" action="/admin/quotes/{{r.id}}/complete?show={{show}}"><button class="btn bg-emerald-600/70 text-xs">Complete</button></form>
<form method="post" action="/admin/quotes/{{r.id}}/delete?show={{show}}"><button class="btn bg-red-600/70 text-xs">Delete</button></form>
</div>
</article>
{% endfor %}
</div>
{% endblock %}