Merge branch 'dev_environment' of gitlab.com:brandx/bxt-app into dev_environment
This commit is contained in:
commit
4df5e068da
5 changed files with 28 additions and 13 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -10770,7 +10770,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/protobuf-ts": {
|
"node_modules/protobuf-ts": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#9074fe327f799b1faef10374bd7ede55f3eb6a17",
|
"resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#229e52a3f667df826cbd2e9b9de73fd0de70ab0c",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"protobufjs": "^6.8.8"
|
"protobufjs": "^6.8.8"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -980,7 +980,7 @@ export default function BinSVGV2(props: Props) {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{fillPercentage > 0 &&
|
{fillPercentage > 0 &&
|
||||||
(inventoryControl === pond.BinInventoryControl.BIN_INVENTORY_CONTROL_MANUAL ||
|
(inventoryControl !== pond.BinInventoryControl.BIN_INVENTORY_CONTROL_AUTOMATIC ||
|
||||||
!inventoryControl) ? (
|
!inventoryControl) ? (
|
||||||
inventoryLayer()
|
inventoryLayer()
|
||||||
) : (
|
) : (
|
||||||
|
|
@ -1024,7 +1024,7 @@ export default function BinSVGV2(props: Props) {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{fillPercentage > 0 &&
|
{fillPercentage > 0 &&
|
||||||
(inventoryControl === pond.BinInventoryControl.BIN_INVENTORY_CONTROL_MANUAL ||
|
(inventoryControl !== pond.BinInventoryControl.BIN_INVENTORY_CONTROL_AUTOMATIC ||
|
||||||
!inventoryControl) &&
|
!inventoryControl) &&
|
||||||
inventoryLayer()}
|
inventoryLayer()}
|
||||||
<ellipse
|
<ellipse
|
||||||
|
|
|
||||||
|
|
@ -827,7 +827,7 @@ export default function BinSettings(props: Props) {
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
justifyContent="space-between">
|
justifyContent="space-between">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Typography>Control</Typography>
|
<Typography>Inventory Control</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Typography>{inventoryControlLabel(inventoryControl)}</Typography>
|
<Typography>{inventoryControlLabel(inventoryControl)}</Typography>
|
||||||
|
|
@ -852,6 +852,11 @@ export default function BinSettings(props: Props) {
|
||||||
control={<Radio />}
|
control={<Radio />}
|
||||||
label={"Auto"}
|
label={"Auto"}
|
||||||
/>
|
/>
|
||||||
|
<FormControlLabel
|
||||||
|
value={pond.BinInventoryControl.BIN_INVENTORY_CONTROL_AUTOMATIC_LIDAR}
|
||||||
|
control={<Radio />}
|
||||||
|
label={"Auto (Lidar)"}
|
||||||
|
/>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</AccordionDetails>
|
</AccordionDetails>
|
||||||
{inventoryControl === pond.BinInventoryControl.BIN_INVENTORY_CONTROL_AUTOMATIC &&
|
{inventoryControl === pond.BinInventoryControl.BIN_INVENTORY_CONTROL_AUTOMATIC &&
|
||||||
|
|
|
||||||
|
|
@ -583,14 +583,17 @@ export default function BinVisualizer(props: Props) {
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body2">{isEmpty ? "" : getCapacityDisplay(capacity)}</Typography>
|
<Typography variant="body2">{isEmpty ? "" : getCapacityDisplay(capacity)}</Typography>
|
||||||
</div>
|
</div>
|
||||||
{!isEmpty && lidarBushels && (
|
{!isEmpty &&
|
||||||
<div style={{ display: "flex", flexDirection: "row" }}>
|
lidarBushels &&
|
||||||
<Typography variant="body2">
|
bin.inventoryControl() !==
|
||||||
{(lidarBushels ? getVolume(lidarBushels) : 0).toLocaleString()} /{" "}
|
pond.BinInventoryControl.BIN_INVENTORY_CONTROL_AUTOMATIC_LIDAR && (
|
||||||
{(capacity ? getVolume(capacity) : 0).toLocaleString()} bu (est)
|
<div style={{ display: "flex", flexDirection: "row" }}>
|
||||||
</Typography>
|
<Typography variant="body2">
|
||||||
</div>
|
{(lidarBushels ? getVolume(lidarBushels) : 0).toLocaleString()} /{" "}
|
||||||
)}
|
{(capacity ? getVolume(capacity) : 0).toLocaleString()} bu (est)
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,7 @@ export default function Terminals(props: Props) {
|
||||||
const [teamSharing, setTeamSharing] = useState(false);
|
const [teamSharing, setTeamSharing] = useState(false);
|
||||||
const [baseShareDialog, setBaseShareDialog] = useState(false);
|
const [baseShareDialog, setBaseShareDialog] = useState(false);
|
||||||
const [removeSelfDialog, setRemoveSelfDialog] = useState(false);
|
const [removeSelfDialog, setRemoveSelfDialog] = useState(false);
|
||||||
|
const [loading, setLoading] = useState(false)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (currentTerminal) {
|
if (currentTerminal) {
|
||||||
|
|
@ -178,13 +179,18 @@ export default function Terminals(props: Props) {
|
||||||
}, [props.terminal]);
|
}, [props.terminal]);
|
||||||
|
|
||||||
const load = useCallback(() => {
|
const load = useCallback(() => {
|
||||||
|
if(loading) return
|
||||||
|
setLoading(true)
|
||||||
terminalAPI.listTerminals(200, 0, "asc", "name").then(resp => {
|
terminalAPI.listTerminals(200, 0, "asc", "name").then(resp => {
|
||||||
setTerminals(resp.data.terminals.map(a => Terminal.any(a)));
|
setTerminals(resp.data.terminals.map(a => Terminal.any(a)));
|
||||||
|
}).catch(err => {
|
||||||
|
console.log("There was a problem loading Terminals")
|
||||||
|
}).finally(() => {
|
||||||
|
setLoading(false)
|
||||||
})
|
})
|
||||||
}, [terminalAPI, openSnack]); //eslint-disable-line react-hooks/exhaustive-deps
|
}, [terminalAPI, openSnack]); //eslint-disable-line react-hooks/exhaustive-deps
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//TODO: will need to figure out a way to prevent multiple api calls when loading the page
|
|
||||||
load();
|
load();
|
||||||
}, [load]);
|
}, [load]);
|
||||||
|
|
||||||
|
|
@ -312,6 +318,7 @@ export default function Terminals(props: Props) {
|
||||||
const terminalTabs = () => {
|
const terminalTabs = () => {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
|
{/* TODO: convert this to use DraggableTabs */}
|
||||||
<Tabs
|
<Tabs
|
||||||
variant="scrollable"
|
variant="scrollable"
|
||||||
scrollButtons="auto"
|
scrollButtons="auto"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue