Adds comprehensive customer detail page with dynamic features
Develops detailed customer profile view with multiple sections including overview, statistics, journal, appointments, and activity tracking Implements interactive UI components for customer management Includes dynamic tab switching, editable profile sections, and activity timeline
This commit is contained in:
parent
0a431c8db4
commit
6b0a84a07e
6 changed files with 2015 additions and 8 deletions
|
|
@ -255,15 +255,21 @@
|
|||
</swp-page-container>
|
||||
|
||||
<!-- Customer Drawer -->
|
||||
<div id="customer-drawer" data-drawer="xxl">
|
||||
<div id="customer-drawer" data-drawer="xxl" data-customer-id="">
|
||||
<swp-drawer-header>
|
||||
<swp-drawer-title>
|
||||
<i class="ph ph-user"></i>
|
||||
<span localize="customers.drawer.title">Kundekort</span>
|
||||
</swp-drawer-title>
|
||||
<swp-drawer-close data-drawer-close>
|
||||
<i class="ph ph-x"></i>
|
||||
</swp-drawer-close>
|
||||
<swp-drawer-actions>
|
||||
<a href="#" id="openFullDetailLink" class="drawer-detail-link">
|
||||
<i class="ph ph-arrow-square-out"></i>
|
||||
<span>Åbn fuld side</span>
|
||||
</a>
|
||||
<swp-drawer-close data-drawer-close>
|
||||
<i class="ph ph-x"></i>
|
||||
</swp-drawer-close>
|
||||
</swp-drawer-actions>
|
||||
</swp-drawer-header>
|
||||
|
||||
<swp-drawer-body>
|
||||
|
|
@ -410,3 +416,23 @@
|
|||
</swp-notes-section>
|
||||
</swp-drawer-body>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
<script>
|
||||
// Update detail link when drawer opens
|
||||
document.querySelectorAll('[data-drawer-trigger="customer-drawer"]').forEach(row => {
|
||||
row.addEventListener('click', () => {
|
||||
const drawer = document.getElementById('customer-drawer');
|
||||
const detailLink = document.getElementById('openFullDetailLink');
|
||||
|
||||
// Generate a customer ID from the row data (in real app, use actual ID)
|
||||
const customerName = row.dataset.name || 'unknown';
|
||||
const customerId = customerName.toLowerCase().replace(/\s+/g, '-');
|
||||
|
||||
// Update drawer data attribute and link href
|
||||
drawer.dataset.customerId = customerId;
|
||||
detailLink.href = `/kunder/${customerId}`;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue