CSR-726 | Tech review changes
This commit is contained in:
parent
5340f3b303
commit
dfef643732
3 changed files with 12 additions and 20 deletions
|
|
@ -26,13 +26,12 @@ export default ({
|
|||
},
|
||||
computed: {
|
||||
answersFromCms(){
|
||||
//console.log(JSON.parse(JSON.stringify(this.getCmsContent(this.cmsWidgetName, 'Answers'))));
|
||||
return this.getCmsContent(this.cmsWidgetName, 'Answers');
|
||||
},
|
||||
selectedValues: {
|
||||
get: function() {
|
||||
// Convert to CMS answer name from bool
|
||||
var cmsAnswerValue = this.modelValue ? insuranceAnswer : cashAnswer;
|
||||
const cmsAnswerValue = this.modelValue ? insuranceAnswer : cashAnswer;
|
||||
return cmsAnswerValue;
|
||||
},
|
||||
set: function(newValue) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<cashOrInsuranceQuestion
|
||||
ref="cashOrInsurance"
|
||||
cmsWidgetName="CashOrInsuranceQuestionWidget"
|
||||
v-model="isInsurance"
|
||||
v-model="isInsuranceSelected"
|
||||
groupName="CashOrInsuranceQuestion"
|
||||
/>
|
||||
<radioServicePackage/>
|
||||
|
|
@ -149,12 +149,11 @@ export default {
|
|||
// Call the "next" function to complete the transition to this page.
|
||||
next((vm) => {
|
||||
vm.setCmsContent(cmsContent);
|
||||
vm.isInsurance = vm.getDefaultIsInsuranceValue();
|
||||
vm.isInsuranceSelected = vm.getDefaultisInsuranceSelectedValue();
|
||||
});
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
cashOrInsuranceThreshhold: 600,
|
||||
pricingRequestResult: null,
|
||||
isInsurance: null,
|
||||
}
|
||||
|
|
@ -163,22 +162,16 @@ export default {
|
|||
arePagePrerequisitesValid() {
|
||||
return store.getters.order.damage.isRepair || (store.getters.order.lineItems?.glassParts != null && store.getters.order.lineItems.glassParts.length > 0);
|
||||
},
|
||||
getDefaultIsInsuranceValue() {
|
||||
var defaultIsInsuranceValue = this.$store.getters.order.payment.isInsurance;
|
||||
if(defaultIsInsuranceValue != null) {
|
||||
return defaultIsInsuranceValue;
|
||||
getDefaultisInsuranceSelectedValue() {
|
||||
var defaultisInsuranceSelectedValue = this.$store.getters.order.payment.isInsurance;
|
||||
if(defaultisInsuranceSelectedValue != null) {
|
||||
return defaultisInsuranceSelectedValue;
|
||||
} else {
|
||||
return this.economyPackagePrice > this.cashOrInsuranceThreshhold;
|
||||
return this.economyPackagePrice > 600;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
years() {
|
||||
return ["2011", "2012"];
|
||||
},
|
||||
answersFromCms() {
|
||||
return ["Pay on my own", "Pay with insurance"];
|
||||
},
|
||||
economyPackagePrice() {
|
||||
//TODO build out the pricing logic CSR-504
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<hr v-if="i > 0" />
|
||||
<glassPartQuestion
|
||||
:ref="`${RefPrefix}-${item.glassLocation}-${item.glassName}`"
|
||||
v-model="glassParts[item.glassLocation + '-' + item.glassName]"
|
||||
v-model="selectedGlassParts[item.glassLocation + '-' + item.glassName]"
|
||||
:glassLocation="item.glassLocation"
|
||||
:glassName="item.glassName"
|
||||
:colorAnswers="item.colorAnswers"
|
||||
|
|
@ -100,7 +100,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
glassParts: {},
|
||||
selectedGlassParts: {},
|
||||
alertWidgetData: Object,
|
||||
alreadyPopulatedPartsData: {},
|
||||
};
|
||||
|
|
@ -114,7 +114,7 @@ export default {
|
|||
selectedGlassPartNumbers () {
|
||||
// Compile all selected parts from the page.
|
||||
const numberArray = [];
|
||||
for (let glassPart of Object.values(this.glassParts)) {
|
||||
for (let glassPart of Object.values(this.selectedGlassParts)) {
|
||||
if (glassPart?.partNumber) { numberArray.push(glassPart.partNumber) }
|
||||
}
|
||||
return numberArray;
|
||||
|
|
@ -207,7 +207,7 @@ export default {
|
|||
const partNumber = alreadyPopulatedPartsData[key].partNumber;
|
||||
g.parts.forEach((p) => {
|
||||
if (p.partNumber === partNumber) {
|
||||
this.glassParts[g.glassLocation + "-" + g.glassName] = {
|
||||
this.selectedGlassParts[g.glassLocation + "-" + g.glassName] = {
|
||||
[g.glassLocation]: [partNumber],
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue