diff --git a/src/common-components/base-input-button/base-input-button.spec.js b/src/common-components/base-input-button/base-input-button.spec.js index 37e553391..ed76b319d 100644 --- a/src/common-components/base-input-button/base-input-button.spec.js +++ b/src/common-components/base-input-button/base-input-button.spec.js @@ -473,8 +473,6 @@ describe.skip("baseInputButton.vue", () => { }); }); -// TODO KO look at how I tested groups of these in SFA (making sure selecting one radio changes the value, etc, that this acts like a regular input aside from a different emitted event) - function setupMocks({ mockData = {}, shouldShallowMount = true }) { const baseInputButtonWrapper = { components: { baseInputButton }, diff --git a/src/common-components/button-question/button-question.vue b/src/common-components/button-question/button-question.vue index 1b75e8d9d..45616f849 100644 --- a/src/common-components/button-question/button-question.vue +++ b/src/common-components/button-question/button-question.vue @@ -177,7 +177,6 @@ export default { } }, buttonsInfo() { - // TODO KO temporary. It should always just be an array return (Array.isArray(this.answers) ? this.answers : [])?.map( (answer) => ({ buttonLabel: answer.buttonLabel ?? answer.Text ?? answer, diff --git a/src/layouts/vehicle-damage/side-door-options/side-door-options.vue b/src/layouts/vehicle-damage/side-door-options/side-door-options.vue index 9af96c117..99f644d6f 100644 --- a/src/layouts/vehicle-damage/side-door-options/side-door-options.vue +++ b/src/layouts/vehicle-damage/side-door-options/side-door-options.vue @@ -57,7 +57,7 @@ export default ({ name: "sideDoorOptions", props: { groupName: String, - modelValue: [Array, Object], // TODO Does this take an array? + modelValue: Object, selectedDamageLocations: Array, cmsWidgetName: String, }, diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue index 31b008760..8081bb2b2 100644 --- a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue +++ b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue @@ -57,8 +57,8 @@ defineRule("windshield-replace-options-required", required(errorMessages.WINSHIE defineRule("check-for-repair-and-replace", (selectedWindshieldDamageType, selectedDamageLocations) => { return selectedWindshieldDamageType.toString() != damageLocationsSelected.REPAIR || - (!selectedDamageLocations.includes(damageLocationsSelected.WINDSHIELD) && !selectedDamageLocations[0]?.includes(damageLocationsSelected.WINDSHIELD)) || - (selectedDamageLocations.length === 1 && selectedDamageLocations[0].length === 1); + (!selectedDamageLocations.includes(damageLocationsSelected.WINDSHIELD) && !selectedDamageLocations[0]?.includes(damageLocationsSelected.WINDSHIELD)) || + (selectedDamageLocations[0].length === 1); }); defineRule("repair-only", (value) => { return value.toString() === damageLocationsSelected.REPAIR; @@ -83,7 +83,7 @@ export default ({ }, props: { - modelValue: [Object, String], // TODO Does this take a string? + modelValue: Object, selectedDamageLocations: Array, hasRepairReplaceConflict: Boolean, hasSplitSingleConflict: Boolean, diff --git a/src/store/index.js b/src/store/index.js index 1d6e68482..8d2f6b309 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1044,11 +1044,8 @@ export const actions = { ); const isWindshieldRepairTheSame = isWindshieldRepair === context.state.order.damage.isRepair; - const isChipCountTheSame = Array.isArray(selectedWindshieldChipCount) //TODO: fix the underlying components so this is never an array - ? selectedWindshieldChipCount[0] === - context.state.order.damage.numberOfChips - : selectedWindshieldChipCount === - context.state.order.damage.numberOfChips; + + const isChipCountTheSame = selectedWindshieldChipCount === context.state.order.damage.numberOfChips; const isDamageChanging = !isGlassToReplaceTheSame ||