CEC-5715 - Show which ECUs need to be updated for next flashpack number

This commit is contained in:
padamsen_fisker
2024-02-07 11:09:56 -05:00
parent ce81a3bd77
commit fd2d83ef52
5 changed files with 180 additions and 3 deletions

View File

@@ -372,9 +372,23 @@ export const VehicleProvider = ({ children }) => {
} finally {
setBusy(false);
}
};
const getCarFlashpackVersionInfo = async (vin, token) => {
try {
setBusy(true);
const result = await api.getCarFlashpackVersionInfo(vin, token);
if (result.error) {
throw new Error(`Get car flashpack version info error. ${result.message}`);
}
return result;
} finally {
setBusy(false);
}
}
return (
<VehicleContext.Provider
value={{
@@ -412,6 +426,7 @@ export const VehicleProvider = ({ children }) => {
getFlashpackECUMappings,
addFlashpackVersion,
deleteFlashpackVersion,
getCarFlashpackVersionInfo,
}}
>
{children}