Moving cms stuff to cart
This commit is contained in:
parent
1b2935ebac
commit
d4074416ea
2 changed files with 30 additions and 28 deletions
|
|
@ -59,21 +59,21 @@
|
||||||
<div
|
<div
|
||||||
id="cart-subtotal"
|
id="cart-subtotal"
|
||||||
class="col d-flex justify-content-between">
|
class="col d-flex justify-content-between">
|
||||||
<span id="subtotal-label">Subtotal</span>
|
<span id="subtotal-label">{{ subtotalLabel }}</span>
|
||||||
<span id="subtotal-value">$100.00</span>
|
<span id="subtotal-value">{{ getDisplayed(subTotal) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
id="cart-sales-tax"
|
id="cart-sales-tax"
|
||||||
class="pt-1 col d-flex justify-content-between">
|
class="pt-1 col d-flex justify-content-between">
|
||||||
<span id="sales-tax-label">Sales tax</span>
|
<span id="sales-tax-label">{{ salesTaxLabel }}</span>
|
||||||
<span id="sales-tax-value">$1.23</span>
|
<span id="sales-tax-value">{{ getDisplayed(salesTax) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
id="bottom-amount-due"
|
id="bottom-amount-due"
|
||||||
class="bottom-amount-due col d-flex justify-content-between">
|
class="bottom-amount-due col d-flex justify-content-between">
|
||||||
<span id="bottom-amount-due-label">Amount due</span>
|
<span id="bottom-amount-due-label">{{ amountDueLabel }}</span>
|
||||||
<span id="bottom-amount-due-value">$101.23</span>
|
<span id="bottom-amount-due-value">{{ getDisplayed(amountDue) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -92,6 +92,7 @@ import textBlock from '@/digital-components/text-block/text-block.vue';
|
||||||
import textLink from '@/ux-components/text-link/text-link.vue';
|
import textLink from '@/ux-components/text-link/text-link.vue';
|
||||||
import getPriceOfLineItems from '@/helpers/price-calculator.js';
|
import getPriceOfLineItems from '@/helpers/price-calculator.js';
|
||||||
import { formatAmountInDollars } from '@/helpers/text-helper.js';
|
import { formatAmountInDollars } from '@/helpers/text-helper.js';
|
||||||
|
import widgetFields from '@/constants/cms-widget-fields.js';
|
||||||
|
|
||||||
const VERIFYING_COVERAGE = 'Verifying coverage';
|
const VERIFYING_COVERAGE = 'Verifying coverage';
|
||||||
|
|
||||||
|
|
@ -101,9 +102,6 @@ export default {
|
||||||
textBlock,
|
textBlock,
|
||||||
textLink },
|
textLink },
|
||||||
props: {
|
props: {
|
||||||
amountDueLabel: String,
|
|
||||||
basePriceLabel: String,
|
|
||||||
deductibleLabel: String,
|
|
||||||
recyclingModalCmsWidgetName: String,
|
recyclingModalCmsWidgetName: String,
|
||||||
showAsPaid: Boolean
|
showAsPaid: Boolean
|
||||||
},
|
},
|
||||||
|
|
@ -118,7 +116,14 @@ export default {
|
||||||
return {
|
return {
|
||||||
deductible: currentDeductible,
|
deductible: currentDeductible,
|
||||||
baseServiceLineItems,
|
baseServiceLineItems,
|
||||||
isExpanded: false
|
isExpanded: false,
|
||||||
|
widget: {
|
||||||
|
amountDue: 'AmountDueTextWidget',
|
||||||
|
deductible: 'DeductibleWidget',
|
||||||
|
basePrice: 'BasePriceWidget',
|
||||||
|
subtotal: 'SubtotalWidget',
|
||||||
|
salesTax: 'SalesTaxWidget'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -143,6 +148,21 @@ export default {
|
||||||
return this.showAsPaid
|
return this.showAsPaid
|
||||||
? 0
|
? 0
|
||||||
: this.subTotal + this.salesTax;
|
: this.subTotal + this.salesTax;
|
||||||
|
},
|
||||||
|
amountDueLabel() {
|
||||||
|
return this.getCmsContent(this.widget.amountDue, widgetFields.TEXT_BLOCK_WIDGET.TEXT);
|
||||||
|
},
|
||||||
|
deductibleLabel() {
|
||||||
|
return this.getCmsContent(this.widget.deductible, widgetFields.TEXT_BLOCK_WIDGET.TEXT);
|
||||||
|
},
|
||||||
|
basePriceLabel() {
|
||||||
|
return this.getCmsContent(this.widget.basePrice, widgetFields.TEXT_BLOCK_WIDGET.TEXT);
|
||||||
|
},
|
||||||
|
subtotalLabel() {
|
||||||
|
return this.getCmsContent(this.widget.subtotal, widgetFields.TEXT_BLOCK_WIDGET.TEXT);
|
||||||
|
},
|
||||||
|
salesTaxLabel() {
|
||||||
|
return this.getCmsContent(this.widget.salesTax, widgetFields.TEXT_BLOCK_WIDGET.TEXT);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,6 @@
|
||||||
<hr class="my-0" />
|
<hr class="my-0" />
|
||||||
<cartDropdown
|
<cartDropdown
|
||||||
:showAsPaid="false"
|
:showAsPaid="false"
|
||||||
:amountDueLabel="amountDueText"
|
|
||||||
:deductibleLabel="deductibleLabel"
|
|
||||||
:basePriceLabel="basePriceLabel"
|
|
||||||
recyclingModalCmsWidgetName="RecycleModal" />
|
recyclingModalCmsWidgetName="RecycleModal" />
|
||||||
<hr class="mt-0 mb-5" />
|
<hr class="mt-0 mb-5" />
|
||||||
<div>Pia Alert Placeholder</div>
|
<div>Pia Alert Placeholder</div>
|
||||||
|
|
@ -61,7 +58,6 @@ import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
|
||||||
import { paymentMethods } from '@/constants/payment-method-constants';
|
import { paymentMethods } from '@/constants/payment-method-constants';
|
||||||
import globalRules from '@/constants/global-rules';
|
import globalRules from '@/constants/global-rules';
|
||||||
import { Form } from 'vee-validate';
|
import { Form } from 'vee-validate';
|
||||||
import widgetFields from '@/constants/cms-widget-fields.js';
|
|
||||||
|
|
||||||
import { AppointmentTypeStrings } from '@/constants/schedule-constants';
|
import { AppointmentTypeStrings } from '@/constants/schedule-constants';
|
||||||
|
|
||||||
|
|
@ -109,11 +105,6 @@ export default {
|
||||||
paymentMethodInternalModel: this.getPaymentMethodFromStore(),
|
paymentMethodInternalModel: this.getPaymentMethodFromStore(),
|
||||||
rules: {
|
rules: {
|
||||||
optionRequired: globalRules.OPTION_REQUIRED
|
optionRequired: globalRules.OPTION_REQUIRED
|
||||||
},
|
|
||||||
widget: {
|
|
||||||
amountDue: 'AmountDueTextWidget',
|
|
||||||
deductible: 'DeductibleWidget',
|
|
||||||
basePrice: 'BasePriceWidget'
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -132,15 +123,6 @@ export default {
|
||||||
},
|
},
|
||||||
paymentMethod() {
|
paymentMethod() {
|
||||||
return this.paymentMethodInternalModel;
|
return this.paymentMethodInternalModel;
|
||||||
},
|
|
||||||
amountDueText() {
|
|
||||||
return this.getCmsContent(this.widget.amountDue, widgetFields.TEXT_BLOCK_WIDGET.TEXT);
|
|
||||||
},
|
|
||||||
deductibleLabel() {
|
|
||||||
return this.getCmsContent(this.widget.deductible, widgetFields.TEXT_BLOCK_WIDGET.TEXT);
|
|
||||||
},
|
|
||||||
basePriceLabel() {
|
|
||||||
return this.getCmsContent(this.widget.basePrice, widgetFields.TEXT_BLOCK_WIDGET.TEXT);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue