CEC-3519 Add car version history (#260)

* CEC-3519 Add car version history
CEC-3455 Delete button is icon and remove column
CEC-3496 Fix Issue delete

* smell

* Remove tab from issues details page

* Fix date format
This commit is contained in:
John Wu
2023-01-13 15:29:31 -08:00
committed by GitHub
parent 19ad379168
commit c5a5839d41
16 changed files with 889 additions and 365 deletions

View File

@@ -1,5 +1,5 @@
import {
addQueryParams, errorHandler, fetchRespHandler, getAuthHeaderOptions
addQueryParams, errorHandler, fetchRespHandler, getAuthHeaderOptions
} from "../utils/http";
const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
@@ -172,6 +172,19 @@ const vehiclesAPI = {
})
.then(fetchRespHandler)
.catch(errorHandler),
getVersionLog: async ({vin, ...search}, token) => {
const u = addQueryParams(`${API_ENDPOINT}/vehicle/${vin}/version/logs`, search);
return fetch(u, {
method: "GET",
headers: Object.assign(
{ "Content-Type": "application/json" },
getAuthHeaderOptions(token)
),
})
.then(fetchRespHandler)
.catch(errorHandler)
},
};
export default vehiclesAPI;