feat(wizard): add order notes field and scroll container
This commit is contained in:
@@ -166,6 +166,7 @@ export function OrderWizard({
|
||||
return ''
|
||||
})
|
||||
const [editingIdx, setEditingIdx] = useState<number | null>(null)
|
||||
const [orderNotes, setOrderNotes] = useState<string>('')
|
||||
const [toast, setToast] = useState<{ message: string; type: 'error' | 'success' } | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
@@ -687,6 +688,7 @@ export function OrderWizard({
|
||||
endCustomerId: selectedEndCustomerId,
|
||||
endCustomer: selectedEndCustomer,
|
||||
lastLicenseDate: lastLicenseDate || null,
|
||||
notes: orderNotes || null,
|
||||
})
|
||||
})
|
||||
|
||||
@@ -859,40 +861,42 @@ export function OrderWizard({
|
||||
</div>
|
||||
|
||||
{/* CENTER: Sticky stepper + scrollable categories */}
|
||||
<div className="lg:col-span-2 space-y-0">
|
||||
<div className="lg:col-span-2 flex flex-col max-h-[calc(100vh-4rem)] overflow-hidden">
|
||||
{/* Sticky stepper header — only covers center column */}
|
||||
<div className="sticky top-0 z-20 bg-slate-950/80 backdrop-blur-md pb-4 pt-6 border-b border-white/5 mb-6">
|
||||
<div className="shrink-0 bg-slate-950/80 backdrop-blur-md pb-4 pt-2 border-b border-white/5 mb-4">
|
||||
<p className="text-center text-slate-400 text-sm mb-4">Schritt 3 von 4 — Software konfigurieren</p>
|
||||
<ProgressStepper step={step} basketItemsCount={basketItems.length} />
|
||||
</div>
|
||||
|
||||
{/* Upgrade-Modus Hinweis-Banner */}
|
||||
{upgradeMode && lockedDeviceId && (
|
||||
<div className="mb-4 p-3 rounded-xl bg-primary/10 border border-primary/20 text-xs text-primary/90 flex items-start gap-2">
|
||||
<span className="text-primary mt-0.5">⚡</span>
|
||||
<div>
|
||||
<p className="font-semibold">Upgrade-Modus: {lockedDeviceId}</p>
|
||||
<p className="text-primary/70 mt-0.5">Bereits lizenzierte Module sind ausgegraut und können nicht doppelt gebucht werden.</p>
|
||||
{/* Scrollable category content area */}
|
||||
<div className="flex-1 overflow-y-auto pr-2 subpixel-antialiased scrollbar-thin scrollbar-thumb-white/10 scrollbar-track-transparent">
|
||||
{/* Upgrade-Modus Hinweis-Banner */}
|
||||
{upgradeMode && lockedDeviceId && (
|
||||
<div className="mb-4 p-3 rounded-xl bg-primary/10 border border-primary/20 text-xs text-primary/90 flex items-start gap-2">
|
||||
<span className="text-primary mt-0.5">⚡</span>
|
||||
<div>
|
||||
<p className="font-semibold">Upgrade-Modus: {lockedDeviceId}</p>
|
||||
<p className="text-primary/70 mt-0.5">Bereits lizenzierte Module sind ausgegraut und können nicht doppelt gebucht werden.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
)}
|
||||
|
||||
{/* Scrollable category content */}
|
||||
<StepSoftware
|
||||
visibleCategories={visibleCategories}
|
||||
products={products}
|
||||
selections={selections}
|
||||
selectProduct={selectProduct}
|
||||
isProductDisabled={isProductDisabled}
|
||||
isModuleDisabled={isModuleDisabled}
|
||||
toggleModule={toggleModule}
|
||||
moduleQuantities={moduleQuantities}
|
||||
setModuleQuantities={setModuleQuantities}
|
||||
selectedBillingInterval={selectedBillingInterval}
|
||||
billingLabel={billingLabel}
|
||||
billingBadgeClass={billingBadgeClass}
|
||||
existingModuleIds={existingModuleIds}
|
||||
/>
|
||||
<StepSoftware
|
||||
visibleCategories={visibleCategories}
|
||||
products={products}
|
||||
selections={selections}
|
||||
selectProduct={selectProduct}
|
||||
isProductDisabled={isProductDisabled}
|
||||
isModuleDisabled={isModuleDisabled}
|
||||
toggleModule={toggleModule}
|
||||
moduleQuantities={moduleQuantities}
|
||||
setModuleQuantities={setModuleQuantities}
|
||||
selectedBillingInterval={selectedBillingInterval}
|
||||
billingLabel={billingLabel}
|
||||
billingBadgeClass={billingBadgeClass}
|
||||
existingModuleIds={existingModuleIds}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* RIGHT: Summary sidebar (sticky) */}
|
||||
@@ -961,6 +965,8 @@ export function OrderWizard({
|
||||
initialOrder={initialOrder}
|
||||
prevStep={prevStep}
|
||||
linkedFeeProducts={linkedFeeProducts}
|
||||
orderNotes={orderNotes}
|
||||
setOrderNotes={setOrderNotes}
|
||||
/>
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user