From 269ca9e25cad009916349d8b668b92891194e7c6 Mon Sep 17 00:00:00 2001 From: bmauger Date: Wed, 4 May 2022 16:13:28 -0400 Subject: [PATCH] Fix validation so it recognizes when a field has info in it. --- .../textbox-question/textbox-question.vue | 13 +++++++++---- .../heritage-integration/navigation-helper.js | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/common-components/textbox-question/textbox-question.vue b/src/common-components/textbox-question/textbox-question.vue index 00dcdfb88..41c5fc0a7 100644 --- a/src/common-components/textbox-question/textbox-question.vue +++ b/src/common-components/textbox-question/textbox-question.vue @@ -57,8 +57,13 @@ export default { const fieldOptions = { type: "text", value: props.modelValue, + potentialInitialValue: props.modelValue, }; + if (props.modelValue && props.modelValue.length > 0) { + fieldOptions['initialValue'] = fieldOptions.potentialInitialValue; + } + const { errorMessage, handleBlur, @@ -98,10 +103,10 @@ export default { words.forEach(function (word) { const position = 1; word = [word.toString().slice(0, position), noBreakChar, word.toString().slice(position)].join(''); - questionText += `${word} `; - }); - - questionText = questionText.trimEnd(); + questionText += `${word} `; + }); + + questionText = questionText.trimEnd(); } else { questionText = this.questionText.toString(); } diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index 221b7b79b..49c4ab354 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -93,7 +93,7 @@ async function getLatestPageForRedirection() { return fmgPageValues.VEHICLE_DAMAGE; } else { if (store.getters.vehicle.vin) { - return fmgPageValues.VIN_LOOKUP; + return fmgPageValues.LICENSE_PLATE_LOOKUP; } else { return fmgPageValues.VIN_LOOKUP; }