Skip to content

Commit

Permalink
feat: expired quotes cannt checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
b3aton authored and kris-liu-smile committed Mar 10, 2023
1 parent 943d9bf commit 11d4d70
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 29 deletions.
1 change: 1 addition & 0 deletions apps/storefront/src/pages/quote/QuoteDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ const QuoteDetail = () => {
quoteId={quoteDetail.id}
role={role}
isAgenting={isAgenting}
status={quoteDetail.status}
/>
)
}
Expand Down
65 changes: 36 additions & 29 deletions apps/storefront/src/pages/quote/components/QuoteDetailFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ interface QuoteDetailFooterProps {
quoteId: string,
role: string | number,
isAgenting: boolean,
status: number,
}

const QuoteDetailFooter = (props: QuoteDetailFooterProps) => {
const {
quoteId,
role,
isAgenting,
status,
} = props
const [isMobile] = useMobile()

Expand Down Expand Up @@ -60,35 +62,40 @@ const QuoteDetailFooter = (props: QuoteDetailFooterProps) => {
}

return (
<Box
sx={{
position: 'fixed',
bottom: isMobile && isAgenting ? '52px' : 0,
left: 0,
backgroundColor: '#fff',
width: '100%',
padding: '0.8rem 1rem',
height: 'auto',
display: 'flex',
zIndex: '999',
justifyContent: isMobile ? 'center' : 'flex-end',
displayPrint: 'none',
...containerStyle,
}}
>
<Button
variant="contained"
onClick={() => {
handleQuoteCheckout()
}}
sx={{
width: isMobile ? '100%' : 'auto',
}}
>
Proceed to checkout
</Button>
</Box>

<>
{
(status !== 5) && (
<Box
sx={{
position: 'fixed',
bottom: isMobile && isAgenting ? '52px' : 0,
left: 0,
backgroundColor: '#fff',
width: '100%',
padding: '0.8rem 1rem',
height: 'auto',
display: 'flex',
zIndex: '999',
justifyContent: isMobile ? 'center' : 'flex-end',
displayPrint: 'none',
...containerStyle,
}}
>
<Button
variant="contained"
onClick={() => {
handleQuoteCheckout()
}}
sx={{
width: isMobile ? '100%' : 'auto',
}}
>
Proceed to checkout
</Button>
</Box>
)
}
</>
)
}

Expand Down

0 comments on commit 11d4d70

Please sign in to comment.