feat: add admin panel, stats API, and url support across frontend

- Add adminApi with full CRUD for users, companies, listings, oil-prices
- Add statsApi for fetching latest market price aggregates
- Add AdminTable component and /admin page for site management
- Add StatsPrice, UpdateUserRequest, UpdateOilPriceRequest types
- Add url field support in listing create/edit forms
- Update state SVG data for all 6 New England states
- Update county page to display richer listing info (phone, url, bio%)
- Misc layout and style updates across vendor and public routes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 11:34:31 -05:00
parent d60c816002
commit 7ac2c7c59e
26 changed files with 808 additions and 86 deletions

View File

@@ -77,8 +77,11 @@
<button type="button" class="btn btn-ghost normal-case text-lg">
{$user.username}
</button>
<ul class="dropdown-content menu p-2 shadow bg-base-100 rounded-box w-52 text-black">
<ul class="dropdown-content menu p-2 shadow bg-base-100 rounded-box w-52 text-black dark:text-gray-200">
<li><a href="/vendor">Dashboard</a></li>
{#if $user.username === 'Anekdotin'}
<li><a href="/admin">Admin Dashboard</a></li>
{/if}
<li><button type="button" on:click={logout}>Logout</button></li>
</ul>
</div>
@@ -94,7 +97,7 @@
<div>
<p>Copyright © {new Date().getFullYear()} - All right reserved</p>
{#if !$user}
<a href="/login" class="link link-primary">Dealer Login</a>
<a href="/login" class="link link-primary">Vendor Login</a>
{/if}
</div>
</footer>