WIP: Cleanup and fixes related to styling merge and others
This commit is contained in:
parent
ed8cd94ac0
commit
9ab7b79682
6 changed files with 42 additions and 82 deletions
|
|
@ -28,7 +28,9 @@ export default {
|
||||||
options: {
|
options: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
isDisabled: Boolean,
|
||||||
|
isRequired: Boolean,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
<template>
|
|
||||||
<label :for="inputId">{{ labelText }}</label>
|
|
||||||
<input v-model="value" type="text"
|
|
||||||
:ref="inputId"
|
|
||||||
:id="inputId"
|
|
||||||
:placeholder="placeholderText"
|
|
||||||
class="form-control"
|
|
||||||
autocomplete="off" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { useField } from "vee-validate";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "textQuestion",
|
|
||||||
props: {
|
|
||||||
modelValue: String,
|
|
||||||
labelText: String,
|
|
||||||
placeholderText: String,
|
|
||||||
inputId: String,
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
value: {
|
|
||||||
get: function() {
|
|
||||||
return this.modelValue;
|
|
||||||
},
|
|
||||||
set: function(newValue) {
|
|
||||||
this.$emit("update:modelValue", newValue);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,22 +1,41 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="textbox-question">
|
<div class="textbox-question">
|
||||||
<label :for="inputId" class="form-label">{{labelText}}</label>
|
<label :for="inputId" class="form-label">{{labelText}}</label>
|
||||||
<input type="text" class="form-control" :id="inputId" :placeholder="placeholderText" :aria-disabled="isDisabled" :disabled="isDisabled" :aria-required="isRequired">
|
<input v-model="value"
|
||||||
|
type="text"
|
||||||
|
class="form-control"
|
||||||
|
:ref="inputId"
|
||||||
|
:id="inputId"
|
||||||
|
:placeholder="placeholderText"
|
||||||
|
:aria-disabled="isDisabled"
|
||||||
|
:disabled="isDisabled"
|
||||||
|
:aria-required="isRequired"
|
||||||
|
autocomplete="off" />
|
||||||
<p class="mt-1 mb-0">There has been an error!</p>
|
<p class="mt-1 mb-0">There has been an error!</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "textboxQuestion",
|
name: "textbox-question",
|
||||||
props: {
|
props: {
|
||||||
isDisabled: Boolean,
|
|
||||||
modelValue: String,
|
modelValue: String,
|
||||||
labelText: String,
|
labelText: String,
|
||||||
placeholderText: String,
|
placeholderText: String,
|
||||||
inputId: String,
|
inputId: String,
|
||||||
|
isDisabled: Boolean,
|
||||||
isRequired: Boolean,
|
isRequired: Boolean,
|
||||||
}
|
},
|
||||||
|
computed: {
|
||||||
|
value: {
|
||||||
|
get: function() {
|
||||||
|
return this.modelValue;
|
||||||
|
},
|
||||||
|
set: function(newValue) {
|
||||||
|
this.$emit("update:modelValue", newValue);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,14 @@
|
||||||
<form>
|
<form>
|
||||||
<div class="row my-4">
|
<div class="row my-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textQuestion v-model="address.streetAddress" ref="autocomplete" inputId="autocomplete" placeholderText="Search" labelText="Street address" />
|
<textboxQuestion v-model="streetAddress" ref="autocomplete" inputId="autocomplete" placeholderText="Search" labelText="Street address" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<form>
|
<form>
|
||||||
<div v-show="showAddressFields" class="row my-4">
|
<div v-show="showAddressFields" class="row my-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textQuestion v-model="city" ref="city" inputId="city" labelText="City" />
|
<textboxQuestion v-model="city" ref="city" inputId="city" labelText="City" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<dropdownQuestion v-model="state" ref="state" inputId="state" :options="stateOptions" labelText="State" />
|
<dropdownQuestion v-model="state" ref="state" inputId="state" :options="stateOptions" labelText="State" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<textQuestion v-model="zip" ref="zip" inputId="zip" labelText="Zip" />
|
<textboxQuestion v-model="zip" ref="zip" inputId="zip" labelText="Zip" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import textQuestion from "@/common-components/text-question/text-question";
|
import textboxQuestion from "@/common-components/textbox-question/textbox-question";
|
||||||
import dropdownQuestion from "@/common-components/dropdown-question/dropdown-question";
|
import dropdownQuestion from "@/common-components/dropdown-question/dropdown-question";
|
||||||
import alert from "@/ux-components/alert/alert";
|
import alert from "@/ux-components/alert/alert";
|
||||||
//import store from "@/store";
|
//import store from "@/store";
|
||||||
|
|
@ -50,9 +50,6 @@ export default ({
|
||||||
showAddressFields: false,
|
showAddressFields: false,
|
||||||
displayVerificationWarning: false,
|
displayVerificationWarning: false,
|
||||||
displayNoMatchWarning: false,
|
displayNoMatchWarning: false,
|
||||||
address: {
|
|
||||||
streetAddress: "",
|
|
||||||
},
|
|
||||||
streetAddress: "",
|
streetAddress: "",
|
||||||
city: "",
|
city: "",
|
||||||
state: "",
|
state: "",
|
||||||
|
|
@ -230,7 +227,7 @@ export default ({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
textQuestion,
|
textboxQuestion,
|
||||||
dropdownQuestion,
|
dropdownQuestion,
|
||||||
alert,
|
alert,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,25 @@
|
||||||
<template>
|
<template>
|
||||||
<addressQuestions v-model="address" />
|
<addressQuestions />
|
||||||
<div class="row my-4">
|
<div class="row my-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textQuestion v-model="firstName" ref="firstName" inputId="firstName" labelText="First name" />
|
<textboxQuestion v-model="firstName" ref="firstName" inputId="firstName" labelText="First name" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row my-4">
|
<div class="row my-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textQuestion v-model="lastName" ref="lastName" inputId="lastName" labelText="Last name" />
|
<textboxQuestion v-model="lastName" ref="lastName" inputId="lastName" labelText="Last name" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<emailQuestion />
|
<div class="row my-4">
|
||||||
|
<div class="col">
|
||||||
|
<textboxQuestion v-model="emailAddress" ref="emailAddress" inputId="emailAddress" labelText="Email address" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import addressQuestions from "@/layouts/address-lookup/customer-questions/address-questions/address-questions";
|
import addressQuestions from "@/layouts/address-lookup/customer-questions/address-questions/address-questions";
|
||||||
import emailQuestion from "@/layouts/address-lookup/customer-questions/email-question/email-question";
|
import textboxQuestion from "@/common-components/textbox-question/textbox-question";
|
||||||
import textQuestion from "@/common-components/text-question/text-question";
|
|
||||||
|
|
||||||
//import store from "@/store";
|
//import store from "@/store";
|
||||||
|
|
||||||
|
|
@ -25,11 +27,9 @@ export default ({
|
||||||
name: "customer-questions",
|
name: "customer-questions",
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
address: {
|
|
||||||
streetAddress: "",
|
|
||||||
},
|
|
||||||
firstName: "",
|
firstName: "",
|
||||||
lastName: "",
|
lastName: "",
|
||||||
|
emailAddress: "",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -49,8 +49,7 @@ export default ({
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
addressQuestions,
|
addressQuestions,
|
||||||
emailQuestion,
|
textboxQuestion,
|
||||||
textQuestion,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="row my-4">
|
|
||||||
<div class="col">
|
|
||||||
<textQuestion v-model="email" ref="email" inputId="email" labelText="Email address" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import textQuestion from "@/common-components/text-question/text-question";
|
|
||||||
import store from "@/store";
|
|
||||||
|
|
||||||
export default ({
|
|
||||||
name: "emailQuestion",
|
|
||||||
data(){
|
|
||||||
return {
|
|
||||||
email: "",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
textQuestion,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
Loading…
Reference in a new issue