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:
@@ -76,6 +76,17 @@ const vehiclesAPI = {
|
||||
.then(fetchRespHandler)
|
||||
.catch(errorHandler),
|
||||
|
||||
getLocationsVehiclePaths: async (token, vinsParam) =>
|
||||
fetch(`${API_ENDPOINT}/vehicle_paths?${vinsParam}`, {
|
||||
method: "GET",
|
||||
headers: Object.assign(
|
||||
{ "Content-Type": "application/json" },
|
||||
getAuthHeaderOptions(token)
|
||||
),
|
||||
})
|
||||
.then(fetchRespHandler)
|
||||
.catch(errorHandler),
|
||||
|
||||
getState: async (token, vin) =>
|
||||
fetch(`${API_ENDPOINT}/carstate?vin=${vin}`, {
|
||||
method: "GET",
|
||||
@@ -185,7 +196,7 @@ const vehiclesAPI = {
|
||||
.then(fetchRespHandler)
|
||||
.catch(errorHandler),
|
||||
|
||||
getVersionLog: async ({vin, ...search}, token) => {
|
||||
getVersionLog: async ({ vin, ...search }, token) => {
|
||||
const u = addQueryParams(`${API_ENDPOINT}/vehicle/${vin}/version/logs`, search);
|
||||
return fetch(u, {
|
||||
method: "GET",
|
||||
|
||||
Reference in New Issue
Block a user