issues fixed
This commit is contained in:
@@ -57,6 +57,7 @@ export const CarUpdatesProvider = ({ children }) => {
|
||||
const [carUpdates, setCarUpdates] = useState([]);
|
||||
const [versions, setVersions] = useState([SELECT_VERSION_OBJ]);
|
||||
const [versionRxSwins, setVersionRxSwins] = useState([]);
|
||||
const [totalVersionRxSwins, setTotalVersionRxSwins] = useState(0);
|
||||
const [totalCarUpdates, setTotalCarUpdates] = useState(0);
|
||||
const [delayCount, setDelayCount] = useState(0);
|
||||
let progressTimer = 0;
|
||||
@@ -308,17 +309,20 @@ export const CarUpdatesProvider = ({ children }) => {
|
||||
return result;
|
||||
};
|
||||
|
||||
const getSUMSVersionRxSwins = async (sums_version, token) => {
|
||||
const getSUMSVersionRxSwins = async (sums_version, options, token) => {
|
||||
let result;
|
||||
|
||||
try {
|
||||
setBusy(true);
|
||||
|
||||
result = await api.getSUMSVersionRxSwins(sums_version, token);
|
||||
result = await api.getSUMSVersionRxSwins(sums_version, options, token);
|
||||
if (result.error)
|
||||
throw new Error(`Get software version rxswins error. ${result.message}`);
|
||||
|
||||
setVersionRxSwins(result.data);
|
||||
if (options && options.offset === 0 && result.total) {
|
||||
setTotalVersionRxSwins(result.total);
|
||||
}
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
@@ -374,6 +378,7 @@ export const CarUpdatesProvider = ({ children }) => {
|
||||
stopMonitor,
|
||||
updateSUMSVersion,
|
||||
getSUMSVersionRxSwins,
|
||||
totalVersionRxSwins,
|
||||
deleteSUMSVersionRxSwins,
|
||||
addSUMSVersionRxSwins,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user