added the sites page and all other required imports for it to work, also fixed the map card

This commit is contained in:
csawatzky 2025-04-03 12:54:00 -06:00
parent c5afdc2c3d
commit 3990dfbf4f
14 changed files with 1595 additions and 21 deletions

View file

@ -45,7 +45,7 @@ const {terminals, currentTerminal } = props;
const classes = useStyles();
const [gateDialog, setGateDialog] = useState(false);
const [tablePage, setTablePage] = useState(0)
const [pageSize, setPageSize] = useState(5)
const [pageSize, setPageSize] = useState(10)
const [total, setTotal] = useState(0)
const [terminalMap, setTerminalMap] = useState<Map<string, string>>(new Map<string, string>());
const gateAPI = useGateAPI();
@ -77,11 +77,11 @@ const {terminals, currentTerminal } = props;
setGates(resp.data.gates.map(gate => Gate.create(gate)))
setTotal(resp.data.total)
})
},[currentTerminal, search])
},[currentTerminal, search, pageSize, tablePage])
useEffect(() => {
loadGates()
},[currentTerminal, search])
},[loadGates])
const handleChange = (event: any) => {
setPageSize(event.target.value);
@ -213,7 +213,7 @@ const {terminals, currentTerminal } = props;
renderGutter={isMobile || props.useMobile ? gutter : undefined}
gutterPadding={0}
rows={gates}
setPage={(page) => {console.log(page)}}
setPage={(page) => {setTablePage(page)}}
total={total}
onRowClick={(gate) => {goToGate(gate)}}
hideKeys={isMobile || props.useMobile}