reorder products order showing on monitor
This commit is contained in:
parent
41031b3b87
commit
fd35248b72
|
|
@ -88,18 +88,18 @@ function Login() {
|
||||||
setAccessToSodistore(response.data.accessToSodistoreMax);
|
setAccessToSodistore(response.data.accessToSodistoreMax);
|
||||||
setAccessToSodistoreGrid(response.data.accessToSodistoreGrid);
|
setAccessToSodistoreGrid(response.data.accessToSodistoreGrid);
|
||||||
setAccessToSodistorePro(response.data.accessToSodistorePro);
|
setAccessToSodistorePro(response.data.accessToSodistorePro);
|
||||||
if (response.data.accessToSalimax) {
|
if (response.data.accessToSodioHome) {
|
||||||
navigate(routes.installations);
|
navigate(routes.sodiohome_installations);
|
||||||
} else if (response.data.accessToSalidomo) {
|
|
||||||
navigate(routes.salidomo_installations);
|
|
||||||
} else if (response.data.accessToSodistoreMax) {
|
|
||||||
navigate(routes.sodistore_installations);
|
|
||||||
} else if (response.data.accessToSodistoreGrid) {
|
|
||||||
navigate(routes.sodistoregrid_installations);
|
|
||||||
} else if (response.data.accessToSodistorePro) {
|
} else if (response.data.accessToSodistorePro) {
|
||||||
navigate(routes.sodistorepro_installations);
|
navigate(routes.sodistorepro_installations);
|
||||||
|
} else if (response.data.accessToSodistoreGrid) {
|
||||||
|
navigate(routes.sodistoregrid_installations);
|
||||||
|
} else if (response.data.accessToSodistoreMax) {
|
||||||
|
navigate(routes.sodistore_installations);
|
||||||
|
} else if (response.data.accessToSalimax) {
|
||||||
|
navigate(routes.installations);
|
||||||
} else {
|
} else {
|
||||||
navigate(routes.sodiohome_installations);
|
navigate(routes.salidomo_installations);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -59,13 +59,13 @@ function TreeInformation(props: TreeInformationProps) {
|
||||||
fetchAllInstallations
|
fetchAllInstallations
|
||||||
} = installationContext;
|
} = installationContext;
|
||||||
|
|
||||||
const [product, setProduct] = useState('Salimax');
|
const [product, setProduct] = useState('SodistoreHome');
|
||||||
|
|
||||||
const handleChangeInstallationChoice = (e) => {
|
const handleChangeInstallationChoice = (e) => {
|
||||||
setProduct(e.target.value); // Directly update the product state
|
setProduct(e.target.value); // Directly update the product state
|
||||||
};
|
};
|
||||||
|
|
||||||
const ProductTypes = ['Salimax', 'Salidomo', 'SodistoreHome', 'SodistoreMax', 'SodistoreGrid', 'SodistorePro'];
|
const ProductTypes = ['SodistoreHome', 'SodistorePro', 'SodistoreGrid', 'SodistoreMax', 'Salimax', 'Salidomo'];
|
||||||
const ProductDisplayNames: Record<string, string> = {
|
const ProductDisplayNames: Record<string, string> = {
|
||||||
'SodistoreHome': 'Sodistore Home',
|
'SodistoreHome': 'Sodistore Home',
|
||||||
'SodistoreMax': 'Sodistore Max',
|
'SodistoreMax': 'Sodistore Max',
|
||||||
|
|
|
||||||
|
|
@ -186,86 +186,6 @@ function SidebarMenu() {
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<SubMenuWrapper>
|
<SubMenuWrapper>
|
||||||
{accessToSalimax && (
|
|
||||||
<List component="div">
|
|
||||||
<ListItem component="div">
|
|
||||||
<Button
|
|
||||||
disableRipple
|
|
||||||
component={RouterLink}
|
|
||||||
onClick={closeSidebar}
|
|
||||||
to="/installations"
|
|
||||||
startIcon={<BrightnessLowTwoToneIcon />}
|
|
||||||
>
|
|
||||||
<Box sx={{ marginTop: '3px' }}>
|
|
||||||
<FormattedMessage id="salimax" defaultMessage="Salimax" />
|
|
||||||
</Box>
|
|
||||||
</Button>
|
|
||||||
</ListItem>
|
|
||||||
</List>
|
|
||||||
)}
|
|
||||||
{accessToSodistore && (
|
|
||||||
<List component="div">
|
|
||||||
<ListItem component="div">
|
|
||||||
<Button
|
|
||||||
disableRipple
|
|
||||||
component={RouterLink}
|
|
||||||
onClick={closeSidebar}
|
|
||||||
to="/sodistore_installations"
|
|
||||||
startIcon={<BrightnessLowTwoToneIcon />}
|
|
||||||
>
|
|
||||||
<Box sx={{ marginTop: '3px' }}>
|
|
||||||
<FormattedMessage
|
|
||||||
id="sodistore"
|
|
||||||
defaultMessage="Sodistore Max"
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
</Button>
|
|
||||||
</ListItem>
|
|
||||||
</List>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{accessToSalidomo && (
|
|
||||||
<List component="div">
|
|
||||||
<ListItem component="div">
|
|
||||||
<Button
|
|
||||||
disableRipple
|
|
||||||
component={RouterLink}
|
|
||||||
onClick={closeSidebar}
|
|
||||||
to="/salidomo_installations"
|
|
||||||
startIcon={<BrightnessLowTwoToneIcon />}
|
|
||||||
>
|
|
||||||
<Box sx={{ marginTop: '3px' }}>
|
|
||||||
<FormattedMessage
|
|
||||||
id="salidomo"
|
|
||||||
defaultMessage="Salidomo"
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
</Button>
|
|
||||||
</ListItem>
|
|
||||||
</List>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{accessToSodistoreGrid && (
|
|
||||||
<List component="div">
|
|
||||||
<ListItem component="div">
|
|
||||||
<Button
|
|
||||||
disableRipple
|
|
||||||
component={RouterLink}
|
|
||||||
onClick={closeSidebar}
|
|
||||||
to="/sodistoregrid_installations"
|
|
||||||
startIcon={<BrightnessLowTwoToneIcon />}
|
|
||||||
>
|
|
||||||
<Box sx={{ marginTop: '3px' }}>
|
|
||||||
<FormattedMessage
|
|
||||||
id="sodistoregrid"
|
|
||||||
defaultMessage="Sodistore Grid"
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
</Button>
|
|
||||||
</ListItem>
|
|
||||||
</List>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{accessToSodiohome && (
|
{accessToSodiohome && (
|
||||||
<List component="div">
|
<List component="div">
|
||||||
<ListItem component="div">
|
<ListItem component="div">
|
||||||
|
|
@ -307,6 +227,87 @@ function SidebarMenu() {
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{accessToSodistoreGrid && (
|
||||||
|
<List component="div">
|
||||||
|
<ListItem component="div">
|
||||||
|
<Button
|
||||||
|
disableRipple
|
||||||
|
component={RouterLink}
|
||||||
|
onClick={closeSidebar}
|
||||||
|
to="/sodistoregrid_installations"
|
||||||
|
startIcon={<BrightnessLowTwoToneIcon />}
|
||||||
|
>
|
||||||
|
<Box sx={{ marginTop: '3px' }}>
|
||||||
|
<FormattedMessage
|
||||||
|
id="sodistoregrid"
|
||||||
|
defaultMessage="Sodistore Grid"
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
</Button>
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{accessToSodistore && (
|
||||||
|
<List component="div">
|
||||||
|
<ListItem component="div">
|
||||||
|
<Button
|
||||||
|
disableRipple
|
||||||
|
component={RouterLink}
|
||||||
|
onClick={closeSidebar}
|
||||||
|
to="/sodistore_installations"
|
||||||
|
startIcon={<BrightnessLowTwoToneIcon />}
|
||||||
|
>
|
||||||
|
<Box sx={{ marginTop: '3px' }}>
|
||||||
|
<FormattedMessage
|
||||||
|
id="sodistore"
|
||||||
|
defaultMessage="Sodistore Max"
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
</Button>
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{accessToSalimax && (
|
||||||
|
<List component="div">
|
||||||
|
<ListItem component="div">
|
||||||
|
<Button
|
||||||
|
disableRipple
|
||||||
|
component={RouterLink}
|
||||||
|
onClick={closeSidebar}
|
||||||
|
to="/installations"
|
||||||
|
startIcon={<BrightnessLowTwoToneIcon />}
|
||||||
|
>
|
||||||
|
<Box sx={{ marginTop: '3px' }}>
|
||||||
|
<FormattedMessage id="salimax" defaultMessage="Salimax" />
|
||||||
|
</Box>
|
||||||
|
</Button>
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{accessToSalidomo && (
|
||||||
|
<List component="div">
|
||||||
|
<ListItem component="div">
|
||||||
|
<Button
|
||||||
|
disableRipple
|
||||||
|
component={RouterLink}
|
||||||
|
onClick={closeSidebar}
|
||||||
|
to="/salidomo_installations"
|
||||||
|
startIcon={<BrightnessLowTwoToneIcon />}
|
||||||
|
>
|
||||||
|
<Box sx={{ marginTop: '3px' }}>
|
||||||
|
<FormattedMessage
|
||||||
|
id="salidomo"
|
||||||
|
defaultMessage="Salidomo"
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
</Button>
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
)}
|
||||||
</SubMenuWrapper>
|
</SubMenuWrapper>
|
||||||
</List>
|
</List>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue