CEC-4517 reset TBOX remote command (#369)
* CEC-4517 Diagnostic Commands tab * snapshot
This commit is contained in:
@@ -71,7 +71,7 @@ export const VehicleProvider = ({ children }) => {
|
||||
|
||||
const result = await api.addTags(vins, tags, token)
|
||||
if (result.error)
|
||||
throw new Error(`Add tags error. ${result.message}`);
|
||||
throw new Error(`Add tags error. ${result.message}`);
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
@@ -202,6 +202,18 @@ export const VehicleProvider = ({ children }) => {
|
||||
}
|
||||
};
|
||||
|
||||
const sendDiagnosticCommand = async (vins, command, token) => {
|
||||
try {
|
||||
setBusy(true);
|
||||
const result = await api.sendDiagnosticCommand(vins, command, token);
|
||||
if (result.error)
|
||||
throw new Error(`Send diagnostic command error. ${result.message}`);
|
||||
return result;
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
};
|
||||
|
||||
const updateVehicle = async (vin, v, token) => {
|
||||
try {
|
||||
setBusy(true);
|
||||
@@ -313,6 +325,7 @@ export const VehicleProvider = ({ children }) => {
|
||||
getVehicle,
|
||||
getVehicles,
|
||||
sendCommand,
|
||||
sendDiagnosticCommand,
|
||||
updateVehicle,
|
||||
getFleets,
|
||||
getVersionLog,
|
||||
|
||||
Reference in New Issue
Block a user