CSR-715 Remove isUpperCase() for Repair/Replace
This commit is contained in:
parent
15718a6403
commit
9007f99cbc
2 changed files with 5 additions and 5 deletions
|
|
@ -361,7 +361,7 @@ export default {
|
||||||
isWindshieldRepair() {
|
isWindshieldRepair() {
|
||||||
if (!this.isWindshieldDamageLocation) return false;
|
if (!this.isWindshieldDamageLocation) return false;
|
||||||
|
|
||||||
return this.selectedWindshieldOptions.selectedWindshieldDamageType.toUpperCase() === damageLocationsSelected.REPAIR.toUpperCase();
|
return this.selectedWindshieldOptions.selectedWindshieldDamageType === damageLocationsSelected.REPAIR;
|
||||||
},
|
},
|
||||||
isDriverSideReplace() {
|
isDriverSideReplace() {
|
||||||
if (!this.isSideDoorDamageLocation) return false;
|
if (!this.isSideDoorDamageLocation) return false;
|
||||||
|
|
@ -383,7 +383,7 @@ export default {
|
||||||
return this.isWindshieldDamageLocation && this.selectedDamageLocations.length > 1 && this.isWindshieldRepair;
|
return this.isWindshieldDamageLocation && this.selectedDamageLocations.length > 1 && this.isWindshieldRepair;
|
||||||
},
|
},
|
||||||
hasSplitSingleConflict() {
|
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 =>
|
return this.selectedWindshieldOptions.selectedWindshieldReplaceOptions.some(selectedSingleWindshield =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ defineRule("check-for-repair-and-replace", (selectedWindshieldDamageType, [selec
|
||||||
selectedDamageLocations.length === 1;
|
selectedDamageLocations.length === 1;
|
||||||
});
|
});
|
||||||
defineRule("repair-only", (value) => {
|
defineRule("repair-only", (value) => {
|
||||||
return value.toString().toUpperCase() === damageLocationsSelected.REPAIR.toUpperCase();
|
return value.toString() === damageLocationsSelected.REPAIR;
|
||||||
});
|
});
|
||||||
defineRule("prevent-split-and-single-together", (value) => {
|
defineRule("prevent-split-and-single-together", (value) => {
|
||||||
if (value.toString().toUpperCase().includes(damageLocationsSelected.SINGLE.toUpperCase()) &&
|
if (value.toString().toUpperCase().includes(damageLocationsSelected.SINGLE.toUpperCase()) &&
|
||||||
|
|
@ -145,12 +145,12 @@ export default ({
|
||||||
isRepairOptionSelected(){
|
isRepairOptionSelected(){
|
||||||
if (!this.selectedWindshieldDamageTypeValue) return false;
|
if (!this.selectedWindshieldDamageTypeValue) return false;
|
||||||
|
|
||||||
return this.selectedWindshieldDamageTypeValue.toUpperCase() === damageLocationsSelected.REPAIR.toUpperCase() && this.isWindshieldDamageLocation;
|
return this.selectedWindshieldDamageTypeValue === damageLocationsSelected.REPAIR && this.isWindshieldDamageLocation;
|
||||||
},
|
},
|
||||||
isReplaceOptionSelected(){
|
isReplaceOptionSelected(){
|
||||||
if (!this.selectedWindshieldDamageTypeValue) return false;
|
if (!this.selectedWindshieldDamageTypeValue) return false;
|
||||||
|
|
||||||
return this.selectedWindshieldDamageTypeValue.toUpperCase() === damageLocationsSelected.REPLACE.toUpperCase() && this.isWindshieldDamageLocation;
|
return this.selectedWindshieldDamageTypeValue === damageLocationsSelected.REPLACE && this.isWindshieldDamageLocation;
|
||||||
},
|
},
|
||||||
isWindshieldReplaceAvailable() {
|
isWindshieldReplaceAvailable() {
|
||||||
return !(Array.isArray(this.windshieldAvailableReplacementOptions) && this.windshieldAvailableReplacementOptions.length < 1);
|
return !(Array.isArray(this.windshieldAvailableReplacementOptions) && this.windshieldAvailableReplacementOptions.length < 1);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue