From 85b006e0d607bee37824992fbd420e2c4e67223c Mon Sep 17 00:00:00 2001 From: "Janus C. H. Knudsen" Date: Sat, 27 Dec 2025 22:54:46 +0100 Subject: [PATCH] Enhances service management UI with dynamic pricing controls Adds interactive price and duration adjustment for services Introduces visual indicators for overridden service values Improves editing experience with responsive and intuitive controls Implements granular service modifications with strikethrough and highlight effects --- wwwroot/poc-employee.html | 556 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 532 insertions(+), 24 deletions(-) diff --git a/wwwroot/poc-employee.html b/wwwroot/poc-employee.html index 52454d3..4227315 100644 --- a/wwwroot/poc-employee.html +++ b/wwwroot/poc-employee.html @@ -961,6 +961,199 @@ color: var(--color-teal); } + /* Service values (read mode) */ + swp-service-values { + display: flex; + align-items: center; + margin-left: auto; + } + + swp-service-price, + swp-service-duration { + font-size: 13px; + font-family: var(--font-mono); + color: var(--color-text-secondary); + text-align: right; + } + + swp-service-price { + width: 100px; + } + + swp-service-duration { + width: 80px; + } + + swp-service-price.modified, + swp-service-duration.modified { + color: var(--color-teal); + font-weight: 500; + } + + /* Hide values in edit mode */ + .edit-mode swp-service-values { + display: none; + } + + /* Service controls container - hidden by default */ + swp-service-controls { + display: none; + align-items: center; + margin-left: auto; + } + + /* Show controls in edit mode */ + .edit-mode swp-service-controls { + display: flex; + } + + /* Final values with adjustable controls */ + swp-service-final-values { + display: flex; + align-items: center; + gap: 12px; + } + + swp-adjustable-value { + display: flex; + align-items: center; + gap: 4px; + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: 4px; + padding: 2px; + } + + swp-adjustable-value.modified { + border-color: var(--color-teal); + background: color-mix(in srgb, var(--color-teal) 5%, white); + } + + swp-adjustable-value .adjust-down, + swp-adjustable-value .adjust-up { + width: 24px; + height: 24px; + border: none; + background: var(--color-background); + color: var(--color-text-secondary); + font-size: 14px; + font-weight: 600; + cursor: pointer; + border-radius: 3px; + display: flex; + align-items: center; + justify-content: center; + transition: all 100ms ease; + } + + swp-adjustable-value .adjust-down:hover, + swp-adjustable-value .adjust-up:hover { + background: var(--color-teal); + color: white; + } + + swp-adjustable-value .adjust-down:active, + swp-adjustable-value .adjust-up:active { + transform: scale(0.95); + } + + swp-adjustable-value .adjust-display { + min-width: 55px; + text-align: center; + font-size: 13px; + font-family: var(--font-mono); + color: var(--color-text); + padding: 0 4px; + } + + swp-adjustable-value.modified .adjust-display { + color: var(--color-teal); + font-weight: 500; + } + + /* Duration display */ + .duration-display { + min-width: 50px; + text-align: right; + font-size: 13px; + font-family: var(--font-mono); + color: var(--color-text-secondary); + } + + .duration-display.modified { + color: var(--color-teal); + font-weight: 500; + } + + /* Original values (read mode) */ + swp-service-originals { + display: flex; + align-items: center; + gap: 16px; + margin-right: 16px; + } + + swp-service-originals .original-price-val, + swp-service-originals .original-duration-val { + font-family: var(--font-mono); + font-size: 15px; + color: var(--color-text-secondary); + } + + /* Strikethrough only when value is changed */ + swp-service-originals .original-price-val.struck, + swp-service-originals .original-duration-val.struck { + text-decoration: line-through; + text-decoration-color: var(--color-teal); + text-decoration-thickness: 1px; + color: var(--color-text-muted); + } + + /* Original values (edit mode) - hidden by default, shown when has-override */ + swp-service-originals-edit { + display: none; + align-items: center; + gap: 16px; + margin-right: 20px; + } + + swp-service-row.has-override swp-service-originals-edit { + display: flex; + } + + swp-service-originals-edit .original-price-val, + swp-service-originals-edit .original-duration-val { + font-family: var(--font-mono); + font-size: 15px; + color: var(--color-text-secondary); + } + + swp-service-originals-edit .original-price-val.struck, + swp-service-originals-edit .original-duration-val.struck { + text-decoration: line-through; + text-decoration-color: var(--color-teal); + text-decoration-thickness: 1px; + color: var(--color-text-muted); + } + + /* Highlight originals when value changes */ + swp-service-originals.highlight .original-price-val, + swp-service-originals.highlight .original-duration-val, + swp-service-originals-edit.highlight .original-price-val, + swp-service-originals-edit.highlight .original-duration-val { + animation: flash-text 300ms ease; + } + + @keyframes pulse-border { + 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-teal) 40%, transparent); } + 100% { box-shadow: 0 0 0 4px transparent; } + } + + @keyframes flash-text { + 0% { opacity: 0.5; } + 100% { opacity: 1; } + } + /* ========================================== LAYOUT GRID ========================================== */ @@ -1033,6 +1226,13 @@ margin-top: 4px; } + swp-stat-subtitle { + display: block; + font-size: 11px; + color: var(--color-text-muted); + margin-top: 2px; + } + swp-stat-card.highlight swp-stat-value { color: var(--color-teal); } @@ -1589,6 +1789,90 @@ font-weight: 500; } + /* ========================================== + INVOICE TABLE (afsluttede bookinger) + ========================================== */ + swp-invoice-table { + display: block; + margin-top: 16px; + } + + swp-invoice-table table { + width: 100%; + border-collapse: collapse; + font-size: 13px; + } + + swp-invoice-table th, + swp-invoice-table td { + padding: 12px 16px; + text-align: left; + border-bottom: 1px solid var(--color-border); + } + + swp-invoice-table th { + font-size: 11px; + font-weight: 600; + color: var(--color-text-secondary); + text-transform: uppercase; + letter-spacing: 0.3px; + background: var(--color-background-alt); + } + + swp-invoice-table td { + color: var(--color-text); + } + + swp-invoice-table .date, + swp-invoice-table .time { + font-family: var(--font-mono); + font-size: 12px; + color: var(--color-text-secondary); + } + + swp-invoice-table .customer { + font-weight: 500; + } + + swp-invoice-table .services { + max-width: 250px; + } + + swp-invoice-table .duration { + font-family: var(--font-mono); + font-size: 12px; + color: var(--color-text-secondary); + } + + swp-invoice-table .amount { + font-family: var(--font-mono); + font-weight: 600; + text-align: right; + } + + swp-invoice-table .amount-col { + text-align: right; + } + + /* Status badges */ + swp-status-badge { + display: inline-block; + padding: 4px 10px; + border-radius: 12px; + font-size: 11px; + font-weight: 500; + } + + swp-status-badge.paid { + background: color-mix(in srgb, var(--color-teal) 15%, white); + color: var(--color-teal); + } + + swp-status-badge.pending { + background: color-mix(in srgb, #f59e0b 15%, white); + color: #d97706; + } + /* ========================================== CHART SECTION (matches poc-detail-drawer.html) ========================================== */ @@ -2360,12 +2644,13 @@ Bookinger denne måned - 28.450 kr - Omsætning denne måned + 30.825 kr + Værdi af bookede services + Baseret på 49 bookinger - 4.9 - Gns. kundetilfredshed + 28.450 kr + Omsætning denne måned 68% @@ -2441,6 +2726,100 @@ + + + + Afsluttede bookinger + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DatoTidKundeServicesVarighedBeløbStatus
23. dec 202410:00Maria HansenDameklip, Bundfarve2t 30m1.510 kr
23. dec 202413:30Louise NielsenBalayage langt hår, Olaplex3t2.700 kr
22. dec 202409:00Sofie AndersenDameklip1t725 kr
22. dec 202411:00Karen PedersenStriber mellemlangt hår, Klip2t 30m2.390 krAfventer
21. dec 202414:00Emma LarsenOlaplex Stand alone1t550 kr
21. dec 202410:00Mette KristensenHerreklip1t645 kr
20. dec 202409:30Anne ThomsenGlossing mellemlangt hår1t745 kr
20. dec 202412:00Lise MortensenDameklip, Farvning vipper & bryn1t 30m1.070 kr
+
+