Small other changes
This commit is contained in:
parent
650fbd564e
commit
cfc3975684
3 changed files with 22 additions and 21 deletions
|
|
@ -30,6 +30,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
|
console.error(error);
|
||||||
return reject(error.response);
|
return reject(error.response);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@ export function settleAllPromises(promiseResultMap) {
|
||||||
// when returned, so other promises do. Map the results to the object
|
// when returned, so other promises do. Map the results to the object
|
||||||
// so that the object is the return data.
|
// so that the object is the return data.
|
||||||
|
|
||||||
if (results[i].value.data === undefined) {
|
if (results[i]?.value?.data === undefined) {
|
||||||
resultMap[promiseName] = results[i].value;
|
resultMap[promiseName] = results[i]?.value;
|
||||||
} else {
|
} else {
|
||||||
resultMap[promiseName] = results[i].value.data;
|
resultMap[promiseName] = results[i]?.value?.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ export const mutations = {
|
||||||
updateVehicleVin(state, vin) {
|
updateVehicleVin(state, vin) {
|
||||||
state.order.vehicle.vin = vin;
|
state.order.vehicle.vin = vin;
|
||||||
},
|
},
|
||||||
updateIsRepair(state, isRepair){
|
updateIsRepair(state, isRepair) {
|
||||||
state.order.damage.isRepair = isRepair;
|
state.order.damage.isRepair = isRepair;
|
||||||
},
|
},
|
||||||
updateNumberOfChips(state, numberOfChips) {
|
updateNumberOfChips(state, numberOfChips) {
|
||||||
|
|
@ -248,7 +248,7 @@ export const actions = {
|
||||||
method: endpoints.LookupVinByPlate.method,
|
method: endpoints.LookupVinByPlate.method,
|
||||||
endpoint: endpoints.LookupVinByPlate.url,
|
endpoint: endpoints.LookupVinByPlate.url,
|
||||||
payload: {
|
payload: {
|
||||||
licensePlate: licensePlate,
|
licensePlate: licensePlate,
|
||||||
licenseState: licenseState
|
licenseState: licenseState
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -292,12 +292,12 @@ export const actions = {
|
||||||
},
|
},
|
||||||
getDamageOptions(context, { carId }) {
|
getDamageOptions(context, { carId }) {
|
||||||
return globalMethods.callHttpClient({
|
return globalMethods.callHttpClient({
|
||||||
methods: endpoints.GetDamageOptions.method,
|
methods: endpoints.GetDamageOptions.method,
|
||||||
endpoint: `${endpoints.GetDamageOptions.url}/${carId}`,
|
endpoint: `${endpoints.GetDamageOptions.url}/${carId}`,
|
||||||
payload: {},
|
payload: {},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
validateZip(context, {zip}) {
|
validateZip(context, { zip }) {
|
||||||
return globalMethods.callHttpClient({
|
return globalMethods.callHttpClient({
|
||||||
methods: endpoints.ValidateZip.method,
|
methods: endpoints.ValidateZip.method,
|
||||||
endpoint: `${endpoints.ValidateZip.url}/${zip}`
|
endpoint: `${endpoints.ValidateZip.url}/${zip}`
|
||||||
|
|
@ -363,20 +363,20 @@ export const actions = {
|
||||||
context.commit(storeMutations.UPDATE_REFERRAL_CORRELATION_ID, referralCorrelationId);
|
context.commit(storeMutations.UPDATE_REFERRAL_CORRELATION_ID, referralCorrelationId);
|
||||||
},
|
},
|
||||||
|
|
||||||
logExperimentExposure(context, {userId, sessionKey, sessionId, pageName, serverName, pageEvent, universeName }){
|
logExperimentExposure(context, { userId, sessionKey, sessionId, pageName, serverName, pageEvent, universeName }) {
|
||||||
return globalMethods.callHttpClient({
|
return globalMethods.callHttpClient({
|
||||||
method: endpoints.LogExperimentExposureIfAssigned.method,
|
method: endpoints.LogExperimentExposureIfAssigned.method,
|
||||||
endpoint: endpoints.LogExperimentExposureIfAssigned.url,
|
endpoint: endpoints.LogExperimentExposureIfAssigned.url,
|
||||||
payload: {
|
payload: {
|
||||||
userId: userId,
|
userId: userId,
|
||||||
sessionKey: sessionKey,
|
sessionKey: sessionKey,
|
||||||
sessionId: sessionId,
|
sessionId: sessionId,
|
||||||
pageName: pageName,
|
pageName: pageName,
|
||||||
serverName: serverName,
|
serverName: serverName,
|
||||||
pageEvent: pageEvent,
|
pageEvent: pageEvent,
|
||||||
universeName: universeName
|
universeName: universeName
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// Parts API Actions
|
// Parts API Actions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue