commit
This commit is contained in:
parent
489cf492af
commit
cef550b806
4 changed files with 39 additions and 12 deletions
|
|
@ -16,12 +16,23 @@
|
||||||
data-bs-dismiss="modal"
|
data-bs-dismiss="modal"
|
||||||
aria-label="Close"></button>
|
aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body ps-4 pe-4 pt-5 pb-4">
|
<div class="modal-body">
|
||||||
<h5 class="mb-4" v-html="this.ModalQuestionText"></h5>
|
<label
|
||||||
|
:aria-label="this.ModalQuestionText"
|
||||||
|
class="form-label text-center w-100 mb-5 fw-bold"
|
||||||
|
v-html="this.ModalQuestionText"></label>
|
||||||
</div>
|
</div>
|
||||||
|
<buttonQuestion
|
||||||
|
class="radioQuestion"
|
||||||
|
:questionText="questionText"
|
||||||
|
:answers="ModalSelectOptionAnswers"
|
||||||
|
groupName="ChooseVehicleYear"
|
||||||
|
v-model="selectedValue"
|
||||||
|
isRequired />
|
||||||
<div class="modal-footer px-5 py-4">
|
<div class="modal-footer px-5 py-4">
|
||||||
<buttonMain
|
<buttonMain
|
||||||
class="w-100"
|
class="w-100"
|
||||||
|
isPrimary
|
||||||
ref="buttonMain"
|
ref="buttonMain"
|
||||||
suppressLoader
|
suppressLoader
|
||||||
:buttonText="ModalSelectButtonText"
|
:buttonText="ModalSelectButtonText"
|
||||||
|
|
@ -45,6 +56,11 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
answers: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
ModalQuestionText() {
|
ModalQuestionText() {
|
||||||
return this.getCmsContent(this.cmsWidgetName, "QuestionText");
|
return this.getCmsContent(this.cmsWidgetName, "QuestionText");
|
||||||
|
|
@ -52,7 +68,7 @@ export default {
|
||||||
ModalSelectButtonText() {
|
ModalSelectButtonText() {
|
||||||
return this.getCmsContent(this.cmsWidgetName, "ButtonText");
|
return this.getCmsContent(this.cmsWidgetName, "ButtonText");
|
||||||
},
|
},
|
||||||
ModalSelectOptionText() {
|
ModalSelectOptionAnswers() {
|
||||||
return this.getCmsContent(this.cmsWidgetName, "Answers");
|
return this.getCmsContent(this.cmsWidgetName, "Answers");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -63,6 +79,7 @@ export default {
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
buttonMain,
|
buttonMain,
|
||||||
|
buttonQuestion,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -92,6 +109,8 @@ export default {
|
||||||
box-shadow: 0px 16px 48px -16px rgba(0, 0, 0, 0.25);
|
box-shadow: 0px 16px 48px -16px rgba(0, 0, 0, 0.25);
|
||||||
border-radius: 1.5rem 1.5rem 0 0;
|
border-radius: 1.5rem 1.5rem 0 0;
|
||||||
.modal-body {
|
.modal-body {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
padding-top:0px;
|
||||||
ul {
|
ul {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
@ -115,6 +134,12 @@ export default {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.radioQuestion
|
||||||
|
{
|
||||||
|
padding-bottom: 20px;
|
||||||
|
padding-right: 24px;
|
||||||
|
padding-left: 24px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
includeSearchIcon ? 'has-search-icon' : '',
|
includeSearchIcon ? 'has-search-icon' : '',
|
||||||
includeSelectIcon ? 'has-select-icon' : '',
|
includeSelectIcon ? 'has-select-icon' : '',
|
||||||
]">
|
]">
|
||||||
<input
|
<input
|
||||||
class="form-control"
|
class="form-control"
|
||||||
v-model.trim="value"
|
v-model.trim="value"
|
||||||
v-maska="mask"
|
v-maska="mask"
|
||||||
|
|
@ -37,9 +37,12 @@
|
||||||
@change="validationRules ? handleChange : () => {}"
|
@change="validationRules ? handleChange : () => {}"
|
||||||
@blur="validationRules ? handleChange : () => {}"
|
@blur="validationRules ? handleChange : () => {}"
|
||||||
:maxlength="maxLength ? maxLength : '999'"
|
:maxlength="maxLength ? maxLength : '999'"
|
||||||
@focus="$emit('focus', $event.target.value)" />
|
@focus="$emit('focus', $event.target.value)"
|
||||||
|
:data-bs-toggle="includeSelectIcon ? 'modal' : ''"
|
||||||
|
:data-bs-target="'#' + this.cmsWidgetName" />
|
||||||
<button v-if="includeSearchIcon" type="submit" aria-label="Search button" />
|
<button v-if="includeSearchIcon" type="submit" aria-label="Search button" />
|
||||||
<button v-if="includeSelectIcon" type="submit" aria-label="Select button" />
|
<button v-if="includeSelectIcon" type="submit" data-bs-toggle="modal"
|
||||||
|
:data-bs-target="'#' + this.cmsWidgetName" aria-label="Select button" />
|
||||||
</div>
|
</div>
|
||||||
<div v-show="errorMessage" class="row my-2 form-test-error">
|
<div v-show="errorMessage" class="row my-2 form-test-error">
|
||||||
<span class="d-inline-flex mt-0" role="alert">{{ errorMessage }}</span>
|
<span class="d-inline-flex mt-0" role="alert">{{ errorMessage }}</span>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
placeholderText="Select an option"
|
placeholderText="Select an option"
|
||||||
includeSelectIcon
|
includeSelectIcon
|
||||||
disableAutoFill
|
disableAutoFill
|
||||||
:data-bs-target="'#' + DamageCauseQuestion"
|
|
||||||
validationRules="damage-cause-required" />
|
validationRules="damage-cause-required" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -41,8 +40,8 @@
|
||||||
import { defineRule } from "vee-validate";
|
import { defineRule } from "vee-validate";
|
||||||
import { required } from "@/helpers/validation-rules";
|
import { required } from "@/helpers/validation-rules";
|
||||||
import { errorMessages } from "@/constants/error-messages";
|
import { errorMessages } from "@/constants/error-messages";
|
||||||
import textboxQuestion from "@/common-components/textbox-question/textbox-question"
|
import textboxQuestion from "@/common-components/textbox-question/textbox-question";
|
||||||
import buttonQuestionModal from "@/common-components/button-question-modal/button-question-modal"
|
import buttonQuestionModal from "@/common-components/button-question-modal/button-question-modal";
|
||||||
|
|
||||||
//define validation rules
|
//define validation rules
|
||||||
defineRule("loss-date-required", required(errorMessages.LOSS_DATE_REQUIRED));
|
defineRule("loss-date-required", required(errorMessages.LOSS_DATE_REQUIRED));
|
||||||
|
|
@ -60,7 +59,6 @@
|
||||||
},
|
},
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
},
|
},
|
||||||
components: { siteHeader, siteSubHeader, textboxQuestion },
|
|
||||||
async beforeRouteEnter(to, from, next)
|
async beforeRouteEnter(to, from, next)
|
||||||
{
|
{
|
||||||
// Call APIs
|
// Call APIs
|
||||||
|
|
@ -85,7 +83,7 @@
|
||||||
siteHeader,
|
siteHeader,
|
||||||
siteSubHeader,
|
siteSubHeader,
|
||||||
buttonQuestionModal,
|
buttonQuestionModal,
|
||||||
textboxQuestion
|
textboxQuestion,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
<span class="m-0">{{ this.buttonText }}</span>
|
<span class="m-0">{{ this.buttonText }}</span>
|
||||||
<loader
|
<loader
|
||||||
class="ms-2"
|
class="ms-2"
|
||||||
v-if="isLoaderDisplayed"
|
v-if="isLoaderDisplayed && !suppressLoader"
|
||||||
v-bind:class="[this.loaderColor, this.loaderPosition]" />
|
v-bind:class="[this.loaderColor, this.loaderPosition]" />
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -28,6 +28,7 @@ export default {
|
||||||
loaderColor: String,
|
loaderColor: String,
|
||||||
loaderPosition: String,
|
loaderPosition: String,
|
||||||
isFloat: Boolean,
|
isFloat: Boolean,
|
||||||
|
suppressLoader: Boolean,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue