Updates design system documentation with comprehensive component overview Enhances UI layout across multiple pages with consistent styling and new components Adds support for charts, pagination, and responsive design elements Improves overall system documentation and visual consistency
1133 lines
33 KiB
HTML
1133 lines
33 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="da">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Salg - Salon OS</title>
|
|
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
<script src="https://unpkg.com/@phosphor-icons/web@2.1.1"></script>
|
|
<style>
|
|
/* ==========================================
|
|
FONT FACE (Poppins)
|
|
========================================== */
|
|
@font-face {
|
|
font-family: 'Poppins';
|
|
src: url('fonts/Poppins-Regular.woff') format('woff');
|
|
font-weight: 400;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: 'Poppins';
|
|
src: url('fonts/Poppins-Medium.woff') format('woff');
|
|
font-weight: 500;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: 'Poppins';
|
|
src: url('fonts/Poppins-SemiBold.woff') format('woff');
|
|
font-weight: 600;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: 'Poppins';
|
|
src: url('fonts/Poppins-Bold.woff') format('woff');
|
|
font-weight: 700;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
|
|
/* ==========================================
|
|
CSS VARIABLES
|
|
========================================== */
|
|
:root {
|
|
--color-surface: #fff;
|
|
--color-background: #f5f5f5;
|
|
--color-background-hover: #f0f0f0;
|
|
--color-background-alt: #fafafa;
|
|
--color-border: #e0e0e0;
|
|
--color-text: #333;
|
|
--color-text-secondary: #666;
|
|
--color-teal: #00897b;
|
|
--color-blue: #1976d2;
|
|
--color-red: #e53935;
|
|
--color-amber: #f59e0b;
|
|
--color-purple: #8b5cf6;
|
|
--color-green: #43a047;
|
|
--font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
--font-mono: 'JetBrains Mono', monospace;
|
|
}
|
|
|
|
/* Dark mode */
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not(.light-mode) {
|
|
--color-surface: #1e1e1e;
|
|
--color-background: #121212;
|
|
--color-background-hover: #2a2a2a;
|
|
--color-background-alt: #1a1a1a;
|
|
--color-border: #333;
|
|
--color-text: #e0e0e0;
|
|
--color-text-secondary: #999;
|
|
--color-teal: #26a69a;
|
|
--color-blue: #42a5f5;
|
|
--color-red: #ef5350;
|
|
--color-amber: #ffb74d;
|
|
--color-purple: #a78bfa;
|
|
--color-green: #66bb6a;
|
|
}
|
|
}
|
|
|
|
:root.dark-mode {
|
|
--color-surface: #1e1e1e;
|
|
--color-background: #121212;
|
|
--color-background-hover: #2a2a2a;
|
|
--color-background-alt: #1a1a1a;
|
|
--color-border: #333;
|
|
--color-text: #e0e0e0;
|
|
--color-text-secondary: #999;
|
|
--color-teal: #26a69a;
|
|
--color-blue: #42a5f5;
|
|
--color-red: #ef5350;
|
|
--color-amber: #ffb74d;
|
|
--color-purple: #a78bfa;
|
|
--color-green: #66bb6a;
|
|
}
|
|
|
|
/* ==========================================
|
|
RESET & BASE
|
|
========================================== */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--font-family);
|
|
font-size: 14px;
|
|
color: var(--color-text);
|
|
background: var(--color-background);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* ==========================================
|
|
TOPBAR
|
|
========================================== */
|
|
swp-topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 24px;
|
|
background: var(--color-surface);
|
|
border-bottom: 1px solid var(--color-border);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
swp-topbar-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
swp-page-title {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
swp-topbar-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
/* ==========================================
|
|
LAYOUT
|
|
========================================== */
|
|
swp-page-container {
|
|
display: block;
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
padding: 24px;
|
|
}
|
|
|
|
/* ==========================================
|
|
BUTTONS
|
|
========================================== */
|
|
swp-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 18px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
font-family: var(--font-family);
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: all 150ms ease;
|
|
border: none;
|
|
}
|
|
|
|
swp-btn i {
|
|
font-size: 18px;
|
|
}
|
|
|
|
swp-btn.primary {
|
|
background: var(--color-teal);
|
|
color: white;
|
|
}
|
|
|
|
swp-btn.primary:hover {
|
|
background: #00796b;
|
|
}
|
|
|
|
swp-btn.secondary {
|
|
background: var(--color-surface);
|
|
border: 1px solid var(--color-border);
|
|
color: var(--color-text);
|
|
}
|
|
|
|
swp-btn.secondary:hover {
|
|
background: var(--color-background-hover);
|
|
}
|
|
|
|
/* ==========================================
|
|
STATS BAR
|
|
========================================== */
|
|
swp-stats-bar {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 16px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
swp-stat-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
padding: 16px 20px;
|
|
background: var(--color-surface);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--color-border);
|
|
}
|
|
|
|
swp-stat-card swp-stat-value {
|
|
font-size: 22px;
|
|
font-weight: 600;
|
|
font-family: var(--font-mono);
|
|
color: var(--color-text);
|
|
}
|
|
|
|
swp-stat-card swp-stat-label {
|
|
font-size: 12px;
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
swp-stat-card.highlight swp-stat-value {
|
|
color: var(--color-teal);
|
|
}
|
|
|
|
swp-stat-card.success swp-stat-value {
|
|
color: var(--color-green);
|
|
}
|
|
|
|
swp-stat-card.warning swp-stat-value {
|
|
color: var(--color-amber);
|
|
}
|
|
|
|
/* ==========================================
|
|
FILTER BAR
|
|
========================================== */
|
|
swp-filter-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
padding: 16px 20px;
|
|
background: var(--color-surface);
|
|
border-radius: 8px;
|
|
margin-bottom: 20px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
swp-search-input {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--color-border);
|
|
border-radius: 6px;
|
|
background: var(--color-surface);
|
|
flex: 1;
|
|
max-width: 350px;
|
|
}
|
|
|
|
swp-search-input i {
|
|
color: var(--color-text-secondary);
|
|
font-size: 18px;
|
|
}
|
|
|
|
swp-search-input input {
|
|
border: none;
|
|
outline: none;
|
|
font-size: 13px;
|
|
font-family: var(--font-family);
|
|
width: 100%;
|
|
background: transparent;
|
|
color: var(--color-text);
|
|
}
|
|
|
|
swp-filter-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
swp-filter-label {
|
|
font-size: 12px;
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
swp-filter-bar select,
|
|
swp-filter-bar input[type="date"] {
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--color-border);
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
font-family: var(--font-family);
|
|
background: var(--color-surface);
|
|
color: var(--color-text);
|
|
cursor: pointer;
|
|
}
|
|
|
|
swp-filter-bar input[type="date"] {
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
swp-filter-spacer {
|
|
flex: 1;
|
|
}
|
|
|
|
/* ==========================================
|
|
TABLE
|
|
========================================== */
|
|
swp-table {
|
|
display: block;
|
|
background: var(--color-surface);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
border: 1px solid var(--color-border);
|
|
}
|
|
|
|
swp-table-header,
|
|
swp-table-row {
|
|
display: grid;
|
|
grid-template-columns: 100px 140px minmax(120px, 1fr) 120px minmax(140px, 1.2fr) 100px 100px 100px 40px;
|
|
align-items: center;
|
|
}
|
|
|
|
swp-table-header {
|
|
background: var(--color-background-alt);
|
|
border-bottom: 1px solid var(--color-border);
|
|
padding: 12px 20px;
|
|
}
|
|
|
|
swp-th {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
swp-th.right {
|
|
text-align: right;
|
|
}
|
|
|
|
swp-th.center {
|
|
text-align: center;
|
|
}
|
|
|
|
swp-table-body {
|
|
display: block;
|
|
}
|
|
|
|
swp-table-row {
|
|
padding: 14px 20px;
|
|
border-bottom: 1px solid var(--color-border);
|
|
transition: background 150ms ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
swp-table-row:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
swp-table-row:hover {
|
|
background: var(--color-background-hover);
|
|
}
|
|
|
|
swp-td {
|
|
font-size: 14px;
|
|
color: var(--color-text);
|
|
}
|
|
|
|
swp-td.right {
|
|
text-align: right;
|
|
}
|
|
|
|
swp-td.center {
|
|
text-align: center;
|
|
}
|
|
|
|
swp-td.mono {
|
|
font-family: var(--font-mono);
|
|
font-size: 13px;
|
|
}
|
|
|
|
swp-td.muted {
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
/* Invoice cell */
|
|
swp-invoice-cell {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
swp-invoice-number {
|
|
font-family: var(--font-mono);
|
|
font-weight: 500;
|
|
font-size: 13px;
|
|
color: var(--color-teal);
|
|
}
|
|
|
|
/* DateTime cell */
|
|
swp-datetime-cell {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
swp-datetime-date {
|
|
font-size: 13px;
|
|
color: var(--color-text);
|
|
}
|
|
|
|
swp-datetime-time {
|
|
font-size: 12px;
|
|
color: var(--color-text-secondary);
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
/* Customer cell */
|
|
swp-customer-cell {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
swp-customer-name {
|
|
font-weight: 500;
|
|
color: var(--color-text);
|
|
}
|
|
|
|
swp-customer-phone {
|
|
font-size: 12px;
|
|
color: var(--color-text-secondary);
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
/* Services cell */
|
|
swp-services-cell {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
swp-services-main {
|
|
font-size: 13px;
|
|
color: var(--color-text);
|
|
}
|
|
|
|
swp-services-more {
|
|
font-size: 12px;
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
/* Amount cell */
|
|
swp-amount-cell {
|
|
font-family: var(--font-mono);
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
text-align: right;
|
|
}
|
|
|
|
/* Payment method badge */
|
|
swp-payment-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 4px 10px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
border-radius: 6px;
|
|
background: var(--color-background-alt);
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
swp-payment-badge i {
|
|
font-size: 14px;
|
|
}
|
|
|
|
swp-payment-badge.card {
|
|
background: color-mix(in srgb, var(--color-blue) 12%, transparent);
|
|
color: var(--color-blue);
|
|
}
|
|
|
|
swp-payment-badge.cash {
|
|
background: color-mix(in srgb, var(--color-green) 12%, transparent);
|
|
color: var(--color-green);
|
|
}
|
|
|
|
swp-payment-badge.mobilepay {
|
|
background: color-mix(in srgb, var(--color-blue) 12%, transparent);
|
|
color: var(--color-blue);
|
|
}
|
|
|
|
swp-payment-badge.invoice {
|
|
background: color-mix(in srgb, var(--color-amber) 12%, transparent);
|
|
color: var(--color-amber);
|
|
}
|
|
|
|
swp-payment-badge.giftcard {
|
|
background: color-mix(in srgb, var(--color-purple) 12%, transparent);
|
|
color: var(--color-purple);
|
|
}
|
|
|
|
/* Status badge */
|
|
swp-status-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 4px 10px;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
border-radius: 12px;
|
|
}
|
|
|
|
swp-status-badge.paid {
|
|
background: color-mix(in srgb, var(--color-green) 15%, transparent);
|
|
color: var(--color-green);
|
|
}
|
|
|
|
swp-status-badge.pending {
|
|
background: color-mix(in srgb, var(--color-amber) 15%, transparent);
|
|
color: var(--color-amber);
|
|
}
|
|
|
|
swp-status-badge.credited {
|
|
background: color-mix(in srgb, var(--color-purple) 15%, transparent);
|
|
color: var(--color-purple);
|
|
}
|
|
|
|
/* Row arrow */
|
|
swp-row-arrow {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
swp-row-arrow i {
|
|
font-size: 18px;
|
|
color: var(--color-text-secondary);
|
|
transition: transform 150ms ease, color 150ms ease;
|
|
}
|
|
|
|
swp-table-row:hover swp-row-arrow i {
|
|
transform: translateX(4px);
|
|
color: var(--color-teal);
|
|
}
|
|
|
|
/* Table footer */
|
|
swp-table-footer {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 14px 20px;
|
|
background: var(--color-background-alt);
|
|
border-top: 1px solid var(--color-border);
|
|
font-size: 13px;
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
swp-pagination {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
swp-page-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 150ms ease;
|
|
background: transparent;
|
|
color: var(--color-text-secondary);
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
swp-page-btn:hover {
|
|
background: var(--color-background-hover);
|
|
color: var(--color-text);
|
|
}
|
|
|
|
swp-page-btn.active {
|
|
background: var(--color-teal);
|
|
color: white;
|
|
border-color: var(--color-teal);
|
|
}
|
|
|
|
swp-page-btn i {
|
|
font-size: 16px;
|
|
}
|
|
|
|
/* ==========================================
|
|
CHARTS SECTION
|
|
========================================== */
|
|
swp-charts-grid {
|
|
display: grid;
|
|
grid-template-columns: 2fr 1fr;
|
|
gap: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
swp-chart-card {
|
|
display: block;
|
|
background: var(--color-surface);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--color-border);
|
|
overflow: hidden;
|
|
}
|
|
|
|
swp-chart-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 16px 20px;
|
|
border-bottom: 1px solid var(--color-border);
|
|
}
|
|
|
|
swp-chart-title {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--color-text);
|
|
}
|
|
|
|
swp-chart-hint {
|
|
font-size: 12px;
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
swp-chart-container {
|
|
display: block;
|
|
height: 240px;
|
|
position: relative;
|
|
}
|
|
|
|
/* ==========================================
|
|
RESPONSIVE
|
|
========================================== */
|
|
@media (max-width: 1200px) {
|
|
swp-stats-bar {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
swp-charts-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
swp-table-header,
|
|
swp-table-row {
|
|
grid-template-columns: 100px 130px 1fr 100px 100px 100px 40px;
|
|
}
|
|
|
|
swp-th:nth-child(4),
|
|
swp-td:nth-child(4),
|
|
swp-th:nth-child(5),
|
|
swp-td:nth-child(5) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
swp-table-header,
|
|
swp-table-row {
|
|
grid-template-columns: 100px 1fr 100px 100px 40px;
|
|
}
|
|
|
|
swp-th:nth-child(3),
|
|
swp-td:nth-child(3) {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- Topbar -->
|
|
<swp-topbar>
|
|
<swp-topbar-left>
|
|
<swp-page-title>Salg</swp-page-title>
|
|
</swp-topbar-left>
|
|
<swp-topbar-right>
|
|
<swp-btn class="secondary" id="exportBtn">
|
|
<i class="ph ph-export"></i>
|
|
Eksporter
|
|
</swp-btn>
|
|
</swp-topbar-right>
|
|
</swp-topbar>
|
|
|
|
<swp-page-container>
|
|
<!-- Stats Bar -->
|
|
<swp-stats-bar>
|
|
<swp-stat-card class="highlight">
|
|
<swp-stat-value>12.450 kr</swp-stat-value>
|
|
<swp-stat-label>Omsætning i dag</swp-stat-label>
|
|
</swp-stat-card>
|
|
<swp-stat-card class="success">
|
|
<swp-stat-value>187.230 kr</swp-stat-value>
|
|
<swp-stat-label>Omsætning denne måned</swp-stat-label>
|
|
</swp-stat-card>
|
|
<swp-stat-card>
|
|
<swp-stat-value>18</swp-stat-value>
|
|
<swp-stat-label>Antal salg i dag</swp-stat-label>
|
|
</swp-stat-card>
|
|
<swp-stat-card>
|
|
<swp-stat-value>692 kr</swp-stat-value>
|
|
<swp-stat-label>Gns. ordreværdi</swp-stat-label>
|
|
</swp-stat-card>
|
|
</swp-stats-bar>
|
|
|
|
<!-- Charts Section -->
|
|
<swp-charts-grid>
|
|
<swp-chart-card>
|
|
<swp-chart-header>
|
|
<swp-chart-title>Omsætning pr. måned</swp-chart-title>
|
|
<swp-chart-hint>Sidste 12 måneder</swp-chart-hint>
|
|
</swp-chart-header>
|
|
<swp-chart-container id="revenueChart"></swp-chart-container>
|
|
</swp-chart-card>
|
|
<swp-chart-card>
|
|
<swp-chart-header>
|
|
<swp-chart-title>Betalingsmetoder</swp-chart-title>
|
|
<swp-chart-hint>Fordeling</swp-chart-hint>
|
|
</swp-chart-header>
|
|
<swp-chart-container id="paymentChart"></swp-chart-container>
|
|
</swp-chart-card>
|
|
</swp-charts-grid>
|
|
|
|
<!-- Filter Bar -->
|
|
<swp-filter-bar>
|
|
<swp-search-input>
|
|
<i class="ph ph-magnifying-glass"></i>
|
|
<input type="search" id="searchInput" placeholder="Søg fakturanr, kunde, medarbejder..." />
|
|
</swp-search-input>
|
|
<swp-filter-group>
|
|
<swp-filter-label>Fra</swp-filter-label>
|
|
<input type="date" id="dateFrom" value="2025-01-01" />
|
|
</swp-filter-group>
|
|
<swp-filter-group>
|
|
<swp-filter-label>Til</swp-filter-label>
|
|
<input type="date" id="dateTo" value="2025-01-06" />
|
|
</swp-filter-group>
|
|
<swp-filter-group>
|
|
<swp-filter-label>Status</swp-filter-label>
|
|
<select id="statusFilter">
|
|
<option value="">Alle</option>
|
|
<option value="paid">Betalt</option>
|
|
<option value="pending">Afventer</option>
|
|
<option value="credited">Krediteret</option>
|
|
</select>
|
|
</swp-filter-group>
|
|
<swp-filter-group>
|
|
<swp-filter-label>Betaling</swp-filter-label>
|
|
<select id="paymentFilter">
|
|
<option value="">Alle</option>
|
|
<option value="card">Kort</option>
|
|
<option value="cash">Kontant</option>
|
|
<option value="mobilepay">MobilePay</option>
|
|
<option value="invoice">Faktura</option>
|
|
<option value="giftcard">Fordelskort</option>
|
|
</select>
|
|
</swp-filter-group>
|
|
</swp-filter-bar>
|
|
|
|
<!-- Table -->
|
|
<swp-table>
|
|
<swp-table-header>
|
|
<swp-th>Faktura</swp-th>
|
|
<swp-th>Dato/tid</swp-th>
|
|
<swp-th>Kunde</swp-th>
|
|
<swp-th>Medarbejder</swp-th>
|
|
<swp-th>Ydelser</swp-th>
|
|
<swp-th class="right">Beløb</swp-th>
|
|
<swp-th>Betaling</swp-th>
|
|
<swp-th>Status</swp-th>
|
|
<swp-th></swp-th>
|
|
</swp-table-header>
|
|
<swp-table-body>
|
|
<swp-table-row>
|
|
<swp-td>
|
|
<swp-invoice-cell>
|
|
<swp-invoice-number>#1847</swp-invoice-number>
|
|
</swp-invoice-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-datetime-cell>
|
|
<swp-datetime-date>6. jan 2025</swp-datetime-date>
|
|
<swp-datetime-time>14:32</swp-datetime-time>
|
|
</swp-datetime-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-customer-cell>
|
|
<swp-customer-name>Maria Hansen</swp-customer-name>
|
|
<swp-customer-phone>+45 23 45 67 89</swp-customer-phone>
|
|
</swp-customer-cell>
|
|
</swp-td>
|
|
<swp-td class="muted">Louise P.</swp-td>
|
|
<swp-td>
|
|
<swp-services-cell>
|
|
<swp-services-main>Dameklip, Farve</swp-services-main>
|
|
<swp-services-more>+ 1 produkt</swp-services-more>
|
|
</swp-services-cell>
|
|
</swp-td>
|
|
<swp-td><swp-amount-cell>1.450 kr</swp-amount-cell></swp-td>
|
|
<swp-td><swp-payment-badge class="card"><i class="ph ph-credit-card"></i> Kort</swp-payment-badge></swp-td>
|
|
<swp-td><swp-status-badge class="paid">Betalt</swp-status-badge></swp-td>
|
|
<swp-td><swp-row-arrow><i class="ph ph-caret-right"></i></swp-row-arrow></swp-td>
|
|
</swp-table-row>
|
|
|
|
<swp-table-row>
|
|
<swp-td>
|
|
<swp-invoice-cell>
|
|
<swp-invoice-number>#1846</swp-invoice-number>
|
|
</swp-invoice-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-datetime-cell>
|
|
<swp-datetime-date>6. jan 2025</swp-datetime-date>
|
|
<swp-datetime-time>13:15</swp-datetime-time>
|
|
</swp-datetime-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-customer-cell>
|
|
<swp-customer-name>Jonas Petersen</swp-customer-name>
|
|
<swp-customer-phone>+45 31 22 44 55</swp-customer-phone>
|
|
</swp-customer-cell>
|
|
</swp-td>
|
|
<swp-td class="muted">Karina K.</swp-td>
|
|
<swp-td>
|
|
<swp-services-cell>
|
|
<swp-services-main>Herreklip</swp-services-main>
|
|
</swp-services-cell>
|
|
</swp-td>
|
|
<swp-td><swp-amount-cell>350 kr</swp-amount-cell></swp-td>
|
|
<swp-td><swp-payment-badge class="mobilepay"><i class="ph ph-device-mobile"></i> MobilePay</swp-payment-badge></swp-td>
|
|
<swp-td><swp-status-badge class="paid">Betalt</swp-status-badge></swp-td>
|
|
<swp-td><swp-row-arrow><i class="ph ph-caret-right"></i></swp-row-arrow></swp-td>
|
|
</swp-table-row>
|
|
|
|
<swp-table-row>
|
|
<swp-td>
|
|
<swp-invoice-cell>
|
|
<swp-invoice-number>#1845</swp-invoice-number>
|
|
</swp-invoice-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-datetime-cell>
|
|
<swp-datetime-date>6. jan 2025</swp-datetime-date>
|
|
<swp-datetime-time>11:45</swp-datetime-time>
|
|
</swp-datetime-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-customer-cell>
|
|
<swp-customer-name>Sofie Larsen</swp-customer-name>
|
|
<swp-customer-phone>+45 42 33 55 66</swp-customer-phone>
|
|
</swp-customer-cell>
|
|
</swp-td>
|
|
<swp-td class="muted">Louise P.</swp-td>
|
|
<swp-td>
|
|
<swp-services-cell>
|
|
<swp-services-main>Balayage, Klip</swp-services-main>
|
|
<swp-services-more>+ 2 produkter</swp-services-more>
|
|
</swp-services-cell>
|
|
</swp-td>
|
|
<swp-td><swp-amount-cell>2.850 kr</swp-amount-cell></swp-td>
|
|
<swp-td><swp-payment-badge class="invoice"><i class="ph ph-file-text"></i> Faktura</swp-payment-badge></swp-td>
|
|
<swp-td><swp-status-badge class="pending">Afventer</swp-status-badge></swp-td>
|
|
<swp-td><swp-row-arrow><i class="ph ph-caret-right"></i></swp-row-arrow></swp-td>
|
|
</swp-table-row>
|
|
|
|
<swp-table-row>
|
|
<swp-td>
|
|
<swp-invoice-cell>
|
|
<swp-invoice-number>#1844</swp-invoice-number>
|
|
</swp-invoice-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-datetime-cell>
|
|
<swp-datetime-date>6. jan 2025</swp-datetime-date>
|
|
<swp-datetime-time>10:30</swp-datetime-time>
|
|
</swp-datetime-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-customer-cell>
|
|
<swp-customer-name>Anne Nielsen</swp-customer-name>
|
|
<swp-customer-phone>+45 51 62 73 84</swp-customer-phone>
|
|
</swp-customer-cell>
|
|
</swp-td>
|
|
<swp-td class="muted">Mette J.</swp-td>
|
|
<swp-td>
|
|
<swp-services-cell>
|
|
<swp-services-main>Dameklip, Vask</swp-services-main>
|
|
</swp-services-cell>
|
|
</swp-td>
|
|
<swp-td><swp-amount-cell>550 kr</swp-amount-cell></swp-td>
|
|
<swp-td><swp-payment-badge class="giftcard"><i class="ph ph-gift"></i> Fordelskort</swp-payment-badge></swp-td>
|
|
<swp-td><swp-status-badge class="paid">Betalt</swp-status-badge></swp-td>
|
|
<swp-td><swp-row-arrow><i class="ph ph-caret-right"></i></swp-row-arrow></swp-td>
|
|
</swp-table-row>
|
|
|
|
<swp-table-row>
|
|
<swp-td>
|
|
<swp-invoice-cell>
|
|
<swp-invoice-number>#1843</swp-invoice-number>
|
|
</swp-invoice-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-datetime-cell>
|
|
<swp-datetime-date>6. jan 2025</swp-datetime-date>
|
|
<swp-datetime-time>09:15</swp-datetime-time>
|
|
</swp-datetime-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-customer-cell>
|
|
<swp-customer-name>Peter Andersen</swp-customer-name>
|
|
<swp-customer-phone>+45 61 72 83 94</swp-customer-phone>
|
|
</swp-customer-cell>
|
|
</swp-td>
|
|
<swp-td class="muted">Karina K.</swp-td>
|
|
<swp-td>
|
|
<swp-services-cell>
|
|
<swp-services-main>Herreklip, Skægtrim</swp-services-main>
|
|
</swp-services-cell>
|
|
</swp-td>
|
|
<swp-td><swp-amount-cell>450 kr</swp-amount-cell></swp-td>
|
|
<swp-td><swp-payment-badge class="cash"><i class="ph ph-money"></i> Kontant</swp-payment-badge></swp-td>
|
|
<swp-td><swp-status-badge class="paid">Betalt</swp-status-badge></swp-td>
|
|
<swp-td><swp-row-arrow><i class="ph ph-caret-right"></i></swp-row-arrow></swp-td>
|
|
</swp-table-row>
|
|
|
|
<swp-table-row>
|
|
<swp-td>
|
|
<swp-invoice-cell>
|
|
<swp-invoice-number>#1842</swp-invoice-number>
|
|
</swp-invoice-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-datetime-cell>
|
|
<swp-datetime-date>5. jan 2025</swp-datetime-date>
|
|
<swp-datetime-time>16:45</swp-datetime-time>
|
|
</swp-datetime-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-customer-cell>
|
|
<swp-customer-name>Camilla Holm</swp-customer-name>
|
|
<swp-customer-phone>+45 71 82 93 04</swp-customer-phone>
|
|
</swp-customer-cell>
|
|
</swp-td>
|
|
<swp-td class="muted">Louise P.</swp-td>
|
|
<swp-td>
|
|
<swp-services-cell>
|
|
<swp-services-main>Extensions</swp-services-main>
|
|
<swp-services-more>+ 1 produkt</swp-services-more>
|
|
</swp-services-cell>
|
|
</swp-td>
|
|
<swp-td><swp-amount-cell>3.200 kr</swp-amount-cell></swp-td>
|
|
<swp-td><swp-payment-badge class="card"><i class="ph ph-credit-card"></i> Kort</swp-payment-badge></swp-td>
|
|
<swp-td><swp-status-badge class="paid">Betalt</swp-status-badge></swp-td>
|
|
<swp-td><swp-row-arrow><i class="ph ph-caret-right"></i></swp-row-arrow></swp-td>
|
|
</swp-table-row>
|
|
|
|
<swp-table-row>
|
|
<swp-td>
|
|
<swp-invoice-cell>
|
|
<swp-invoice-number>#1841</swp-invoice-number>
|
|
</swp-invoice-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-datetime-cell>
|
|
<swp-datetime-date>5. jan 2025</swp-datetime-date>
|
|
<swp-datetime-time>15:00</swp-datetime-time>
|
|
</swp-datetime-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-customer-cell>
|
|
<swp-customer-name>Mikkel Jensen</swp-customer-name>
|
|
<swp-customer-phone>+45 81 92 03 14</swp-customer-phone>
|
|
</swp-customer-cell>
|
|
</swp-td>
|
|
<swp-td class="muted">Mette J.</swp-td>
|
|
<swp-td>
|
|
<swp-services-cell>
|
|
<swp-services-main>Dameklip</swp-services-main>
|
|
</swp-services-cell>
|
|
</swp-td>
|
|
<swp-td><swp-amount-cell>-450 kr</swp-amount-cell></swp-td>
|
|
<swp-td><swp-payment-badge class="card"><i class="ph ph-credit-card"></i> Kort</swp-payment-badge></swp-td>
|
|
<swp-td><swp-status-badge class="credited">Krediteret</swp-status-badge></swp-td>
|
|
<swp-td><swp-row-arrow><i class="ph ph-caret-right"></i></swp-row-arrow></swp-td>
|
|
</swp-table-row>
|
|
|
|
<swp-table-row>
|
|
<swp-td>
|
|
<swp-invoice-cell>
|
|
<swp-invoice-number>#1840</swp-invoice-number>
|
|
</swp-invoice-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-datetime-cell>
|
|
<swp-datetime-date>5. jan 2025</swp-datetime-date>
|
|
<swp-datetime-time>13:30</swp-datetime-time>
|
|
</swp-datetime-cell>
|
|
</swp-td>
|
|
<swp-td>
|
|
<swp-customer-cell>
|
|
<swp-customer-name>Louise Eriksen</swp-customer-name>
|
|
<swp-customer-phone>+45 91 02 13 24</swp-customer-phone>
|
|
</swp-customer-cell>
|
|
</swp-td>
|
|
<swp-td class="muted">Karina K.</swp-td>
|
|
<swp-td>
|
|
<swp-services-cell>
|
|
<swp-services-main>Highlights, Klip, Kur</swp-services-main>
|
|
</swp-services-cell>
|
|
</swp-td>
|
|
<swp-td><swp-amount-cell>1.950 kr</swp-amount-cell></swp-td>
|
|
<swp-td><swp-payment-badge class="card"><i class="ph ph-credit-card"></i> Kort</swp-payment-badge></swp-td>
|
|
<swp-td><swp-status-badge class="paid">Betalt</swp-status-badge></swp-td>
|
|
<swp-td><swp-row-arrow><i class="ph ph-caret-right"></i></swp-row-arrow></swp-td>
|
|
</swp-table-row>
|
|
</swp-table-body>
|
|
<swp-table-footer>
|
|
<span>Viser 1-8 af 1.847 fakturaer</span>
|
|
<swp-pagination>
|
|
<swp-page-btn><i class="ph ph-caret-left"></i></swp-page-btn>
|
|
<swp-page-btn class="active">1</swp-page-btn>
|
|
<swp-page-btn>2</swp-page-btn>
|
|
<swp-page-btn>3</swp-page-btn>
|
|
<swp-page-btn>...</swp-page-btn>
|
|
<swp-page-btn>231</swp-page-btn>
|
|
<swp-page-btn><i class="ph ph-caret-right"></i></swp-page-btn>
|
|
</swp-pagination>
|
|
</swp-table-footer>
|
|
</swp-table>
|
|
</swp-page-container>
|
|
|
|
<script type="module">
|
|
import { createChart } from 'https://unpkg.com/@sevenweirdpeople/swp-charting@latest/dist/index.js';
|
|
|
|
// Omsætning pr. måned (bar chart) - sidste 12 måneder
|
|
createChart(document.getElementById('revenueChart'), {
|
|
height: 240,
|
|
xAxis: {
|
|
categories: ['Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec', 'Jan']
|
|
},
|
|
series: [
|
|
{
|
|
name: 'Omsætning',
|
|
color: '#00897b',
|
|
type: 'bar',
|
|
unit: ' kr',
|
|
data: [
|
|
{ x: 'Feb', y: 142500 },
|
|
{ x: 'Mar', y: 168200 },
|
|
{ x: 'Apr', y: 155800 },
|
|
{ x: 'Maj', y: 178400 },
|
|
{ x: 'Jun', y: 145600 },
|
|
{ x: 'Jul', y: 98200 },
|
|
{ x: 'Aug', y: 134500 },
|
|
{ x: 'Sep', y: 189300 },
|
|
{ x: 'Okt', y: 201400 },
|
|
{ x: 'Nov', y: 178900 },
|
|
{ x: 'Dec', y: 245600 },
|
|
{ x: 'Jan', y: 187230 },
|
|
]
|
|
}
|
|
]
|
|
});
|
|
|
|
// Mappe måned-navne til måned-numre (baseret på 2024/2025)
|
|
const monthMap = {
|
|
'Feb': { year: 2024, month: 2 },
|
|
'Mar': { year: 2024, month: 3 },
|
|
'Apr': { year: 2024, month: 4 },
|
|
'Maj': { year: 2024, month: 5 },
|
|
'Jun': { year: 2024, month: 6 },
|
|
'Jul': { year: 2024, month: 7 },
|
|
'Aug': { year: 2024, month: 8 },
|
|
'Sep': { year: 2024, month: 9 },
|
|
'Okt': { year: 2024, month: 10 },
|
|
'Nov': { year: 2024, month: 11 },
|
|
'Dec': { year: 2024, month: 12 },
|
|
'Jan': { year: 2025, month: 1 },
|
|
};
|
|
|
|
function setDateFilter(startMonth, endMonth) {
|
|
if (startMonth && endMonth) {
|
|
const lastDay = new Date(endMonth.year, endMonth.month, 0).getDate();
|
|
const fromDate = `${startMonth.year}-${String(startMonth.month).padStart(2, '0')}-01`;
|
|
const toDate = `${endMonth.year}-${String(endMonth.month).padStart(2, '0')}-${lastDay}`;
|
|
document.getElementById('dateFrom').value = fromDate;
|
|
document.getElementById('dateTo').value = toDate;
|
|
}
|
|
}
|
|
|
|
// Enkelt-klik på bar chart -> filtrer fakturaer efter én måned
|
|
document.addEventListener('swp-chart-click', (e) => {
|
|
const { type, x } = e.detail;
|
|
if (type !== 'bar' || !x) return;
|
|
setDateFilter(monthMap[x], monthMap[x]);
|
|
});
|
|
|
|
// Range-select på bar chart -> filtrer fakturaer efter flere måneder
|
|
document.addEventListener('swp-chart-select', (e) => {
|
|
const { type, bounds } = e.detail;
|
|
if (type !== 'bar' || !bounds) return;
|
|
setDateFilter(monthMap[bounds.x1], monthMap[bounds.x2]);
|
|
});
|
|
|
|
// Betalingsmetoder (pie chart)
|
|
createChart(document.getElementById('paymentChart'), {
|
|
height: 240,
|
|
series: [
|
|
{ name: 'Kort', color: '#1976d2', type: 'pie', data: [{ x: '', y: 892400 }], unit: ' kr', pie: { innerRadius: 40, outerRadius: 90 } },
|
|
{ name: 'MobilePay', color: '#5C6BC0', type: 'pie', data: [{ x: '', y: 445200 }], unit: ' kr', pie: { innerRadius: 40, outerRadius: 90 } },
|
|
{ name: 'Kontant', color: '#43a047', type: 'pie', data: [{ x: '', y: 234800 }], unit: ' kr', pie: { innerRadius: 40, outerRadius: 90 } },
|
|
{ name: 'Faktura', color: '#f59e0b', type: 'pie', data: [{ x: '', y: 178500 }], unit: ' kr', pie: { innerRadius: 40, outerRadius: 90 } },
|
|
{ name: 'Fordelskort', color: '#8b5cf6', type: 'pie', data: [{ x: '', y: 74700 }], unit: ' kr', pie: { innerRadius: 40, outerRadius: 90 } }
|
|
],
|
|
tooltip: true,
|
|
legend: { position: 'right', align: 'center' }
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|