| | |
| | | import { NotificationProvider, useNotification } from './Notification'; |
| | | import Insight from "./insight"; |
| | | import Device from "./Device"; |
| | | import AreaList from "./AreaList"; |
| | | import Settings from "./settings"; |
| | | import Batch from "./batch"; |
| | | import AreaSettings from "./areaSettings"; |
| | |
| | | import PulseSignal from "../page/components/PulseSignal"; |
| | | import FakeFab from "./header/FakeFab"; |
| | | import RouteFab from "./header/RouteFab"; |
| | | import AreaFab from "./header/AreaFab"; |
| | | import MoreOperate from "./header/MoreOperate"; |
| | | |
| | | let player; |
| | |
| | | const [settingsVisible, setSettingsVisible] = useState(false); |
| | | const [batchSelectionVisible, setBatchSelectionVisible] = useState(false); |
| | | const [areaSettingsVisible, setAreaSettingsVisible] = useState(false); |
| | | const [areaListVisible, setAreaListVisible] = useState(false); |
| | | const [areaDrawing, setAreaDrawing] = useState(false); |
| | | |
| | | const [curSprite, setCurSprite] = useState(null); |
| | |
| | | |
| | | const [rcsStatus, setRcsStatus] = useState(null); |
| | | const [showRoutes, setShowRoutes] = useState(false); |
| | | const [showAreas, setShowAreas] = useState(false); |
| | | const [curZone, setCurZone] = useState(() => { |
| | | const storedValue = localStorage.getItem('curZone'); |
| | | return storedValue !== null ? JSON.parse(storedValue) : null; |
| | |
| | | setBatchSelectionVisible(false); |
| | | setAreaSettingsVisible(false); |
| | | setAreaDrawing(false); |
| | | setAreaListVisible(false); |
| | | Tool.cancelAreaDrawing(); |
| | | Tool.hideAreas(curZone, setShowAreas); |
| | | |
| | | setCurSprite(null); |
| | | setBatchSprites([]); |
| | |
| | | {mode === MAP_MODE.AREA_MODE && ( |
| | | <> |
| | | <Button |
| | | variant="outlined" |
| | | onClick={() => setAreaListVisible(!areaListVisible)} |
| | | sx={{ mr: 2 }} |
| | | > |
| | | {translate('page.map.action.areaList')} |
| | | </Button> |
| | | <Button |
| | | variant={areaDrawing ? "outlined" : "contained"} |
| | | color="primary" |
| | | sx={{}} |
| | |
| | | gap: 2 |
| | | }} |
| | | > |
| | | {mode === MAP_MODE.OBSERVER_MODE && ( |
| | | <> |
| | | <AreaFab |
| | | curZone={curZone} |
| | | showAreas={showAreas} |
| | | setShowAreas={setShowAreas} |
| | | notify={notify} |
| | | /> |
| | | </> |
| | | )} |
| | | {mode !== MAP_MODE.MOVABLE_MODE && ( |
| | | <> |
| | | <RouteFab |
| | |
| | | width={570} |
| | | /> |
| | | |
| | | <AreaList |
| | | zoneId={curZone} |
| | | open={areaListVisible} |
| | | onClose={() => setAreaListVisible(false)} |
| | | width={400} |
| | | /> |
| | | |
| | | </Box> |
| | | ); |
| | | } |