Skip to content

Commit

Permalink
fix: order detail re-order and add to shopping list error
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlLiu2023 authored and kris-liu-smile committed Apr 18, 2023
1 parent e0da2f1 commit 09d1f24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions apps/storefront/src/pages/orderDetail/components/OrderDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ export const OrderDialog: (props: OrderDialogProps) => ReactElement = ({
quantity: parseInt(`${product.editQuantity}`, 10) || 1,
productId: product.product_id,
variantId: product.variant_id,
optionSelections: (product.optionList || []).map((option) => ({
optionId: option.optionId,
optionValue: option.optionValue,
optionSelections: (product.product_options || []).map((option) => ({
optionId: option.product_option_id,
optionValue: option.value,
})),
})

Expand Down Expand Up @@ -294,17 +294,17 @@ export const OrderDialog: (props: OrderDialogProps) => ReactElement = ({
product_id: productId,
variant_id: variantId,
editQuantity,
optionList,
product_options: productOptions,
} = product

return {
productId: +productId,
variantId,
quantity: +editQuantity,
optionList: optionList.map((option) => {
optionList: productOptions.map((option) => {
const {
optionId,
optionValue,
product_option_id: optionId,
value: optionValue,
} = option

return {
Expand Down
2 changes: 1 addition & 1 deletion apps/storefront/src/pages/quote/QuoteDraft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ const QuoteDraft = ({
}

const isComplete = Object.keys(saveInfo.contactInfo).every((key: string) => {
if (key === 'phoneNumber') {
if (key === 'phoneNumber' || key === 'companyName') {
return true
}
return !!saveInfo.contactInfo[key]
Expand Down

0 comments on commit 09d1f24

Please sign in to comment.