Moving away from Azure Devops #1
2 changed files with 1977 additions and 0 deletions
1251
wwwroot/poc-produkt.html
Normal file
1251
wwwroot/poc-produkt.html
Normal file
File diff suppressed because it is too large
Load diff
726
wwwroot/poc-produkter.html
Normal file
726
wwwroot/poc-produkter.html
Normal file
|
|
@ -0,0 +1,726 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="da">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Produkter - Backend</title>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||||
|
<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 (Design System)
|
||||||
|
========================================== */
|
||||||
|
: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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--color-teal);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
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 svg {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
fill: currentColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
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-filter-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-filter-label {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-filter-bar input,
|
||||||
|
swp-filter-bar select {
|
||||||
|
padding: 8px 12px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: var(--font-family);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: 6px;
|
||||||
|
background: var(--color-surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-filter-bar input:focus,
|
||||||
|
swp-filter-bar select:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--color-teal);
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-search-input img {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-search-input input {
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: var(--font-family);
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-filter-spacer {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
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.warning swp-stat-value {
|
||||||
|
color: var(--color-amber);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
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: minmax(200px, 1fr) 100px 100px 100px 80px 90px 80px 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-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.mono {
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-td.muted {
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
PRODUCT NAME CELL
|
||||||
|
========================================== */
|
||||||
|
swp-product-cell {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-product-name {
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--color-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-product-brand {
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
STOCK INDICATOR
|
||||||
|
========================================== */
|
||||||
|
swp-stock-indicator {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-stock-indicator::before {
|
||||||
|
content: '';
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--color-green);
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-stock-indicator.warning::before {
|
||||||
|
background: var(--color-amber);
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-stock-indicator.critical::before {
|
||||||
|
background: var(--color-red);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
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.active {
|
||||||
|
background: color-mix(in srgb, var(--color-green) 15%, white);
|
||||||
|
color: var(--color-green);
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-status-badge.inactive {
|
||||||
|
background: color-mix(in srgb, var(--color-text-secondary) 15%, white);
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
ROW ARROW
|
||||||
|
========================================== */
|
||||||
|
swp-row-arrow {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-row-arrow svg {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
fill: var(--color-text-secondary);
|
||||||
|
transition: transform 150ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-table-row:hover swp-row-arrow svg {
|
||||||
|
transform: translateX(4px);
|
||||||
|
fill: 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================
|
||||||
|
RESPONSIVE
|
||||||
|
========================================== */
|
||||||
|
@media (max-width: 1200px) {
|
||||||
|
swp-stats-bar {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
swp-table-header,
|
||||||
|
swp-table-row {
|
||||||
|
grid-template-columns: 1fr 80px 80px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
swp-th:nth-child(2),
|
||||||
|
swp-td:nth-child(2),
|
||||||
|
swp-th:nth-child(3),
|
||||||
|
swp-td:nth-child(3),
|
||||||
|
swp-th:nth-child(4),
|
||||||
|
swp-td:nth-child(4) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Topbar -->
|
||||||
|
<swp-topbar>
|
||||||
|
<swp-topbar-left>
|
||||||
|
<swp-page-title>Produkter</swp-page-title>
|
||||||
|
</swp-topbar-left>
|
||||||
|
<swp-topbar-right>
|
||||||
|
<swp-btn class="secondary">
|
||||||
|
<svg viewBox="0 0 24 24"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"/></svg>
|
||||||
|
Importer
|
||||||
|
</swp-btn>
|
||||||
|
<swp-btn class="primary">
|
||||||
|
<svg viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
||||||
|
Nyt produkt
|
||||||
|
</swp-btn>
|
||||||
|
</swp-topbar-right>
|
||||||
|
</swp-topbar>
|
||||||
|
|
||||||
|
<swp-page-container>
|
||||||
|
<!-- Filter Bar -->
|
||||||
|
<swp-filter-bar>
|
||||||
|
<swp-search-input>
|
||||||
|
<img src="icons/search.svg" alt="Søg" />
|
||||||
|
<input type="search" id="searchInput" placeholder="Søg produkt, varenr, brand..." />
|
||||||
|
</swp-search-input>
|
||||||
|
<swp-filter-spacer></swp-filter-spacer>
|
||||||
|
</swp-filter-bar>
|
||||||
|
|
||||||
|
<!-- Stats Bar -->
|
||||||
|
<swp-stats-bar>
|
||||||
|
<swp-stat-card class="highlight">
|
||||||
|
<swp-stat-value>47</swp-stat-value>
|
||||||
|
<swp-stat-label>Produkter i alt</swp-stat-label>
|
||||||
|
</swp-stat-card>
|
||||||
|
<swp-stat-card>
|
||||||
|
<swp-stat-value>142.850 kr</swp-stat-value>
|
||||||
|
<swp-stat-label>Samlet lagerværdi</swp-stat-label>
|
||||||
|
</swp-stat-card>
|
||||||
|
<swp-stat-card class="warning">
|
||||||
|
<swp-stat-value>5</swp-stat-value>
|
||||||
|
<swp-stat-label>Lavt lager</swp-stat-label>
|
||||||
|
</swp-stat-card>
|
||||||
|
<swp-stat-card>
|
||||||
|
<swp-stat-value>12.450 kr</swp-stat-value>
|
||||||
|
<swp-stat-label>Salg denne måned</swp-stat-label>
|
||||||
|
</swp-stat-card>
|
||||||
|
</swp-stats-bar>
|
||||||
|
|
||||||
|
<!-- Table -->
|
||||||
|
<swp-table>
|
||||||
|
<swp-table-header>
|
||||||
|
<swp-th>Produkt</swp-th>
|
||||||
|
<swp-th>Varenr</swp-th>
|
||||||
|
<swp-th>Kategori</swp-th>
|
||||||
|
<swp-th>Brand</swp-th>
|
||||||
|
<swp-th class="right">Lager</swp-th>
|
||||||
|
<swp-th class="right">Pris</swp-th>
|
||||||
|
<swp-th>Status</swp-th>
|
||||||
|
<swp-th></swp-th>
|
||||||
|
</swp-table-header>
|
||||||
|
<swp-table-body>
|
||||||
|
<swp-table-row data-id="1" onclick="location.href='poc-produkt.html'">
|
||||||
|
<swp-td>
|
||||||
|
<swp-product-cell>
|
||||||
|
<swp-product-name>Acidic Bonding Concentrate Serum 100ml</swp-product-name>
|
||||||
|
<swp-product-brand>Redken</swp-product-brand>
|
||||||
|
</swp-product-cell>
|
||||||
|
</swp-td>
|
||||||
|
<swp-td class="mono muted">RDK-ABC-100</swp-td>
|
||||||
|
<swp-td>Hårpleje</swp-td>
|
||||||
|
<swp-td>Redken</swp-td>
|
||||||
|
<swp-td class="right"><swp-stock-indicator>10</swp-stock-indicator></swp-td>
|
||||||
|
<swp-td class="right mono">379 kr</swp-td>
|
||||||
|
<swp-td><swp-status-badge class="active">Aktiv</swp-status-badge></swp-td>
|
||||||
|
<swp-td><swp-row-arrow><svg viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg></swp-row-arrow></swp-td>
|
||||||
|
</swp-table-row>
|
||||||
|
|
||||||
|
<swp-table-row data-id="2">
|
||||||
|
<swp-td>
|
||||||
|
<swp-product-cell>
|
||||||
|
<swp-product-name>No. 3 Hair Perfector 100ml</swp-product-name>
|
||||||
|
<swp-product-brand>Olaplex</swp-product-brand>
|
||||||
|
</swp-product-cell>
|
||||||
|
</swp-td>
|
||||||
|
<swp-td class="mono muted">OLP-003</swp-td>
|
||||||
|
<swp-td>Hårpleje</swp-td>
|
||||||
|
<swp-td>Olaplex</swp-td>
|
||||||
|
<swp-td class="right"><swp-stock-indicator class="warning">3</swp-stock-indicator></swp-td>
|
||||||
|
<swp-td class="right mono">349 kr</swp-td>
|
||||||
|
<swp-td><swp-status-badge class="active">Aktiv</swp-status-badge></swp-td>
|
||||||
|
<swp-td><swp-row-arrow><svg viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg></swp-row-arrow></swp-td>
|
||||||
|
</swp-table-row>
|
||||||
|
|
||||||
|
<swp-table-row data-id="3">
|
||||||
|
<swp-td>
|
||||||
|
<swp-product-cell>
|
||||||
|
<swp-product-name>Elixir Ultime L'Huile Originale 100ml</swp-product-name>
|
||||||
|
<swp-product-brand>Kérastase</swp-product-brand>
|
||||||
|
</swp-product-cell>
|
||||||
|
</swp-td>
|
||||||
|
<swp-td class="mono muted">KER-ELX-100</swp-td>
|
||||||
|
<swp-td>Hårpleje</swp-td>
|
||||||
|
<swp-td>Kérastase</swp-td>
|
||||||
|
<swp-td class="right"><swp-stock-indicator>8</swp-stock-indicator></swp-td>
|
||||||
|
<swp-td class="right mono">459 kr</swp-td>
|
||||||
|
<swp-td><swp-status-badge class="active">Aktiv</swp-status-badge></swp-td>
|
||||||
|
<swp-td><swp-row-arrow><svg viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg></swp-row-arrow></swp-td>
|
||||||
|
</swp-table-row>
|
||||||
|
|
||||||
|
<swp-table-row data-id="4">
|
||||||
|
<swp-td>
|
||||||
|
<swp-product-cell>
|
||||||
|
<swp-product-name>EIMI Ocean Spritz 150ml</swp-product-name>
|
||||||
|
<swp-product-brand>Wella</swp-product-brand>
|
||||||
|
</swp-product-cell>
|
||||||
|
</swp-td>
|
||||||
|
<swp-td class="mono muted">WEL-OCN-150</swp-td>
|
||||||
|
<swp-td>Styling</swp-td>
|
||||||
|
<swp-td>Wella</swp-td>
|
||||||
|
<swp-td class="right"><swp-stock-indicator>15</swp-stock-indicator></swp-td>
|
||||||
|
<swp-td class="right mono">169 kr</swp-td>
|
||||||
|
<swp-td><swp-status-badge class="active">Aktiv</swp-status-badge></swp-td>
|
||||||
|
<swp-td><swp-row-arrow><svg viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg></swp-row-arrow></swp-td>
|
||||||
|
</swp-table-row>
|
||||||
|
|
||||||
|
<swp-table-row data-id="5">
|
||||||
|
<swp-td>
|
||||||
|
<swp-product-cell>
|
||||||
|
<swp-product-name>No. 4 Bond Maintenance Shampoo 250ml</swp-product-name>
|
||||||
|
<swp-product-brand>Olaplex</swp-product-brand>
|
||||||
|
</swp-product-cell>
|
||||||
|
</swp-td>
|
||||||
|
<swp-td class="mono muted">OLP-004-250</swp-td>
|
||||||
|
<swp-td>Hårpleje</swp-td>
|
||||||
|
<swp-td>Olaplex</swp-td>
|
||||||
|
<swp-td class="right"><swp-stock-indicator class="critical">0</swp-stock-indicator></swp-td>
|
||||||
|
<swp-td class="right mono">299 kr</swp-td>
|
||||||
|
<swp-td><swp-status-badge class="active">Aktiv</swp-status-badge></swp-td>
|
||||||
|
<swp-td><swp-row-arrow><svg viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg></swp-row-arrow></swp-td>
|
||||||
|
</swp-table-row>
|
||||||
|
|
||||||
|
<swp-table-row data-id="6">
|
||||||
|
<swp-td>
|
||||||
|
<swp-product-cell>
|
||||||
|
<swp-product-name>IGORA Royal 6-0 60ml</swp-product-name>
|
||||||
|
<swp-product-brand>Schwarzkopf</swp-product-brand>
|
||||||
|
</swp-product-cell>
|
||||||
|
</swp-td>
|
||||||
|
<swp-td class="mono muted">SCH-IGR-60</swp-td>
|
||||||
|
<swp-td>Farve</swp-td>
|
||||||
|
<swp-td>Schwarzkopf</swp-td>
|
||||||
|
<swp-td class="right"><swp-stock-indicator>24</swp-stock-indicator></swp-td>
|
||||||
|
<swp-td class="right mono">89 kr</swp-td>
|
||||||
|
<swp-td><swp-status-badge class="active">Aktiv</swp-status-badge></swp-td>
|
||||||
|
<swp-td><swp-row-arrow><svg viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg></swp-row-arrow></swp-td>
|
||||||
|
</swp-table-row>
|
||||||
|
|
||||||
|
<swp-table-row data-id="7">
|
||||||
|
<swp-td>
|
||||||
|
<swp-product-cell>
|
||||||
|
<swp-product-name>All Soft Shampoo 300ml</swp-product-name>
|
||||||
|
<swp-product-brand>Redken</swp-product-brand>
|
||||||
|
</swp-product-cell>
|
||||||
|
</swp-td>
|
||||||
|
<swp-td class="mono muted">RDK-ALS-300</swp-td>
|
||||||
|
<swp-td>Hårpleje</swp-td>
|
||||||
|
<swp-td>Redken</swp-td>
|
||||||
|
<swp-td class="right"><swp-stock-indicator class="warning">4</swp-stock-indicator></swp-td>
|
||||||
|
<swp-td class="right mono">249 kr</swp-td>
|
||||||
|
<swp-td><swp-status-badge class="active">Aktiv</swp-status-badge></swp-td>
|
||||||
|
<swp-td><swp-row-arrow><svg viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg></swp-row-arrow></swp-td>
|
||||||
|
</swp-table-row>
|
||||||
|
|
||||||
|
<swp-table-row data-id="8">
|
||||||
|
<swp-td>
|
||||||
|
<swp-product-cell>
|
||||||
|
<swp-product-name>Paddle Brush Large</swp-product-name>
|
||||||
|
<swp-product-brand>Denman</swp-product-brand>
|
||||||
|
</swp-product-cell>
|
||||||
|
</swp-td>
|
||||||
|
<swp-td class="mono muted">DNM-PBL-01</swp-td>
|
||||||
|
<swp-td>Tilbehør</swp-td>
|
||||||
|
<swp-td>Denman</swp-td>
|
||||||
|
<swp-td class="right"><swp-stock-indicator>7</swp-stock-indicator></swp-td>
|
||||||
|
<swp-td class="right mono">189 kr</swp-td>
|
||||||
|
<swp-td><swp-status-badge class="inactive">Inaktiv</swp-status-badge></swp-td>
|
||||||
|
<swp-td><swp-row-arrow><svg viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg></swp-row-arrow></swp-td>
|
||||||
|
</swp-table-row>
|
||||||
|
|
||||||
|
</swp-table-body>
|
||||||
|
<swp-table-footer>
|
||||||
|
<span>Viser 8 af 47 produkter</span>
|
||||||
|
<span>Side 1 af 6</span>
|
||||||
|
</swp-table-footer>
|
||||||
|
</swp-table>
|
||||||
|
</swp-page-container>
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/fuse.js@7.0.0"></script>
|
||||||
|
<script>
|
||||||
|
// Product data for search
|
||||||
|
const products = [
|
||||||
|
{ id: 1, name: 'Acidic Bonding Concentrate Serum 100ml', brand: 'Redken', sku: 'RDK-ABC-100', category: 'Hårpleje' },
|
||||||
|
{ id: 2, name: 'No. 3 Hair Perfector 100ml', brand: 'Olaplex', sku: 'OLP-003', category: 'Hårpleje' },
|
||||||
|
{ id: 3, name: 'Elixir Ultime L\'Huile Originale 100ml', brand: 'Kérastase', sku: 'KER-ELX-100', category: 'Hårpleje' },
|
||||||
|
{ id: 4, name: 'EIMI Ocean Spritz 150ml', brand: 'Wella', sku: 'WEL-OCN-150', category: 'Styling' },
|
||||||
|
{ id: 5, name: 'No. 4 Bond Maintenance Shampoo 250ml', brand: 'Olaplex', sku: 'OLP-004-250', category: 'Hårpleje' },
|
||||||
|
{ id: 6, name: 'IGORA Royal 6-0 60ml', brand: 'Schwarzkopf', sku: 'SCH-IGR-60', category: 'Farve' },
|
||||||
|
{ id: 7, name: 'All Soft Shampoo 300ml', brand: 'Redken', sku: 'RDK-ALS-300', category: 'Hårpleje' },
|
||||||
|
{ id: 8, name: 'Paddle Brush Large', brand: 'Denman', sku: 'DNM-PBL-01', category: 'Tilbehør' }
|
||||||
|
];
|
||||||
|
|
||||||
|
// Initialize Fuse.js
|
||||||
|
const fuse = new Fuse(products, {
|
||||||
|
keys: ['name', 'brand', 'sku', 'category'],
|
||||||
|
threshold: 0.3,
|
||||||
|
ignoreLocation: true
|
||||||
|
});
|
||||||
|
|
||||||
|
const searchInput = document.getElementById('searchInput');
|
||||||
|
const tableBody = document.querySelector('swp-table-body');
|
||||||
|
const allRows = Array.from(tableBody.querySelectorAll('swp-table-row'));
|
||||||
|
|
||||||
|
// Search handler
|
||||||
|
searchInput.addEventListener('input', (e) => {
|
||||||
|
const query = e.target.value.trim();
|
||||||
|
|
||||||
|
if (query === '') {
|
||||||
|
// Show all rows
|
||||||
|
allRows.forEach(row => row.style.display = '');
|
||||||
|
} else {
|
||||||
|
// Search with Fuse.js
|
||||||
|
const results = fuse.search(query);
|
||||||
|
const matchedIds = results.map(r => r.item.id);
|
||||||
|
|
||||||
|
allRows.forEach(row => {
|
||||||
|
const rowId = parseInt(row.dataset.id);
|
||||||
|
row.style.display = matchedIds.includes(rowId) ? '' : 'none';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue