Skip to content

Commit

Permalink
feat: quote shipping bun1306 (#861)
Browse files Browse the repository at this point in the history
* feat: quote shipping option updates

* feat: quote shipping option updates2
  • Loading branch information
BrianJiang2021 authored and libruce committed Dec 27, 2023
1 parent 790d362 commit b7aad70
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
38 changes: 36 additions & 2 deletions apps/storefront/src/pages/quote/components/QuoteDetailSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function QuoteDetailSummary(props: QuoteDetailSummaryProps) {
{priceFormat(getCurrentPrice(quotedSubtotal, quoteDetailTax))}
</Typography>
</Grid>
{+status !== 1 || quoteDetail?.shippingMethod?.id ? (
{quoteDetail?.shippingMethod?.id ? (
<>
<Grid
container
Expand All @@ -121,7 +121,9 @@ export default function QuoteDetailSummary(props: QuoteDetailSummaryProps) {
}}
>
<Typography>
{b3Lang('quoteDetail.summary.shipping')}
{`${b3Lang('quoteDetail.summary.shipping')}(${
quoteDetail?.shippingMethod?.description || ''
})`}
</Typography>
<Typography>{priceFormat(+shipping)}</Typography>
</Grid>
Expand All @@ -137,6 +139,38 @@ export default function QuoteDetailSummary(props: QuoteDetailSummaryProps) {
</Grid>
</>
) : null}

{quoteDetail?.salesRepEmail &&
!quoteDetail?.shippingMethod?.id &&
(+status === 1 || +status === 5) ? (
<>
<Grid
container
justifyContent="space-between"
sx={{
margin: '4px 0',
flexWrap: 'nowrap',
}}
>
<Typography>
{`${b3Lang('quoteDetail.summary.shipping')}(${b3Lang(
'quoteDetail.summary.quoteCheckout'
)})`}
</Typography>
<Typography>TBD</Typography>
</Grid>
<Grid
container
justifyContent="space-between"
sx={{
margin: '4px 0',
}}
>
<Typography>{b3Lang('quoteDetail.summary.tax')}</Typography>
<Typography>TBD</Typography>
</Grid>
</>
) : null}
<Grid
container
justifyContent="space-between"
Expand Down
1 change: 1 addition & 0 deletions packages/lang/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@
"quoteDetail.header.print": "Print",
"quoteDetail.header.downloadPDF": "DownLoad pdf",
"quoteDetail.summary.quoteSummary": "Quote summary",
"quoteDetail.summary.quoteCheckout": "Customer choice at checkout",
"quoteDetail.summary.originalSubtotal": "Original subtotal",
"quoteDetail.summary.discountAmount": "Discount amount",
"quoteDetail.summary.quotedSubtotal": "Quoted subtotal",
Expand Down

0 comments on commit b7aad70

Please sign in to comment.