fix: resolve typescript implicit any type errors in order-wizard.tsx
All checks were successful
Staging Build / build (push) Successful in 2m50s
All checks were successful
Staging Build / build (push) Successful in 2m50s
This commit is contained in:
@@ -1444,7 +1444,7 @@ export function OrderWizard({
|
||||
const sel = item.selections[cat.id]
|
||||
const selectedProds: Product[] = []
|
||||
if (cat.allow_multiselect && sel?.productIds) {
|
||||
sel.productIds.forEach(pId => {
|
||||
sel.productIds.forEach((pId: string) => {
|
||||
const p = products.find(prod => prod.id === pId)
|
||||
if (p) selectedProds.push(p)
|
||||
})
|
||||
@@ -1469,7 +1469,7 @@ export function OrderWizard({
|
||||
const actualPrice = isFree ? 0 : prod.base_price
|
||||
const catTotal =
|
||||
Number(actualPrice) +
|
||||
(sel?.moduleIds?.reduce((acc, mId) => {
|
||||
(sel?.moduleIds?.reduce((acc: number, mId: string) => {
|
||||
const mod = prod.modules?.find(m => m.id === mId)
|
||||
const qty = item.moduleQuantities[mId] || 1
|
||||
return acc + (Number(mod?.price ?? 0) * qty)
|
||||
@@ -1488,7 +1488,7 @@ export function OrderWizard({
|
||||
{sel?.moduleIds && sel.moduleIds.length > 0 && (
|
||||
<p className="text-xs text-slate-400 mt-0.5">
|
||||
Module: {sel.moduleIds
|
||||
.map(id => {
|
||||
.map((id: string) => {
|
||||
const mod = prod.modules?.find(m => m.id === id)
|
||||
const qty = item.moduleQuantities[id] || 1
|
||||
return mod ? `${mod.name}${mod.has_quantity ? ` (x${qty})` : ''}` : ''
|
||||
|
||||
Reference in New Issue
Block a user