From 4ead6bb54424d297eab9f469f812e6d4302c125f Mon Sep 17 00:00:00 2001 From: "Janus C. H. Knudsen" Date: Sat, 3 Jan 2026 16:43:35 +0100 Subject: [PATCH] Adds waitlist UI with drawer and responsive styles Implements a new waitlist component with mini card, drawer, and interactive functionality Introduces: - Waitlist mini card with badge - Drawer overlay with detailed waitlist entries - Responsive CSS for various waitlist UI elements - Interactive JavaScript for opening/closing drawer and handling actions --- wwwroot/css/dashboard.css | 288 +++++++++++++++++++++++++++++++++++++ wwwroot/poc-dashboard.html | 225 +++++++++++++++++++++++++++++ 2 files changed, 513 insertions(+) diff --git a/wwwroot/css/dashboard.css b/wwwroot/css/dashboard.css index 81b78bf..b03b55f 100644 --- a/wwwroot/css/dashboard.css +++ b/wwwroot/css/dashboard.css @@ -867,3 +867,291 @@ swp-date-display i { grid-template-columns: 1fr; } } + +/* ========================================== + WAITLIST MINI CARD + ========================================== */ +swp-waitlist-card { + display: flex; + align-items: center; + gap: 12px; + padding: 16px; + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: 8px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); + cursor: pointer; + transition: all 0.15s ease; +} + +swp-waitlist-card:hover { + border-color: var(--color-teal); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); +} + +swp-waitlist-icon { + position: relative; + font-size: 24px; + color: var(--color-text-secondary); +} + +swp-waitlist-badge { + position: absolute; + top: -8px; + right: -8px; + min-width: 20px; + height: 20px; + padding: 0 6px; + background: var(--color-teal); + color: white; + font-size: 11px; + font-weight: 600; + border-radius: 10px; + display: flex; + align-items: center; + justify-content: center; +} + +swp-waitlist-label { + font-size: 14px; + font-weight: 500; + color: var(--color-text); +} + +/* ========================================== + WAITLIST DRAWER + ========================================== */ +swp-drawer-overlay { + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.3); + opacity: 0; + visibility: hidden; + transition: all 0.3s ease; + z-index: 999; +} + +swp-drawer-overlay.visible { + opacity: 1; + visibility: visible; +} + +swp-waitlist-drawer { + position: fixed; + top: 0; + right: 0; + width: 420px; + height: 100vh; + background: var(--color-surface); + border-left: 1px solid var(--color-border); + box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1); + transform: translateX(100%); + transition: transform 0.3s ease; + z-index: 1000; + display: flex; + flex-direction: column; +} + +swp-waitlist-drawer.open { + transform: translateX(0); +} + +swp-drawer-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px 24px; + border-bottom: 1px solid var(--color-border); +} + +swp-drawer-title { + font-size: 16px; + font-weight: 600; + color: var(--color-text); + display: flex; + align-items: center; + gap: 8px; +} + +swp-drawer-title swp-count { + font-size: 14px; + font-weight: 500; + color: var(--color-text-secondary); +} + +swp-drawer-close { + width: 32px; + height: 32px; + border-radius: 6px; + background: var(--color-background-alt); + border: none; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + color: var(--color-text-secondary); + transition: all 0.15s ease; +} + +swp-drawer-close:hover { + background: var(--color-background-hover); + color: var(--color-text); +} + +swp-drawer-close i { + font-size: 18px; +} + +swp-drawer-body { + flex: 1; + overflow-y: auto; + padding: 16px; +} + +swp-waitlist-list { + display: flex; + flex-direction: column; + gap: 12px; +} + +swp-waitlist-item { + display: flex; + flex-direction: column; + gap: 12px; + padding: 16px; + background: var(--color-background-alt); + border-radius: 8px; + border: 1px solid var(--color-border); +} + +swp-waitlist-customer { + display: flex; + align-items: center; + gap: 12px; +} + +swp-waitlist-customer swp-avatar { + width: 40px; + height: 40px; + border-radius: 50%; + background: var(--color-teal); + color: white; + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + font-weight: 600; + flex-shrink: 0; +} + +swp-waitlist-customer-info { + flex: 1; +} + +swp-waitlist-name { + font-size: 14px; + font-weight: 600; + color: var(--color-text); +} + +swp-waitlist-phone { + font-size: 12px; + color: var(--color-text-secondary); +} + +swp-waitlist-service { + font-size: 13px; + font-weight: 500; + color: var(--color-teal); + padding: 6px 10px; + background: color-mix(in srgb, var(--color-teal) 10%, transparent); + border-radius: 4px; + display: inline-block; +} + +swp-waitlist-meta { + display: flex; + flex-direction: column; + gap: 6px; +} + +swp-waitlist-periods { + display: flex; + align-items: center; + gap: 6px; + flex-wrap: wrap; +} + +swp-waitlist-periods swp-label { + font-size: 12px; + color: var(--color-text-secondary); +} + +swp-waitlist-period-tag { + font-size: 11px; + padding: 3px 8px; + background: var(--color-background); + border-radius: 4px; + color: var(--color-text); +} + +swp-waitlist-dates { + display: flex; + align-items: center; + gap: 16px; +} + +swp-waitlist-date { + font-size: 11px; + color: var(--color-text-secondary); + display: flex; + align-items: center; + gap: 4px; +} + +swp-waitlist-date i { + font-size: 12px; +} + +swp-waitlist-date.expires { + color: var(--color-text-secondary); +} + +swp-waitlist-date.expires.soon { + color: var(--color-amber); + font-weight: 500; +} + +swp-waitlist-actions { + display: flex; + gap: 8px; + padding-top: 8px; + border-top: 1px solid var(--color-border); +} + +swp-waitlist-actions swp-btn { + flex: 1; + justify-content: center; + padding: 8px 12px; + font-size: 12px; +} + +swp-waitlist-empty { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 48px 24px; + text-align: center; +} + +swp-waitlist-empty i { + font-size: 48px; + color: var(--color-border); + margin-bottom: 16px; +} + +swp-waitlist-empty span { + font-size: 14px; + color: var(--color-text-secondary); +} diff --git a/wwwroot/poc-dashboard.html b/wwwroot/poc-dashboard.html index dda530a..a4b3f63 100644 --- a/wwwroot/poc-dashboard.html +++ b/wwwroot/poc-dashboard.html @@ -392,6 +392,15 @@ + + + + + 4 + + På venteliste + + @@ -472,6 +481,178 @@ + + + + + + + + Venteliste (4) + + + + + + + + + + + EC + + Emma Christensen + +45 12 34 56 78 + + + Dameklip + Farve + + + Ønsker: + Mandag-Onsdag + Formiddag + + + + + Tilmeldt: 2. jan 2026 + + + + Udløber: 16. jan 2026 + + + + + + + Kontakt + + + + Book nu + + + + + + + + MS + + Mikkel Sørensen + +45 23 45 67 89 + + + Herreklip + + + Ønsker: + Weekend + + + + + Tilmeldt: 30. dec 2025 + + + + Udløber: 6. jan 2026 + + + + + + + Kontakt + + + + Book nu + + + + + + + + LA + + Lise Andersen + +45 34 56 78 90 + + + Balayage + + + Ønsker: + Tirsdag-Torsdag + Eftermiddag + + + + + Tilmeldt: 28. dec 2025 + + + + Udløber: 11. jan 2026 + + + + + + + Kontakt + + + + Book nu + + + + + + + + PH + + Peter Hansen + +45 45 67 89 01 + + + Herreklip + Skæg + + + Ønsker: + Fleksibel + + + + + Tilmeldt: 27. dec 2025 + + + + Udløber: 10. jan 2026 + + + + + + + Kontakt + + + + Book nu + + + + + + +