feat(ui): add product detail view button to Extras and Product selectors
Enhance the ExtrasSelector and ProductSelector components by introducing a button that links to detailed product views. The button features a ZoomInIcon and is styled for a consistent user experience. This addition improves navigation and accessibility for users seeking more information on products.
This commit is contained in:
@@ -3,7 +3,11 @@ import Grid from '@mui/material/Grid';
|
|||||||
import CardMedia from '@mui/material/CardMedia';
|
import CardMedia from '@mui/material/CardMedia';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
|
import Stack from '@mui/material/Stack';
|
||||||
import CircularProgress from '@mui/material/CircularProgress';
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
import IconButton from '@mui/material/IconButton';
|
||||||
|
import ZoomInIcon from '@mui/icons-material/ZoomIn';
|
||||||
|
|
||||||
class ExtrasSelector extends Component {
|
class ExtrasSelector extends Component {
|
||||||
formatPrice(price) {
|
formatPrice(price) {
|
||||||
@@ -149,6 +153,18 @@ class ExtrasSelector extends Component {
|
|||||||
✓ Ausgewählt
|
✓ Ausgewählt
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
<Stack direction="row" spacing={1} justifyContent="center">
|
||||||
|
<IconButton
|
||||||
|
component={Link}
|
||||||
|
to={`/Artikel/${extra.seoName}`}
|
||||||
|
size="small"
|
||||||
|
aria-label="Produktdetails anzeigen"
|
||||||
|
sx={{ mr: 1, color: 'text.secondary' }}
|
||||||
|
onClick={(event) => event.stopPropagation()}
|
||||||
|
>
|
||||||
|
<ZoomInIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import CardMedia from '@mui/material/CardMedia';
|
|||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Chip from '@mui/material/Chip';
|
import Chip from '@mui/material/Chip';
|
||||||
|
import Stack from '@mui/material/Stack';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
import IconButton from '@mui/material/IconButton';
|
||||||
|
import ZoomInIcon from '@mui/icons-material/ZoomIn';
|
||||||
|
|
||||||
class ProductSelector extends Component {
|
class ProductSelector extends Component {
|
||||||
formatPrice(price) {
|
formatPrice(price) {
|
||||||
@@ -65,6 +69,19 @@ class ProductSelector extends Component {
|
|||||||
✓ Ausgewählt
|
✓ Ausgewählt
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<Stack direction="row" spacing={1} justifyContent="center">
|
||||||
|
<IconButton
|
||||||
|
component={Link}
|
||||||
|
to={`/Artikel/${product.seoName}`}
|
||||||
|
size="small"
|
||||||
|
aria-label="Produktdetails anzeigen"
|
||||||
|
sx={{ mr: 1, color: 'text.secondary' }}
|
||||||
|
onClick={(event) => event.stopPropagation()}
|
||||||
|
>
|
||||||
|
<ZoomInIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -13,10 +13,14 @@ import {
|
|||||||
Grid,
|
Grid,
|
||||||
CardMedia,
|
CardMedia,
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
|
Stack,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import ShoppingCartIcon from '@mui/icons-material/ShoppingCart';
|
import ShoppingCartIcon from '@mui/icons-material/ShoppingCart';
|
||||||
import { TentShapeSelector, ExtrasSelector } from '../components/configurator/index.js';
|
import { TentShapeSelector, ExtrasSelector } from '../components/configurator/index.js';
|
||||||
import { tentShapes } from '../data/configuratorData.js';
|
import { tentShapes } from '../data/configuratorData.js';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
import IconButton from '@mui/material/IconButton';
|
||||||
|
import ZoomInIcon from '@mui/icons-material/ZoomIn';
|
||||||
|
|
||||||
function setCachedCategoryData(categoryId, data) {
|
function setCachedCategoryData(categoryId, data) {
|
||||||
if (!window.productCache) {
|
if (!window.productCache) {
|
||||||
@@ -800,6 +804,18 @@ class GrowTentKonfigurator extends Component {
|
|||||||
✓ Ausgewählt
|
✓ Ausgewählt
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
<Stack direction="row" spacing={1} justifyContent="center">
|
||||||
|
<IconButton
|
||||||
|
component={Link}
|
||||||
|
to={`/Artikel/${product.seoName}`}
|
||||||
|
size="small"
|
||||||
|
aria-label="Produktdetails anzeigen"
|
||||||
|
sx={{ mr: 1, color: 'text.secondary' }}
|
||||||
|
onClick={(event) => event.stopPropagation()}
|
||||||
|
>
|
||||||
|
<ZoomInIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -927,6 +943,18 @@ class GrowTentKonfigurator extends Component {
|
|||||||
✓ Ausgewählt
|
✓ Ausgewählt
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
<Stack direction="row" spacing={1} justifyContent="center">
|
||||||
|
<IconButton
|
||||||
|
component={Link}
|
||||||
|
to={`/Artikel/${lamp.seoName}`}
|
||||||
|
size="small"
|
||||||
|
aria-label="Produktdetails anzeigen"
|
||||||
|
sx={{ mr: 1, color: 'text.secondary' }}
|
||||||
|
onClick={(event) => event.stopPropagation()}
|
||||||
|
>
|
||||||
|
<ZoomInIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -1092,6 +1120,18 @@ class GrowTentKonfigurator extends Component {
|
|||||||
✓ Ausgewählt
|
✓ Ausgewählt
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
<Stack direction="row" spacing={1} justifyContent="center">
|
||||||
|
<IconButton
|
||||||
|
component={Link}
|
||||||
|
to={`/Artikel/${ventilation.seoName}`}
|
||||||
|
size="small"
|
||||||
|
aria-label="Produktdetails anzeigen"
|
||||||
|
sx={{ mr: 1, color: 'text.secondary' }}
|
||||||
|
onClick={(event) => event.stopPropagation()}
|
||||||
|
>
|
||||||
|
<ZoomInIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user