feat: rework admin portal with pricing breakdown and document management

- Added pricing snapshot columns to the leads table: daily_subtotal, weekend_subtotal, subtotal_eur, vat_eur, total_eur, deposit_eur, total_days, weekday_count, weekend_day_count.
- Updated create_lead RPC to accept and store new pricing parameters.
- Enhanced frontend app.js to compute and send pricing details during lead creation.
- Introduced new UI elements in admin.html for displaying pricing and documents in a tabbed dialog.
- Updated i18n.js with new translation keys for pricing and document management.
- Improved styles in styles.css for new dialog components and pricing cards.
- Added migration script 06-admin-pricing-documents.sql for database schema changes.
This commit is contained in:
LagoESP
2026-04-29 17:27:37 +02:00
parent bc61ffa206
commit 30e296f61b
9 changed files with 1187 additions and 40 deletions
+16 -1
View File
@@ -94,6 +94,7 @@
<th data-i18n="adminNameEmail">Name / E-Mail</th>
<th data-i18n="adminVehicleTab">Fahrzeug</th>
<th data-i18n="adminPeriod">Zeitraum</th>
<th data-i18n="adminTotalPrice">Gesamtbetrag</th>
<th data-i18n="adminStatus">Status</th>
<th></th>
</tr>
@@ -116,6 +117,7 @@
<th data-i18n="adminNameEmail">Name / E-Mail</th>
<th data-i18n="adminPhone">Telefon</th>
<th data-i18n="adminSourceLead">Quelle (Lead)</th>
<th data-i18n="adminLifetimeValueCol">Gesamtwert</th>
<th data-i18n="adminStatus">Status</th>
<th></th>
</tr>
@@ -213,13 +215,26 @@
</div>
</section>
<!-- Lead detail / qualify dialog -->
<!-- Lead detail / qualify dialog (tabbed) -->
<dialog id="leadDialog">
<div class="dialog-head">
<h3 id="leadDialogTitle" style="margin:0;">Lead</h3>
<button class="dialog-close" id="leadDialogClose" aria-label="Close">×</button>
</div>
<div class="dialog-tabs" id="leadDialogTabs" role="tablist"></div>
<div class="dialog-body" id="leadDialogBody"></div>
<div class="dialog-footer" id="leadDialogFooter"></div>
</dialog>
<!-- Customer detail dialog (tabbed) -->
<dialog id="customerDialog">
<div class="dialog-head">
<h3 id="customerDialogTitle" style="margin:0;">Kunde</h3>
<button class="dialog-close" id="customerDialogClose" aria-label="Close">×</button>
</div>
<div class="dialog-tabs" id="customerDialogTabs" role="tablist"></div>
<div class="dialog-body" id="customerDialogBody"></div>
<div class="dialog-footer" id="customerDialogFooter"></div>
</dialog>
<script type="module" src="admin.js"></script>