CEC-5752 - Define trim as well as model for Flashpack mappings

This commit is contained in:
padamsen_fisker
2024-02-13 18:11:00 -05:00
parent 00adee9b58
commit 27d7a5ad05
8 changed files with 118 additions and 19 deletions

View File

@@ -311,11 +311,11 @@ export const VehicleProvider = ({ children }) => {
}
};
const getFlashpackECUMappings = async (model, year, flashpack, options, token) => {
const getFlashpackECUMappings = async (model, trim, year, flashpack, options, token) => {
try {
setBusy(true);
const result = await api.getFlashpackECUMappings(model, year, flashpack, options, token);
const result = await api.getFlashpackECUMappings(model, trim, year, flashpack, options, token);
if (result.error) {
throw new Error(`Get flashpack ecu mappings error. ${result.message}`);
}
@@ -331,12 +331,13 @@ export const VehicleProvider = ({ children }) => {
}
};
const addFlashpackVersion = async (model, year, flashpack, carFlashpackVersions, token) => {
const addFlashpackVersion = async (model, trim, year, flashpack, carFlashpackVersions, token) => {
try {
setBusy(true);
const data = {
"car_model": model,
"car_trim": trim,
"car_year": year,
"flashpack": flashpack,
"ecu_versions": carFlashpackVersions,
@@ -353,12 +354,13 @@ export const VehicleProvider = ({ children }) => {
}
}
const deleteFlashpackVersion = async (model, year, flashpack, token) => {
const deleteFlashpackVersion = async (model, trim, year, flashpack, token) => {
try {
setBusy(true);
const data = {
"car_model": model,
"car_trim": trim,
"car_year": year,
"flashpack": flashpack,
}