Merge pull request #1425 from Safelite/feature/fix-spelling-and-rename-early-bird
Fixed Seling Price misspelling and renamed EarlyBirdIndex to PremiumF…
This commit is contained in:
commit
35f30e339e
2 changed files with 10 additions and 10 deletions
|
|
@ -439,16 +439,16 @@ export default {
|
||||||
this.appointmentType === AppointmentTypeStrings.MOBILE &&
|
this.appointmentType === AppointmentTypeStrings.MOBILE &&
|
||||||
this.selectedTimeSlotInfo?.isPremiumAppointment
|
this.selectedTimeSlotInfo?.isPremiumAppointment
|
||||||
) {
|
) {
|
||||||
const earlyBirdIndex = supportingItems.findIndex(
|
const premiumFeeIndex = supportingItems.findIndex(
|
||||||
(item) => item.partType == PREMIUM_FEE_PART_TYPE
|
(item) => item.partType == PREMIUM_FEE_PART_TYPE
|
||||||
);
|
);
|
||||||
|
|
||||||
if (earlyBirdIndex >= 0) {
|
if (premiumFeeIndex >= 0) {
|
||||||
supportingItems[earlyBirdIndex].laborAmount =
|
supportingItems[premiumFeeIndex].laborAmount =
|
||||||
this.mobilePremiumAppointmentFee.laborAmount;
|
this.mobilePremiumAppointmentFee.laborAmount;
|
||||||
supportingItems[earlyBirdIndex].selingPrice =
|
supportingItems[premiumFeeIndex].sellingPrice =
|
||||||
this.mobilePremiumAppointmentFee.selingPrice;
|
this.mobilePremiumAppointmentFee.sellingPrice;
|
||||||
supportingItems[earlyBirdIndex].kitPrice =
|
supportingItems[premiumFeeIndex].kitPrice =
|
||||||
this.mobilePremiumAppointmentFee.kitPrice;
|
this.mobilePremiumAppointmentFee.kitPrice;
|
||||||
} else {
|
} else {
|
||||||
supportingItems.push(this.mobilePremiumAppointmentFee);
|
supportingItems.push(this.mobilePremiumAppointmentFee);
|
||||||
|
|
@ -461,12 +461,12 @@ export default {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// if it's not a mobile and/or premium early bird, then make sure we remove any that may have been added
|
// if it's not a mobile and/or premium early bird, then make sure we remove any that may have been added
|
||||||
const removeEarlyBirdIndex = supportingItems.findIndex(
|
const removePremiumFeeIndex = supportingItems.findIndex(
|
||||||
(item) => item.partType == PREMIUM_FEE_PART_TYPE
|
(item) => item.partType == PREMIUM_FEE_PART_TYPE
|
||||||
);
|
);
|
||||||
|
|
||||||
if (removeEarlyBirdIndex >= 0) {
|
if (removePremiumFeeIndex >= 0) {
|
||||||
supportingItems.splice(removeEarlyBirdIndex, 1);
|
supportingItems.splice(removePremiumFeeIndex, 1);
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING,
|
this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING,
|
||||||
supportingItems,
|
supportingItems,
|
||||||
|
|
|
||||||
|
|
@ -441,7 +441,7 @@ export default {
|
||||||
// If it already exists, update the price with latest data
|
// If it already exists, update the price with latest data
|
||||||
if (mobileFeeIndex >= 0) {
|
if (mobileFeeIndex >= 0) {
|
||||||
supportingItems[mobileFeeIndex].laborAmount = this.mobileFeePart.laborAmount;
|
supportingItems[mobileFeeIndex].laborAmount = this.mobileFeePart.laborAmount;
|
||||||
supportingItems[mobileFeeIndex].selingPrice = this.mobileFeePart.selingPrice;
|
supportingItems[mobileFeeIndex].sellingPrice = this.mobileFeePart.sellingPrice;
|
||||||
supportingItems[mobileFeeIndex].kitPrice = this.mobileFeePart.kitPrice;
|
supportingItems[mobileFeeIndex].kitPrice = this.mobileFeePart.kitPrice;
|
||||||
} else {
|
} else {
|
||||||
supportingItems.push(this.mobileFeePart);
|
supportingItems.push(this.mobileFeePart);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue