Skip to content

Commit

Permalink
fix: quote items are not clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlLiu2023 committed Jun 6, 2023
1 parent 69cf780 commit 378a50f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 27 deletions.
42 changes: 21 additions & 21 deletions apps/storefront/src/components/layout/B3Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,33 +147,33 @@ export default function B3Nav({ closeSidebar }: B3NavProps) {
if (item.name === 'Quotes') {
const { pathname } = location
return (
<Badge
badgeContent={
quoteDetailHasNewMessages && pathname.includes('quoteDetail')
? ''
: 0
}
variant="dot"
sx={{
width: '100%',
'& .MuiBadge-badge.MuiBadge-dot': {
width: 8,
height: 8,
bgcolor: '#FFFFFF',
right: 14,
top: 22,
},
}}
>
<ListItem key={item.path} disablePadding>
<ListItem key={item.path} disablePadding>
<Badge
badgeContent={
quoteDetailHasNewMessages && pathname.includes('quoteDetail')
? ''
: 0
}
variant="dot"
sx={{
width: '100%',
'& .MuiBadge-badge.MuiBadge-dot': {
width: 8,
height: 8,
bgcolor: '#FFFFFF',
right: 14,
top: 22,
},
}}
>
<ListItemButton
onClick={() => handleClick(item)}
selected={activePath(item.path)}
>
<ListItemText primary={item.name} />
</ListItemButton>
</ListItem>
</Badge>
</Badge>
</ListItem>
)
}
return (
Expand Down
14 changes: 11 additions & 3 deletions apps/storefront/src/pages/quote/components/QuoteDetailTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { forwardRef, Ref, useImperativeHandle, useRef, useState } from 'react'
import { Box, styled, Typography } from '@mui/material'
import { Box, Link, styled, Typography } from '@mui/material'

import { B3PaginationTable } from '@/components/table/B3PaginationTable'
import { TableColumnItem } from '@/components/table/B3Table'
Expand Down Expand Up @@ -128,8 +128,16 @@ function QuoteDetailTable(props: ShoppingDetailTableProps, ref: Ref<unknown>) {
loading="lazy"
/>
<Box>
<Typography variant="body1" color="#212121">
{row.productName}
<Typography variant="body1">
<Link
href={row.productsSearch?.productUrl || '#'}
underline="none"
sx={{
color: '#212121',
}}
>
{row.productName}
</Link>
</Typography>
<Typography variant="body1" color="#616161">
{row.sku}
Expand Down
14 changes: 11 additions & 3 deletions apps/storefront/src/pages/quote/components/QuoteTable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef, Ref, useImperativeHandle, useRef, useState } from 'react'
import { Delete, Edit } from '@mui/icons-material'
import { Box, styled, TextField, Typography } from '@mui/material'
import { Box, Link, styled, TextField, Typography } from '@mui/material'
import { ceil } from 'lodash'

import { B3PaginationTable } from '@/components/table/B3PaginationTable'
Expand Down Expand Up @@ -334,8 +334,16 @@ function QuoteTable(props: ShoppingDetailTableProps, ref: Ref<unknown>) {
loading="lazy"
/>
<Box>
<Typography variant="body1" color="#212121">
{row.productName}
<Typography variant="body1">
<Link
href={row.productsSearch?.productUrl || '#'}
underline="none"
sx={{
color: '#212121',
}}
>
{row.productName}
</Link>
</Typography>
<Typography variant="body1" color="#616161">
{row.variantSku}
Expand Down

0 comments on commit 378a50f

Please sign in to comment.