CSR-715 Remove isUpperCase() for Repair/Replace

This commit is contained in:
Katie 2022-07-05 10:33:09 -04:00
parent 15718a6403
commit 9007f99cbc
2 changed files with 5 additions and 5 deletions

View file

@ -361,7 +361,7 @@ export default {
isWindshieldRepair() {
if (!this.isWindshieldDamageLocation) return false;
return this.selectedWindshieldOptions.selectedWindshieldDamageType.toUpperCase() === damageLocationsSelected.REPAIR.toUpperCase();
return this.selectedWindshieldOptions.selectedWindshieldDamageType === damageLocationsSelected.REPAIR;
},
isDriverSideReplace() {
if (!this.isSideDoorDamageLocation) return false;
@ -383,7 +383,7 @@ export default {
return this.isWindshieldDamageLocation && this.selectedDamageLocations.length > 1 && this.isWindshieldRepair;
},
hasSplitSingleConflict() {
if (!this.selectedDamageLocations?.includes("Windshield") || this.selectedWindshieldOptions.selectedWindshieldDamageType?.toUpperCase() === damageLocationsSelected.REPAIR.toUpperCase() || !this.selectedWindshieldOptions.selectedWindshieldReplaceOptions) return false;
if (!this.selectedDamageLocations?.includes("Windshield") || this.selectedWindshieldOptions.selectedWindshieldDamageType === damageLocationsSelected.REPAIR || !this.selectedWindshieldOptions.selectedWindshieldReplaceOptions) return false;
return this.selectedWindshieldOptions.selectedWindshieldReplaceOptions.some(selectedSingleWindshield =>
{

View file

@ -61,7 +61,7 @@ defineRule("check-for-repair-and-replace", (selectedWindshieldDamageType, [selec
selectedDamageLocations.length === 1;
});
defineRule("repair-only", (value) => {
return value.toString().toUpperCase() === damageLocationsSelected.REPAIR.toUpperCase();
return value.toString() === damageLocationsSelected.REPAIR;
});
defineRule("prevent-split-and-single-together", (value) => {
if (value.toString().toUpperCase().includes(damageLocationsSelected.SINGLE.toUpperCase()) &&
@ -145,12 +145,12 @@ export default ({
isRepairOptionSelected(){
if (!this.selectedWindshieldDamageTypeValue) return false;
return this.selectedWindshieldDamageTypeValue.toUpperCase() === damageLocationsSelected.REPAIR.toUpperCase() && this.isWindshieldDamageLocation;
return this.selectedWindshieldDamageTypeValue === damageLocationsSelected.REPAIR && this.isWindshieldDamageLocation;
},
isReplaceOptionSelected(){
if (!this.selectedWindshieldDamageTypeValue) return false;
return this.selectedWindshieldDamageTypeValue.toUpperCase() === damageLocationsSelected.REPLACE.toUpperCase() && this.isWindshieldDamageLocation;
return this.selectedWindshieldDamageTypeValue === damageLocationsSelected.REPLACE && this.isWindshieldDamageLocation;
},
isWindshieldReplaceAvailable() {
return !(Array.isArray(this.windshieldAvailableReplacementOptions) && this.windshieldAvailableReplacementOptions.length < 1);