CEC-2384 Vehicle details show associated fleets (#203)

This commit is contained in:
arpanetus
2022-09-29 23:34:05 +06:00
committed by GitHub
parent da466a36f5
commit f3d0b523d8
12 changed files with 619 additions and 2 deletions

View File

@@ -77,6 +77,8 @@ let vehicles = [];
let models = ["Ocean", "PEAR"];
let years = [2023, 2024];
let totalVehicles = 0;
let fleets = ["fleet1", "fleet2"];
let totalFleets = 2;
let error = null;
export const VehicleProvider = ({ children }) => {
@@ -86,6 +88,8 @@ export const VehicleProvider = ({ children }) => {
export const useVehicleContext = () => ({
busy,
models,
fleets,
totalFleets,
totalVehicles,
vehicle,
vehicles,
@@ -141,6 +145,10 @@ export const useVehicleContext = () => ({
command,
parameters,
})),
getFleets: jest.fn((vin, search,_token) => {return {
data: ["fleet1", "fleet2"],
total: 2,
}}),
});
export const setBusy = (val) => {