updated the component and device api's to have as be a parameter for the function
This commit is contained in:
parent
c617ebf868
commit
b62c7dbe5c
39 changed files with 346 additions and 651 deletions
|
|
@ -194,7 +194,7 @@ export default function ConstructionMapController(props: Props) {
|
|||
if (loadingDevices) return;
|
||||
setLoadingDevices(true);
|
||||
deviceAPI
|
||||
.list(500, 0, "asc", "name", undefined, undefined, undefined, undefined, undefined, true)
|
||||
.list(500, 0, "asc", "name", undefined, undefined, undefined, undefined, undefined, true, undefined, undefined,undefined,undefined,undefined,as)
|
||||
.then(resp => {
|
||||
let devOps: Device[] = []; //only devices that are not mapped
|
||||
let deviceMap: Map<string, Device> = new Map<string, Device>(); // all devices
|
||||
|
|
@ -252,7 +252,7 @@ export default function ConstructionMapController(props: Props) {
|
|||
.catch(err => {
|
||||
openSnack("Failed to Load Devices");
|
||||
});
|
||||
}, [deviceAPI, openSnack]); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
}, [deviceAPI, openSnack, as]); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
const loadGroups = useCallback(() => {
|
||||
groupAPI
|
||||
|
|
@ -527,7 +527,7 @@ export default function ConstructionMapController(props: Props) {
|
|||
device.settings.longitude = long;
|
||||
device.settings.latitude = lat;
|
||||
deviceAPI
|
||||
.update(device.id(), device.settings)
|
||||
.update(device.id(), device.settings, as)
|
||||
.then(resp => {
|
||||
openSnack("Device location Updated");
|
||||
if (devOps.includes(device)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue