Compare commits

..

1 Commits

Author SHA1 Message Date
Allan Carr
818aedf04f IO-3604 Tech Job Drawer
Signed-off-by: Allan Carr <allan@imexsystems.ca>
2026-03-06 12:43:12 -08:00
3 changed files with 10 additions and 14 deletions

View File

@@ -25,7 +25,6 @@ const Eula = ({ currentEula, currentUser, acceptEula }) => {
const handleScroll = useCallback( const handleScroll = useCallback(
(e) => { (e) => {
if (!e.target) return;
const bottom = e.target.scrollHeight - 100 <= e.target.scrollTop + e.target.clientHeight; const bottom = e.target.scrollHeight - 100 <= e.target.scrollTop + e.target.clientHeight;
if (bottom && !hasEverScrolledToBottom) { if (bottom && !hasEverScrolledToBottom) {
setHasEverScrolledToBottom(true); setHasEverScrolledToBottom(true);
@@ -37,9 +36,7 @@ const Eula = ({ currentEula, currentUser, acceptEula }) => {
); );
useEffect(() => { useEffect(() => {
if (markdownCardRef.current) { handleScroll({ target: markdownCardRef.current });
handleScroll({ target: markdownCardRef.current });
}
}, [handleScroll]); }, [handleScroll]);
const handleChange = useCallback(() => { const handleChange = useCallback(() => {

View File

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

View File

@@ -1375,9 +1375,6 @@ export const QUERY_JOB_FOR_DUPE = gql`
agt_ph2x agt_ph2x
area_of_damage area_of_damage
cat_no cat_no
cieca_pfl
cieca_pfo
cieca_pft
cieca_stl cieca_stl
cieca_ttl cieca_ttl
clm_addr1 clm_addr1
@@ -1455,7 +1452,6 @@ export const QUERY_JOB_FOR_DUPE = gql`
labor_rate_desc labor_rate_desc
labor_rate_id labor_rate_id
local_tax_rate local_tax_rate
materials
other_amount_payable other_amount_payable
owner_owing owner_owing
ownerid ownerid