fix(wizard): resolve build type errors and syntax in step-billing and step-software
All checks were successful
Staging Build / build (push) Successful in 2m54s
All checks were successful
Staging Build / build (push) Successful in 2m54s
This commit is contained in:
@@ -7,13 +7,14 @@ import { Product, ProductModule, Profile, EndCustomer, Order } from '@/lib/types
|
|||||||
import { submitOrder, updateOrder } from '@/lib/actions/orders'
|
import { submitOrder, updateOrder } from '@/lib/actions/orders'
|
||||||
import { createEndCustomer } from '@/lib/actions/end-customers'
|
import { createEndCustomer } from '@/lib/actions/end-customers'
|
||||||
import { Category } from '@/lib/types'
|
import { Category } from '@/lib/types'
|
||||||
|
import { Check } from 'lucide-react'
|
||||||
|
|
||||||
// Modular Step Components
|
// Modular Step Components
|
||||||
import { ProgressStepper } from './wizard/progress-stepper'
|
import { ProgressStepper } from './wizard/progress-stepper'
|
||||||
import { ToastNotification } from './wizard/toast-notification'
|
import { ToastNotification } from './wizard/toast-notification'
|
||||||
import { StepCustomer } from './wizard/step-customer'
|
import { StepCustomer } from './wizard/step-customer'
|
||||||
import { StepBilling } from './wizard/step-billing'
|
import { StepBilling } from './wizard/step-billing'
|
||||||
import { StepSoftware } from './wizard/step-software'
|
import { StepSoftware, CategoryIcon } from './wizard/step-software'
|
||||||
import { StepSummary } from './wizard/step-summary'
|
import { StepSummary } from './wizard/step-summary'
|
||||||
import { SummarySidebar } from './wizard/summary-sidebar'
|
import { SummarySidebar } from './wizard/summary-sidebar'
|
||||||
import { LicenseLookupPanel } from './wizard/license-lookup-panel'
|
import { LicenseLookupPanel } from './wizard/license-lookup-panel'
|
||||||
@@ -850,6 +851,7 @@ export function OrderWizard({
|
|||||||
nextStep={nextStep}
|
nextStep={nextStep}
|
||||||
/>
|
/>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
)}
|
||||||
{/* Step 3: Software Selector */}
|
{/* Step 3: Software Selector */}
|
||||||
{step === 3 && (
|
{step === 3 && (
|
||||||
<motion.div
|
<motion.div
|
||||||
@@ -875,7 +877,7 @@ export function OrderWizard({
|
|||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
{visibleCategories.map((cat) => {
|
{visibleCategories.map((cat) => {
|
||||||
const sel = selections[cat.id]
|
const sel = selections[cat.id]
|
||||||
const hasSelection = sel?.productIds?.length > 0 || !!sel?.productId
|
const hasSelection = (sel?.productIds && sel.productIds.length > 0) || !!sel?.productId
|
||||||
const isRequired = cat.is_required
|
const isRequired = cat.is_required
|
||||||
const isActive = activeCategoryId === cat.id
|
const isActive = activeCategoryId === cat.id
|
||||||
|
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ export function StepBilling({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
<CardFooter className="flex justify-between border-t border-white/10 pt-6">
|
<CardFooter className="flex justify-between border-t border-white/10 pt-6">
|
||||||
<Button variant="ghost" className="text-white" onClick={prevStep}>
|
<Button variant="ghost" className="text-white" onClick={prevStep}>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ interface StepSoftwareProps {
|
|||||||
activeCategoryId: string | null
|
activeCategoryId: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
function CategoryIcon({ icon, className }: { icon?: string | null; className?: string }) {
|
export function CategoryIcon({ icon, className }: { icon?: string | null; className?: string }) {
|
||||||
const LucideIcon = icon ? (Icons as any)[icon] : null
|
const LucideIcon = icon ? (Icons as any)[icon] : null
|
||||||
if (!LucideIcon) return <Icons.HelpCircle className={className} />
|
if (!LucideIcon) return <Icons.HelpCircle className={className} />
|
||||||
return <LucideIcon className={className} />
|
return <LucideIcon className={className} />
|
||||||
|
|||||||
Reference in New Issue
Block a user