Reverting stuff
This commit is contained in:
parent
e0d4f577b7
commit
f02c152c6f
1 changed files with 10 additions and 3 deletions
|
|
@ -556,7 +556,7 @@ export const useMainStore = defineStore({
|
|||
const { vin } = vehicle;
|
||||
|
||||
// create a new array to avoid mutating state
|
||||
const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray);
|
||||
const glassArrayForPayload = convertGlassPieceToBackEndCompatibleFormat(glassArray);
|
||||
|
||||
const response = await globalMethods.callHttpClient({
|
||||
method: endpoints.GetPartsOrQuestions.method,
|
||||
|
|
@ -655,7 +655,7 @@ export const useMainStore = defineStore({
|
|||
partType: lineItem.partType
|
||||
}));
|
||||
const glassPieces = order.damage.glassToReplace
|
||||
? convertGlassPieceNamingForApi(order.damage.glassToReplace)
|
||||
? convertGlassPieceToBackEndCompatibleFormat(order.damage.glassToReplace)
|
||||
: [];
|
||||
const payload = {
|
||||
startDate,
|
||||
|
|
@ -715,7 +715,7 @@ export const useMainStore = defineStore({
|
|||
partType: lineItem.partType
|
||||
}));
|
||||
const glassPieces = order.damage.glassToReplace
|
||||
? convertGlassPieceNamingForApi(order.damage.glassToReplace)
|
||||
? convertGlassPieceToBackEndCompatibleFormat(order.damage.glassToReplace)
|
||||
: [];
|
||||
const payload = {
|
||||
providerNumber,
|
||||
|
|
@ -2069,6 +2069,13 @@ function buildQueryStringParameterFromArrayOfComplexObjects(arrayOfObjects, para
|
|||
return queryStringParameter.slice(0, -1);
|
||||
}
|
||||
|
||||
function convertGlassPieceToBackEndCompatibleFormat(glassPieces) {
|
||||
return glassPieces.map((glassPiece) => ({
|
||||
location: glassPiece.glassLocation,
|
||||
name: glassPiece.glassName
|
||||
}));
|
||||
}
|
||||
|
||||
function providersEqual(providerA, providerB) {
|
||||
return (
|
||||
providerA.providerNumber === providerB.providerNumber
|
||||
|
|
|
|||
Loading…
Reference in a new issue