diff --git a/.claude/settings.local.json b/.claude/settings.local.json index b2dc50e..fc2387f 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -16,7 +16,9 @@ "Bash(cd:*)", "Bash(powershell -Command \"Get-ChildItem -Path src -Directory | Select-Object -ExpandProperty Name\")", "Bash(powershell -Command \"Get-ChildItem -Path src -Filter ''index.ts'' -Recurse | Select-Object -ExpandProperty FullName\")", - "Bash(powershell -Command:*)" + "Bash(powershell -Command:*)", + "WebFetch(domain:www.npmjs.com)", + "WebFetch(domain:unpkg.com)" ], "deny": [], "ask": [] diff --git a/.workbench/Screenshot_4.png b/.workbench/Screenshot_4.png new file mode 100644 index 0000000..0b59286 Binary files /dev/null and b/.workbench/Screenshot_4.png differ diff --git a/package-lock.json b/package-lock.json index 3b1a7b0..2cda11a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@novadi/core": "^0.6.0", "@rollup/rollup-win32-x64-msvc": "^4.52.2", + "@sevenweirdpeople/swp-charting": "^0.1.0", "dayjs": "^1.11.19", "fuse.js": "^7.1.0", "json-diff-ts": "^4.8.2", @@ -1173,6 +1174,12 @@ "win32" ] }, + "node_modules/@sevenweirdpeople/swp-charting": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@sevenweirdpeople/swp-charting/-/swp-charting-0.1.0.tgz", + "integrity": "sha512-XWu1bTK91b9jHbueUPyrNgs0vTHSP3BAWAzrJwB09SoZWECjE3bCck0+SkMLs3qM4Q+0weCDZck090N8NboLyQ==", + "license": "MIT" + }, "node_modules/@types/chai": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", diff --git a/package.json b/package.json index 2b53162..48153ce 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "dependencies": { "@novadi/core": "^0.6.0", "@rollup/rollup-win32-x64-msvc": "^4.52.2", + "@sevenweirdpeople/swp-charting": "^0.1.0", "dayjs": "^1.11.19", "fuse.js": "^7.1.0", "json-diff-ts": "^4.8.2", diff --git a/wwwroot/icons/angle-small-left.svg b/wwwroot/icons/angle-small-left.svg new file mode 100644 index 0000000..aed03e7 --- /dev/null +++ b/wwwroot/icons/angle-small-left.svg @@ -0,0 +1,2 @@ + + diff --git a/wwwroot/icons/angle-small-right.svg b/wwwroot/icons/angle-small-right.svg new file mode 100644 index 0000000..f2a7cba --- /dev/null +++ b/wwwroot/icons/angle-small-right.svg @@ -0,0 +1,2 @@ + + diff --git a/wwwroot/icons/envelope.svg b/wwwroot/icons/envelope.svg new file mode 100644 index 0000000..2da3fb5 --- /dev/null +++ b/wwwroot/icons/envelope.svg @@ -0,0 +1,2 @@ + + diff --git a/wwwroot/icons/phone-flip.svg b/wwwroot/icons/phone-flip.svg new file mode 100644 index 0000000..ec83b44 --- /dev/null +++ b/wwwroot/icons/phone-flip.svg @@ -0,0 +1,2 @@ + + diff --git a/wwwroot/icons/user.svg b/wwwroot/icons/user.svg new file mode 100644 index 0000000..3145a9d --- /dev/null +++ b/wwwroot/icons/user.svg @@ -0,0 +1,2 @@ + + diff --git a/wwwroot/poc-detail-drawer.html b/wwwroot/poc-detail-drawer.html index 41c172f..1d8ef28 100644 --- a/wwwroot/poc-detail-drawer.html +++ b/wwwroot/poc-detail-drawer.html @@ -270,37 +270,66 @@ display: block; } + swp-customer-row { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + } + swp-customer-name { - display: block; font-size: 18px; font-weight: 500; color: var(--color-text); - margin-bottom: 6px; } - swp-customer-contact { - display: flex; - flex-direction: column; - gap: 4px; - } - - swp-contact-item { - display: flex; - align-items: center; - gap: 8px; + swp-customer-phone { font-size: 14px; - color: var(--color-text-secondary); + color: var(--color-teal); } - swp-contact-item a { + swp-customer-phone a { color: var(--color-teal); text-decoration: none; } - swp-contact-item a:hover { + swp-customer-phone a:hover { text-decoration: underline; } + swp-customer-details-link { + display: inline-flex; + align-items: center; + gap: 4px; + font-size: 13px; + color: var(--color-text-secondary); + cursor: pointer; + margin-top: 6px; + transition: color 150ms ease; + } + + swp-customer-details-link:hover { + color: var(--color-teal); + } + + /* Chevron icon styling */ + .link-chevron { + width: 18px; + height: 18px; + transition: transform 200ms ease; + filter: invert(45%) sepia(0%) saturate(0%) brightness(90%); + } + + swp-customer-details-link:hover .link-chevron, + swp-journal-details-link:hover .link-chevron { + filter: invert(32%) sepia(98%) saturate(1234%) hue-rotate(152deg) brightness(93%) contrast(92%); + } + + swp-customer-details-link.panel-open .link-chevron, + swp-journal-details-link.panel-open .link-chevron { + transform: rotate(90deg); + } + /* Status */ swp-status-row { display: flex; @@ -407,21 +436,23 @@ display: flex; justify-content: space-between; align-items: center; - padding: 12px; - background: var(--color-text); - color: var(--color-surface); - border-radius: 4px; + padding: 12px 0; + border-top: 1px solid var(--color-border); + border-bottom: 1px solid var(--color-border); + margin-top: 4px; } swp-total-label { - font-size: 14px; - opacity: 0.7; + font-size: 16px; + font-weight: 600; + color: var(--color-text); } swp-total-amount { font-family: var(--font-mono); - font-size: 20px; - font-weight: 600; + font-size: 24px; + font-weight: 700; + color: var(--color-text); } /* Notes */ @@ -508,6 +539,614 @@ border-style: solid; } + /* Journal Panel - slides out from left of drawer */ + swp-journal-panel { + position: fixed; + top: 0; + right: 340px; + bottom: 0; + width: 440px; + background: var(--color-surface); + border-left: 1px solid var(--color-border); + box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1); + transform: translateX(100%); + opacity: 0; + transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), + opacity 200ms ease; + display: flex; + flex-direction: column; + z-index: 1000; + } + + swp-journal-panel.open { + transform: translateX(0); + opacity: 1; + } + + swp-journal-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 16px 20px; + border-bottom: 1px solid var(--color-border); + background: var(--color-background-alt); + } + + swp-journal-header-title { + font-size: 16px; + font-weight: 600; + color: var(--color-text); + } + + swp-journal-close { + background: none; + border: none; + font-size: 18px; + color: var(--color-text-secondary); + cursor: pointer; + padding: 4px 8px; + border-radius: 4px; + transition: background 150ms ease; + } + + swp-journal-close:hover { + background: var(--color-background-hover); + } + + /* Journal Tabs - Traditional style */ + swp-journal-tabs { + display: flex; + padding: 0 20px; + background: var(--color-background-alt); + border-bottom: 1px solid var(--color-border); + } + + swp-journal-tab { + display: inline-flex; + align-items: center; + gap: 8px; + padding: 14px 18px; + font-size: 13px; + font-weight: 500; + color: var(--color-text-secondary); + background: transparent; + border: none; + border-bottom: 2px solid transparent; + margin-bottom: -1px; + cursor: pointer; + transition: all 150ms ease; + } + + swp-journal-tab:hover:not(.disabled) { + color: var(--color-text); + background: var(--color-background-hover); + } + + swp-journal-tab.active { + color: var(--color-text); + background: var(--color-surface); + border-bottom-color: var(--color-teal); + } + + swp-journal-tab.disabled { + opacity: 0.5; + cursor: not-allowed; + } + + .tab-indicator { + width: 8px; + height: 8px; + border-radius: 2px; + flex-shrink: 0; + } + + .tab-indicator.blue { + background: var(--b-color-blue); + } + + .tab-indicator.amber { + background: var(--b-color-amber); + } + + .tab-indicator.gray { + background: var(--color-text-secondary); + } + + /* Tab Content Header */ + swp-journal-tab-header { + display: flex; + flex-direction: column; + gap: 8px; + padding: 16px 20px; + border-bottom: 1px solid var(--color-border); + } + + swp-journal-tab-title { + font-size: 15px; + font-weight: 600; + color: var(--color-text); + } + + swp-journal-tab-title span { + font-weight: 400; + color: var(--color-text-secondary); + } + + swp-journal-tab-desc { + font-size: 12px; + color: var(--color-text-secondary); + line-height: 1.4; + } + + swp-journal-add-btn { + display: inline-flex; + align-items: center; + gap: 4px; + padding: 8px 14px; + font-size: 13px; + font-weight: 500; + color: white; + background: var(--color-teal); + border-radius: 6px; + cursor: pointer; + margin-top: 4px; + align-self: flex-start; + transition: background 150ms ease; + } + + swp-journal-add-btn:hover { + background: #00796b; + } + + /* Journal Content */ + swp-journal-content { + flex: 1; + overflow-y: auto; + padding: 16px 20px; + display: flex; + flex-direction: column; + gap: 12px; + } + + /* Journal Entry Card */ + swp-journal-entry { + display: flex; + flex-direction: column; + gap: 10px; + padding: 14px 16px; + background: var(--color-background-alt); + border-radius: 8px; + border: 1px solid var(--color-border); + } + + swp-journal-entry-meta { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px; + } + + swp-journal-entry-type { + padding: 4px 10px; + font-size: 11px; + font-weight: 600; + color: #92400e; + background: color-mix(in srgb, var(--b-color-amber) 20%, var(--b-mix)); + border-radius: 4px; + } + + swp-journal-entry-date { + font-size: 12px; + color: var(--color-text-secondary); + } + + swp-journal-entry-author { + font-size: 12px; + color: var(--color-text-secondary); + } + + swp-journal-entry-tags { + display: flex; + flex-wrap: wrap; + gap: 6px; + margin-left: auto; + } + + swp-journal-tag { + padding: 3px 10px; + font-size: 11px; + color: var(--color-text-secondary); + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: 12px; + } + + swp-journal-entry-delete { + padding: 4px 6px; + font-size: 14px; + color: var(--color-text-secondary); + cursor: pointer; + border-radius: 4px; + transition: all 150ms ease; + opacity: 0.6; + } + + swp-journal-entry-delete:hover { + color: var(--b-color-red); + background: color-mix(in srgb, var(--b-color-red) 10%, var(--b-mix)); + opacity: 1; + } + + swp-journal-entry-text { + font-size: 13px; + color: var(--color-text); + line-height: 1.5; + } + + /* Journal Profile Section */ + swp-journal-profile-section { + padding: 16px 20px; + border-top: 1px solid var(--color-border); + background: var(--color-surface); + } + + swp-journal-profile-toggle { + display: flex; + align-items: center; + gap: 6px; + font-size: 13px; + color: var(--color-teal); + cursor: pointer; + transition: color 150ms ease; + } + + swp-journal-profile-toggle:hover { + color: #00796b; + } + + swp-journal-profile-toggle .toggle-arrow { + font-size: 10px; + transition: transform 200ms ease; + } + + swp-journal-profile-toggle.collapsed .toggle-arrow { + transform: rotate(-90deg); + } + + swp-journal-profile-boxes { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 8px; + margin-top: 12px; + max-height: 200px; + overflow: hidden; + transition: max-height 200ms ease, margin-top 200ms ease, opacity 200ms ease; + } + + swp-journal-profile-boxes.collapsed { + max-height: 0; + margin-top: 0; + opacity: 0; + } + + /* Customer Details Panel - double width drawer, slides under like journal */ + swp-customer-panel { + position: fixed; + top: 0; + right: 340px; + bottom: 0; + width: 680px; + background: var(--color-surface); + border-left: 1px solid var(--color-border); + box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1); + transform: translateX(100%); + opacity: 0; + transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), + opacity 200ms ease; + display: flex; + flex-direction: column; + z-index: 1000; + overflow: hidden; + } + + swp-customer-panel.open { + transform: translateX(0); + opacity: 1; + } + + swp-customer-panel-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px 24px; + border-bottom: 1px solid var(--color-border); + background: var(--color-background-alt); + } + + swp-customer-panel-title { + display: flex; + align-items: center; + gap: 8px; + font-size: 18px; + font-weight: 600; + color: var(--color-text); + } + + .panel-header-icon { + width: 20px; + height: 20px; + filter: invert(22%) sepia(14%) saturate(1042%) hue-rotate(164deg) brightness(102%) contrast(85%); + } + + swp-customer-panel-close { + background: none; + border: none; + font-size: 20px; + color: var(--color-text-secondary); + cursor: pointer; + padding: 4px 8px; + border-radius: 4px; + transition: background 150ms ease; + } + + swp-customer-panel-close:hover { + background: var(--color-background-hover); + } + + swp-customer-panel-content { + flex: 1; + overflow-y: auto; + overflow-x: hidden; + padding: 24px; + display: flex; + flex-direction: column; + gap: 24px; + min-height: 0; + } + + /* Customer info header */ + swp-customer-header-section { + display: flex; + gap: 24px; + padding-bottom: 20px; + border-bottom: 1px solid var(--color-border); + } + + swp-customer-avatar { + width: 80px; + height: 80px; + border-radius: 50%; + background: linear-gradient(135deg, var(--color-teal), #4db6ac); + display: flex; + align-items: center; + justify-content: center; + font-size: 32px; + font-weight: 600; + color: white; + flex-shrink: 0; + } + + swp-customer-header-info { + flex: 1; + display: flex; + flex-direction: column; + gap: 4px; + } + + swp-customer-header-top { + display: flex; + justify-content: space-between; + align-items: flex-start; + } + + swp-customer-header-left { + display: flex; + flex-direction: column; + gap: 4px; + } + + swp-customer-header-name { + font-size: 24px; + font-weight: 600; + color: var(--color-text); + } + + swp-customer-header-contact { + display: flex; + flex-direction: column; + gap: 6px; + align-items: flex-end; + } + + swp-customer-header-contact-item { + font-size: 14px; + } + + swp-customer-header-contact-item a { + color: var(--color-teal); + text-decoration: none; + } + + swp-customer-header-contact-item a:hover { + text-decoration: underline; + } + + swp-customer-since { + font-size: 12px; + color: var(--color-text-secondary); + } + + /* Fact boxes grid */ + swp-fact-boxes { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 16px; + } + + swp-fact-box { + padding: 16px; + background: var(--color-background-alt); + border-radius: 8px; + border: 1px solid var(--color-border); + text-align: center; + } + + swp-fact-box-value { + display: block; + font-family: var(--font-mono); + font-size: 20px; + font-weight: 700; + color: var(--color-text); + margin-bottom: 4px; + } + + swp-fact-box-label { + display: block; + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.5px; + color: var(--color-text-secondary); + } + + swp-fact-box.highlight { + background: linear-gradient(135deg, rgba(0, 137, 123, 0.1), rgba(0, 137, 123, 0.05)); + border-color: var(--color-teal); + } + + swp-fact-box.highlight swp-fact-box-value { + color: var(--color-teal); + } + + /* Chart section */ + swp-chart-section { + display: block; + } + + swp-chart-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 16px; + } + + swp-chart-title { + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.5px; + color: var(--color-text-secondary); + } + + swp-chart-legend { + display: flex; + gap: 16px; + } + + swp-chart-legend-item { + display: flex; + align-items: center; + gap: 6px; + font-size: 12px; + color: var(--color-text-secondary); + } + + swp-chart-legend-dot { + width: 8px; + height: 8px; + border-radius: 50%; + } + + swp-chart-legend-dot.services { + background: var(--color-teal); + } + + swp-chart-legend-dot.products { + background: var(--b-color-blue); + } + + swp-chart-container { + display: block; + background: var(--color-background-alt); + border-radius: 8px; + border: 1px solid var(--color-border); + } + + /* Products list */ + swp-products-section { + display: block; + } + + swp-products-list { + display: flex; + flex-direction: column; + gap: 8px; + } + + swp-product-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 12px 14px; + background: var(--color-background-alt); + border-radius: 6px; + border: 1px solid var(--color-border); + } + + swp-product-info { + display: flex; + flex-direction: column; + gap: 2px; + } + + swp-product-name { + font-size: 14px; + font-weight: 500; + color: var(--color-text); + } + + swp-product-date { + font-size: 12px; + color: var(--color-text-secondary); + } + + swp-product-price { + font-family: var(--font-mono); + font-size: 14px; + font-weight: 500; + color: var(--color-text); + } + + /* Preferences section */ + swp-preferences-section { + display: block; + } + + swp-preferences-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 12px; + } + + swp-preference-item { + padding: 12px 14px; + background: var(--color-background-alt); + border-radius: 6px; + border: 1px solid var(--color-border); + } + + swp-preference-label { + display: block; + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.5px; + color: var(--color-text-secondary); + margin-bottom: 4px; + } + + swp-preference-value { + font-size: 14px; + color: var(--color-text); + } + /* Customer stats */ swp-stats-grid { display: grid; @@ -540,6 +1179,64 @@ margin-top: 2px; } + /* Profile boxes */ + swp-profile-boxes { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 8px; + } + + swp-profile-box { + padding: 10px 12px; + background: var(--color-background-alt); + border-radius: 4px; + border: 1px solid var(--color-border); + } + + swp-profile-box.warning { + background: color-mix(in srgb, var(--b-color-amber) 10%, var(--b-mix)); + border-color: var(--b-color-amber); + } + + swp-profile-box-label { + display: block; + font-size: 10px; + text-transform: uppercase; + letter-spacing: 0.5px; + color: var(--color-text-secondary); + margin-bottom: 3px; + } + + swp-profile-box.warning swp-profile-box-label { + color: #b8860b; + } + + swp-profile-box-value { + display: block; + font-size: 12px; + color: var(--color-text); + line-height: 1.3; + } + + swp-journal-details-link { + display: inline-flex; + align-items: center; + gap: 4px; + font-size: 13px; + color: var(--color-text-secondary); + cursor: pointer; + margin-top: 10px; + transition: color 150ms ease; + } + + swp-journal-details-link:hover { + color: var(--color-teal); + } + + swp-journal-details-link.no-journal { + color: var(--color-teal); + } + /* Drawer footer */ swp-drawer-footer { display: flex; @@ -763,6 +1460,223 @@ + + + + Journal + + + + + + Noter + Farveformler + Analyse + + + + + Kunde-journal (langsigtet) + Private noter om hår, formler, reaktioner og anbefalinger. Kunden ser det ikke. + + Tilføj note + + + + + + + Journal + 12. nov 2025 + Af: Maja + + Farveformel + Kold tone + + 🗑 + + + Formel: 7/1 + 7/0 (1:1) + 1.9% • 15 min.
+ Resultat: neutral/kold, god glans. Undgå varme toner næste gang. +
+
+ + + + Journal + 2. sep 2025 + Af: Nina + + Hovedbund + Sensitiv + + 🗑 + + + Let irritation ved hårgrænsen. Anbefalet parfumefri shampoo + mild kur.
+ Kunden reagerer på stærk parfume. +
+
+
+ + + + + Vis "Kundeprofil" (hurtige facts) + + + + Hårtype + Medium • Bølget + + + Porøsitet + Medium + + + Præference + Kold tone, ikke for mørk + + + Advarsler + Parfume-allergi • Sensitiv hovedbund + + + +
+ + + + + Kundedetaljer + + + + + + SN + + + + Sofie Nielsen + Kunde siden marts 2024 + + + + +45 23 45 67 89 + + + sofie@email.dk + + + + + + + + + + 12.450 kr + Total omsætning + + + 14 + Besøg + + + 889 kr + Gns. pr. besøg + + + 32 dage + Gns. interval + + + + + + + Omsætning (sidste 6 mdr) + + + + Services + + + + Produkter + + + + + + + + + Seneste produktkøb + + + + Olaplex No. 3 + 9. dec 2025 + + 300 kr + + + + Kevin Murphy Hydrate-Me Wash + 12. nov 2025 + + 275 kr + + + + Olaplex No. 4 Bond Shampoo + 18. okt 2025 + + 320 kr + + + + Moroccanoil Treatment + 5. sep 2025 + + 399 kr + + + + Olaplex No. 5 Conditioner + 12. aug 2025 + + 320 kr + + + + + + + Præferencer & noter + + + Foretrukken frisør + Emma Larsen + + + Hårtype + Fint, medium tykkelse + + + Farvehistorik + 7.3 + 7.4 blanding + + + Allergier + Ingen kendte + + + + + + @@ -779,18 +1693,13 @@ + Kunde - Sofie Nielsen - - - Tel - +45 23 45 67 89 - - - Mail - sofie@email.dk - - + + Sofie Nielsen + +45 23 45 67 89 + + Vis detaljer @@ -865,38 +1774,30 @@ - + - Journal - - - Åbn journal - - + Profil + + + Hårtype + Medium • Bølget + + + Porøsitet + Medium + + + Præference + Kold tone, ikke for mørk + + + Advarsler + Parfume-allergi • Sensitiv hovedbund + + + Se journal - - - Kundehistorik - - - 14 - Besøg - - - 8.450 kr - Omsætning - - - 12. nov - Sidste besøg - - - Olaplex - Sidste produkt - - - @@ -939,17 +1840,14 @@ // Update journal link const journalLink = document.getElementById('journalLink'); - const journalText = journalLink.querySelector('swp-journal-text'); - const journalIcon = document.getElementById('journalIcon'); + const chevronImg = ''; if (hasJournal) { journalLink.classList.remove('no-journal'); - journalIcon.src = 'icons/journal-alt.svg'; - journalText.textContent = 'Åbn journal'; + journalLink.innerHTML = 'Se journal ' + chevronImg; } else { journalLink.classList.add('no-journal'); - journalIcon.src = 'icons/square-plus.svg'; - journalText.textContent = 'Opret journal'; + journalLink.innerHTML = '+ Opret journal'; } // Update footer based on status @@ -970,6 +1868,53 @@ function closeDrawer() { document.getElementById('drawerOverlay').classList.remove('open'); document.getElementById('detailDrawer').classList.remove('open'); + document.getElementById('journalPanel').classList.remove('open'); + document.getElementById('customerPanel').classList.remove('open'); + document.getElementById('journalLink').classList.remove('panel-open'); + document.getElementById('customerDetailsLink').classList.remove('panel-open'); + } + + function toggleJournal() { + const journalLink = document.getElementById('journalLink'); + // Don't open journal if it's the "create" state + if (journalLink.classList.contains('no-journal')) { + // Could show create journal flow here + return; + } + const journalPanel = document.getElementById('journalPanel'); + journalPanel.classList.toggle('open'); + journalLink.classList.toggle('panel-open', journalPanel.classList.contains('open')); + } + + function closeJournal() { + document.getElementById('journalPanel').classList.remove('open'); + document.getElementById('journalLink').classList.remove('panel-open'); + } + + function toggleJournalProfile() { + const toggle = document.querySelector('swp-journal-profile-toggle'); + const boxes = document.getElementById('journalProfileBoxes'); + toggle.classList.toggle('collapsed'); + boxes.classList.toggle('collapsed'); + } + + function openCustomerPanel() { + const panel = document.getElementById('customerPanel'); + const link = document.getElementById('customerDetailsLink'); + const isOpen = panel.classList.contains('open'); + + if (isOpen) { + panel.classList.remove('open'); + link.classList.remove('panel-open'); + } else { + panel.classList.add('open'); + link.classList.add('panel-open'); + } + } + + function closeCustomerPanel() { + document.getElementById('customerPanel').classList.remove('open'); + document.getElementById('customerDetailsLink').classList.remove('panel-open'); } document.addEventListener('keydown', (e) => { @@ -1032,5 +1977,54 @@ dropdown.hidePopover(); } + + +