Merge pull request #288 from Safelite/feature/digital/SSR-390
Feature/digital/ssr 390
This commit is contained in:
commit
af8ecf5e9f
3 changed files with 9 additions and 16 deletions
|
|
@ -50,6 +50,7 @@ import { errorMessages } from "@/constants/error-messages";
|
|||
|
||||
export default {
|
||||
name: "glass-part-question",
|
||||
emits: ["update:modelValue"],
|
||||
inheritAttrs: false,
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -117,10 +118,8 @@ export default {
|
|||
return this.modelValue?.partNumber;
|
||||
},
|
||||
set(newValue) {
|
||||
this.$emit(
|
||||
"update:modelValue",
|
||||
this.partsForSelectedTint.filter((part) => part.partNumber == newValue.value)[0]
|
||||
);
|
||||
const part = this.partsForSelectedTint.filter((part) => part.partNumber == newValue?.value)[0];
|
||||
this.$emit("update:modelValue", part);
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -181,13 +180,6 @@ export default {
|
|||
return tintSourceObject.src;
|
||||
},
|
||||
|
||||
// Reset selections when tint changes for the same glass to ensure proper selection.
|
||||
// Also checks if only a single part is present for the tint.
|
||||
ResetTintAndPartSelections() {
|
||||
this.selectedPartNumber = null;
|
||||
this.AutoSelectIfSinglePart();
|
||||
},
|
||||
|
||||
AutoSelectIfSinglePart() {
|
||||
if (this.partsForSelectedTint?.length > 0)
|
||||
{
|
||||
|
|
@ -202,6 +194,9 @@ export default {
|
|||
radioInput?.click();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.selectedPartNumber = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -108,9 +108,7 @@ data() {
|
|||
},
|
||||
computed: {
|
||||
isForwardActionDisabled() {
|
||||
return (
|
||||
this.selectedGlassPartNumbers.length !== this.PartsFromApi.partsOrQuestions.length
|
||||
);
|
||||
return this.selectedGlassPartNumbers.length !== this.PartsFromApi.partsOrQuestions.length
|
||||
},
|
||||
selectedGlassPartNumbers() {
|
||||
// Compile all selected parts from the page.
|
||||
|
|
|
|||
Loading…
Reference in a new issue