IO-3604 Tech Job Drawer

Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
Allan Carr
2026-03-06 12:43:12 -08:00
parent 8980d3716b
commit 818aedf04f

View File

@@ -25,10 +25,7 @@ const mapDispatchToProps = (dispatch) => ({
});
export function TechLookupJobsDrawer({ bodyshop, setPrintCenterContext }) {
const breakpoints = Grid.useBreakpoint();
const selectedBreakpoint = Object.entries(breakpoints)
.filter(([, isOn]) => !!isOn)
.slice(-1)[0];
const screens = Grid.useBreakpoint();
const bpoints = {
xs: "100%",
@@ -36,10 +33,16 @@ export function TechLookupJobsDrawer({ bodyshop, setPrintCenterContext }) {
md: "100%",
lg: "100%",
xl: "90%",
xxl: "85%"
xxl: "90%"
};
const drawerPercentage = selectedBreakpoint ? bpoints[selectedBreakpoint[0]] : "100%";
let drawerPercentage = "100%";
if (screens.xxl) drawerPercentage = bpoints.xxl;
else if (screens.xl) drawerPercentage = bpoints.xl;
else if (screens.lg) drawerPercentage = bpoints.lg;
else if (screens.md) drawerPercentage = bpoints.md;
else if (screens.sm) drawerPercentage = bpoints.sm;
else if (screens.xs) drawerPercentage = bpoints.xs;
const location = useLocation();
const history = useNavigate();