CSR-762 GA Fix merge conflicts
This commit is contained in:
commit
dc72ead7bc
2 changed files with 15 additions and 60 deletions
|
|
@ -112,7 +112,7 @@ export default {
|
||||||
|
|
||||||
selectedPartNumber: {
|
selectedPartNumber: {
|
||||||
get() {
|
get() {
|
||||||
return this.modelValue ? this.modelValue[this.glassLocation][0] : undefined;
|
return this.modelValue?.partNumber;
|
||||||
},
|
},
|
||||||
set(newValue) {
|
set(newValue) {
|
||||||
this.$emit("update:modelValue", this.partsForSelectedTint.filter(part => part.partNumber == newValue)[0]);
|
this.$emit("update:modelValue", this.partsForSelectedTint.filter(part => part.partNumber == newValue)[0]);
|
||||||
|
|
|
||||||
|
|
@ -421,45 +421,15 @@ export const getters = {
|
||||||
state.order.payment.insuranceCoverage.isVerified,
|
state.order.payment.insuranceCoverage.isVerified,
|
||||||
funnelHasRecalibrationPart: getHasRecalibrationPart(state),
|
funnelHasRecalibrationPart: getHasRecalibrationPart(state),
|
||||||
funnelSelectedMultiGlass: state.order.damage.glassToReplace?.length > 1,
|
funnelSelectedMultiGlass: state.order.damage.glassToReplace?.length > 1,
|
||||||
funnelSelectedWindshieldGlass: getAllValuesOfPropertyInArrayOfObjects(
|
funnelSelectedWindshieldGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, "glassLocation").includes(damageLocationsSelected.WINDSHIELD),
|
||||||
state.order.damage.glassToReplace,
|
funnelSelectedBackGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, "glassLocation").includes(damageLocationsSelected.REAR),
|
||||||
"glassLocation"
|
funnelSelectedDriverSideGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, "glassLocation").includes(damageLocationsSelected.DRIVER),
|
||||||
).includes(damageLocationsSelected.WINDSHIELD),
|
funnelSelectedPassengerSideGlass: getNonFalseValuesOfPropertyInArrayOfObjects(state.order.damage.glassToReplace, "glassLocation").includes(damageLocationsSelected.PASSENGER),
|
||||||
funnelSelectedBackGlass: getAllValuesOfPropertyInArrayOfObjects(
|
|
||||||
state.order.damage.glassToReplace,
|
|
||||||
"glassLocation"
|
|
||||||
).includes(damageLocationsSelected.REAR),
|
|
||||||
funnelSelectedDriverSideGlass: getAllValuesOfPropertyInArrayOfObjects(
|
|
||||||
state.order.damage.glassToReplace,
|
|
||||||
"glassLocation"
|
|
||||||
).includes(damageLocationsSelected.DRIVER),
|
|
||||||
funnelSelectedPassengerSideGlass: getAllValuesOfPropertyInArrayOfObjects(
|
|
||||||
state.order.damage.glassToReplace,
|
|
||||||
"glassLocation"
|
|
||||||
).includes(damageLocationsSelected.PASSENGER),
|
|
||||||
|
|
||||||
funnelOrderPartNumbers: [
|
funnelOrderPartNumbers: [...getNonFalseValuesOfPropertyInArrayOfObjects(state.order.lineItems.glassParts, "partNumber"), ...getNonFalseValuesOfPropertyInArrayOfObjects(state.order.lineItems.otherParts, "partNumber")],
|
||||||
...getAllValuesOfPropertyInArrayOfObjects(
|
|
||||||
state.order.lineItems.glassParts,
|
|
||||||
"partNumber"
|
|
||||||
),
|
|
||||||
...getAllValuesOfPropertyInArrayOfObjects(
|
|
||||||
state.order.lineItems.otherParts,
|
|
||||||
"partNumber"
|
|
||||||
),
|
|
||||||
],
|
|
||||||
|
|
||||||
funnelOrderPartTypes: [
|
funnelOrderPartTypes: [...getNonFalseValuesOfPropertyInArrayOfObjects(state.order.lineItems.glassParts, "recalibrationType"), ...getNonFalseValuesOfPropertyInArrayOfObjects(state.order.lineItems.otherParts, "recalibrationType")],
|
||||||
...getAllValuesOfPropertyInArrayOfObjects(
|
}
|
||||||
state.order.lineItems.glassParts,
|
|
||||||
"recalibrationType"
|
|
||||||
),
|
|
||||||
...getAllValuesOfPropertyInArrayOfObjects(
|
|
||||||
state.order.lineItems.otherParts,
|
|
||||||
"recalibrationType"
|
|
||||||
),
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
experimentSettings: (state) =>
|
experimentSettings: (state) =>
|
||||||
state.applicationUser.experiments
|
state.applicationUser.experiments
|
||||||
|
|
@ -468,8 +438,8 @@ export const getters = {
|
||||||
// gaClickInformation: (state) => state.gaClickInformation,
|
// gaClickInformation: (state) => state.gaClickInformation,
|
||||||
};
|
};
|
||||||
|
|
||||||
function getAllValuesOfPropertyInArrayOfObjects(array, propertyName) {
|
function getNonFalseValuesOfPropertyInArrayOfObjects(array, propertyName) {
|
||||||
return (array ?? []).map((x) => x[propertyName]).filter((x) => x);
|
return (array ?? []).map(x => x[propertyName]).filter(x => x);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Export Actions
|
// Export Actions
|
||||||
|
|
@ -1353,28 +1323,13 @@ export default createStore({
|
||||||
// Private Functions
|
// Private Functions
|
||||||
|
|
||||||
function getHasRecalibrationPart(state) {
|
function getHasRecalibrationPart(state) {
|
||||||
var hasRequiresRecalibration =
|
var hasRequiresRecalibration = getNonFalseValuesOfPropertyInArrayOfObjects(state.order.lineItems.glassParts, "requiresRecalibration")?.length > 0;
|
||||||
getAllValuesOfPropertyInArrayOfObjects(
|
var hasRecalibrationType = getNonFalseValuesOfPropertyInArrayOfObjects(state.order.lineItems.glassParts, "recalibrationType")?.length > 0;
|
||||||
state.order.lineItems.glassParts,
|
|
||||||
"requiresRecalibration"
|
|
||||||
)?.length > 0;
|
|
||||||
var hasRecalibrationType =
|
|
||||||
getAllValuesOfPropertyInArrayOfObjects(
|
|
||||||
state.order.lineItems.glassParts,
|
|
||||||
"recalibrationType"
|
|
||||||
)?.length > 0;
|
|
||||||
|
|
||||||
if (hasRequiresRecalibration) {
|
if (hasRequiresRecalibration) {
|
||||||
if (hasRecalibrationType) {
|
if (hasRecalibrationType) { // Has both 'requiresRecalibration' and 'recalibrationType' and 'recalibrationType'
|
||||||
// Has both 'requiresRecalibration' and 'recalibrationType' and 'recalibrationType'
|
return getNonFalseValuesOfPropertyInArrayOfObjects(state.order.lineItems.glassParts, "recalibrationType")[0].toLowerCase() != "unknown";
|
||||||
return (
|
} else { // Has 'requiresRecalibration' but no 'recalibrationType' at all
|
||||||
getAllValuesOfPropertyInArrayOfObjects(
|
|
||||||
state.order.lineItems.glassParts,
|
|
||||||
"recalibrationType"
|
|
||||||
)[0].toLowerCase() != "unknown"
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
// Has 'requiresRecalibration' but no 'recalibrationType' at all
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue