From 497d95d84956ee31c3dd9cd425bc32da65ce0987 Mon Sep 17 00:00:00 2001 From: DanielS Date: Tue, 11 Aug 2026 00:55:35 +0200 Subject: [PATCH] refactor: move device name and license inputs to modal popup --- shop/components/wizard/summary-sidebar.tsx | 94 ++++++++++++++++------ 1 file changed, 71 insertions(+), 23 deletions(-) diff --git a/shop/components/wizard/summary-sidebar.tsx b/shop/components/wizard/summary-sidebar.tsx index ff61ac6..496eaa0 100644 --- a/shop/components/wizard/summary-sidebar.tsx +++ b/shop/components/wizard/summary-sidebar.tsx @@ -8,6 +8,14 @@ import { Input } from '@/components/ui/input' import { Button } from '@/components/ui/button' import { Pencil, Trash2, UserPlus, ChevronRight, AlertCircle, Check } from 'lucide-react' import { Category, Product, CategorySelection } from '@/lib/types' +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog' interface SummarySidebarProps { visibleCategories: Category[] @@ -72,6 +80,8 @@ export function SummarySidebar({ nextStep, prevStep, }: SummarySidebarProps) { + const [isOpen, setIsOpen] = React.useState(false) + return (
@@ -252,7 +262,10 @@ export function SummarySidebar({ variant="ghost" size="icon" className="w-7 h-7 hover:bg-white/10 text-slate-400 hover:text-white" - onClick={() => editBasketItem(idx)} + onClick={() => { + editBasketItem(idx) + setIsOpen(true) + }} title="Kasse bearbeiten" > @@ -275,34 +288,14 @@ export function SummarySidebar({ )} -
- - setDeviceName(e.target.value)} - className="bg-white/5 border-white/10 text-white text-xs h-9 rounded-lg" - /> -
-
- - setLicenseNumber(e.target.value)} - className="bg-white/5 border-white/10 text-white text-xs h-9 rounded-lg" - /> -
+ + + +
) }