CEC-3933 - use VehiclePaths for location drawing (#306)
* CEC-3933 - Parse VehiclePaths location data * changes * fixes * stuff * sort of works * fix * progress * refactor * fix vehicle paths query * digital twin shows map * new dashboard * wider digital twin map * snapshot * latest; using polylines * lag lng changes * stuff * path showing up * stuff * things * revert home page * whitespace * validation * more stuff * fix button issue * tests pass without mocking data * fix code smells * remove map from digital twin, add to tab * fix bug * marker click event working * individual colors * possible fix * fix warning * merge and remove unused code * small fixes * re add dashboard * snaps
This commit is contained in:
@@ -88,7 +88,19 @@ export const VehicleProvider = ({ children }) => {
|
||||
setBusy(true);
|
||||
const result = await api.getLocations(token);
|
||||
if (result.error)
|
||||
throw new Error(`Get locations error. ${result.message}`);
|
||||
throw new Error(`Get locations vehicle paths error. ${result.message}`);
|
||||
return result;
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
};
|
||||
|
||||
const getLocationsVehiclePaths = async (token, vinsParam) => {
|
||||
try {
|
||||
setBusy(true);
|
||||
const result = await api.getLocationsVehiclePaths(token, vinsParam);
|
||||
if (result.error)
|
||||
throw new Error(`Get locations vehicle paths error. ${result.message}`);
|
||||
return result;
|
||||
} finally {
|
||||
setBusy(false);
|
||||
@@ -263,6 +275,7 @@ export const VehicleProvider = ({ children }) => {
|
||||
getCANSignals,
|
||||
getECUs,
|
||||
getLocations,
|
||||
getLocationsVehiclePaths,
|
||||
getModels,
|
||||
getState,
|
||||
getYears,
|
||||
|
||||
Reference in New Issue
Block a user