Skip to content

Commit

Permalink
feat: quote hide or show checkout and disccount
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJiang2021 authored and libruce committed Jan 22, 2024
1 parent bf58aa3 commit 5ef4df0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
19 changes: 11 additions & 8 deletions apps/storefront/src/pages/quote/QuoteDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -534,14 +534,17 @@ function QuoteDetail() {
</Grid>
</Grid>

{+role !== 2 && +quoteDetail.status !== 4 && isShowFooter && (
<QuoteDetailFooter
quoteId={quoteDetail.id}
role={role}
isAgenting={isAgenting}
status={quoteDetail.status}
/>
)}
{+role !== 2 &&
+quoteDetail.status !== 4 &&
isShowFooter &&
quoteDetail?.allowCheckout && (
<QuoteDetailFooter
quoteId={quoteDetail.id}
role={role}
isAgenting={isAgenting}
status={quoteDetail.status}
/>
)}
</Box>
</B3Sping>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export default function QuoteDetailSummary(props: QuoteDetailSummaryProps) {
justifyContent="space-between"
sx={{
margin: '4px 0',
display: quoteDetail?.displayDiscount ? '' : 'none',
}}
>
<Typography>
Expand Down
2 changes: 2 additions & 0 deletions apps/storefront/src/shared/service/b2b/graphql/quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ const getQuoteInfo = (data: { id: number; date: string }) => `{
quoteUrl,
channelId,
channelName,
allowCheckout,
displayDiscount,
}
}`

Expand Down

0 comments on commit 5ef4df0

Please sign in to comment.