refactor: standardize admin templates with shared macros

Migrate all admin templates to use standardized components:
- Use tabs macros (tabs_nav, tab_button) for tab navigation
- Use number_stepper for quantity/numeric inputs
- Use headers macros for consistent page layouts
- Use modals macros for dialog components

Affected pages: dashboard, settings, logs, content-pages, companies,
vendors, users, imports, marketplace, code-quality, and more.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-07 17:04:43 +01:00
parent 2ec150e8a5
commit bb2e5fd260
31 changed files with 261 additions and 1290 deletions

View File

@@ -1,44 +1,22 @@
{# app/templates/admin/company-detail.html #}
{% extends "admin/base.html" %}
{% from 'shared/macros/alerts.html' import loading_state, error_state %}
{% from 'shared/macros/headers.html' import detail_page_header %}
{% block title %}Company Details{% endblock %}
{% block alpine_data %}adminCompanyDetail(){% endblock %}
{% block content %}
<!-- Page Header -->
<div class="flex items-center justify-between my-6">
<div>
<h2 class="text-2xl font-semibold text-gray-700 dark:text-gray-200" x-text="company?.name || 'Company Details'">
Company Details
</h2>
<p class="text-sm text-gray-600 dark:text-gray-400 mt-1" x-show="company">
ID: <span x-text="companyId"></span>
<span class="text-gray-400 mx-2">|</span>
<span x-text="company?.vendor_count || 0"></span> vendor(s)
</p>
</div>
<a href="/admin/companies"
class="flex items-center px-4 py-2 text-sm font-medium leading-5 text-gray-700 transition-colors duration-150 bg-white border border-gray-300 rounded-lg dark:text-gray-400 dark:border-gray-600 dark:bg-gray-800 hover:border-gray-400 focus:outline-none">
<span x-html="$icon('arrow-left', 'w-4 h-4 mr-2')"></span>
Back
</a>
</div>
{% call detail_page_header("company?.name || 'Company Details'", '/admin/companies', subtitle_show='company') %}
ID: <span x-text="companyId"></span>
<span class="text-gray-400 mx-2">|</span>
<span x-text="company?.vendor_count || 0"></span> vendor(s)
{% endcall %}
<!-- Loading State -->
<div x-show="loading" class="text-center py-12">
<span x-html="$icon('spinner', 'inline w-8 h-8 text-purple-600')"></span>
<p class="mt-2 text-gray-600 dark:text-gray-400">Loading company details...</p>
</div>
{{ loading_state('Loading company details...') }}
<!-- Error State -->
<div x-show="error && !loading" class="mb-6 p-4 bg-red-100 border border-red-400 text-red-700 rounded-lg flex items-start">
<span x-html="$icon('exclamation', 'w-5 h-5 mr-3 mt-0.5 flex-shrink-0')"></span>
<div>
<p class="font-semibold">Error loading company</p>
<p class="text-sm" x-text="error"></p>
</div>
</div>
{{ error_state('Error loading company') }}
<!-- Company Details -->
<div x-show="!loading && company">