Update welcome-page.vue
hide City and state fields based on client
This commit is contained in:
parent
99f594a21e
commit
1d400fe55c
1 changed files with 42 additions and 33 deletions
|
|
@ -30,7 +30,7 @@
|
||||||
disableAutoFill
|
disableAutoFill
|
||||||
:max="new Date().toJSON().slice(0,10)"
|
:max="new Date().toJSON().slice(0,10)"
|
||||||
:min="'1972-12-01'"
|
:min="'1972-12-01'"
|
||||||
validationRules="loss-date-required"
|
validationRules="loss-date-required"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -54,34 +54,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-4 px-3">
|
|
||||||
<div class="col">
|
|
||||||
<textboxQuestion
|
|
||||||
inputId="damageCityField"
|
|
||||||
cmsWidgetName="DamageCityQuestion"
|
|
||||||
v-model="welcomePageModel.damageCity"
|
|
||||||
isRequired
|
|
||||||
ref="damageCity"
|
|
||||||
disableAutoFill
|
|
||||||
validationRules="loss-city-required" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mt-4 px-3">
|
|
||||||
<div class="col">
|
|
||||||
<dropdownQuestion
|
|
||||||
cmsWidgetName="DamageStateQuestion"
|
|
||||||
v-model="welcomePageModel.damageState"
|
|
||||||
ref="state"
|
|
||||||
inputId="8fdf9dc2e13e430eb57529499dceb3eb"
|
|
||||||
:options="stateOptions"
|
|
||||||
validationRules="loss-state-required"
|
|
||||||
isRequired
|
|
||||||
disableAutoFill
|
|
||||||
placeHolderText="Select an option"
|
|
||||||
id="welcomeDropdown"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
class="px-0"
|
class="px-0"
|
||||||
|
|
@ -121,6 +94,36 @@
|
||||||
disableAutoFill />
|
disableAutoFill />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mt-4 px-3">
|
||||||
|
<div class="col">
|
||||||
|
<textboxQuestion
|
||||||
|
inputId="damageCityField"
|
||||||
|
cmsWidgetName="DamageCityQuestion"
|
||||||
|
v-model="welcomePageModel.damageCity"
|
||||||
|
isRequired
|
||||||
|
ref="damageCity"
|
||||||
|
disableAutoFill
|
||||||
|
v-if="this.displayDamageCityQuestion"
|
||||||
|
validationRules="loss-city-required" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mt-4 px-3">
|
||||||
|
<div class="col">
|
||||||
|
<dropdownQuestion
|
||||||
|
cmsWidgetName="DamageStateQuestion"
|
||||||
|
v-model="welcomePageModel.damageState"
|
||||||
|
ref="state"
|
||||||
|
inputId="8fdf9dc2e13e430eb57529499dceb3eb"
|
||||||
|
:options="stateOptions"
|
||||||
|
validationRules="loss-state-required"
|
||||||
|
isRequired
|
||||||
|
disableAutoFill
|
||||||
|
v-if="this.displayDamageStateQuestion"
|
||||||
|
placeHolderText="Select an option"
|
||||||
|
id="welcomeDropdown"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row mt-4 position-sticky top-100" id="welcomeFooter">
|
<div class="row mt-4 position-sticky top-100" id="welcomeFooter">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<site-footer
|
<site-footer
|
||||||
|
|
@ -184,8 +187,8 @@
|
||||||
mixins: [BaseFormMixin],
|
mixins: [BaseFormMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
welcomePageModel: this.getWelcomePageModelFromStore()
|
welcomePageModel: this.getWelcomePageModelFromStore()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const mainStore = useMainStore();
|
const mainStore = useMainStore();
|
||||||
|
|
@ -210,9 +213,9 @@
|
||||||
|
|
||||||
//use resultMap to populate layout content.
|
//use resultMap to populate layout content.
|
||||||
let resultMap = await settleAllPromises(promiseResultMap);
|
let resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
|
||||||
next((vm) => {
|
next((vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods:
|
methods:
|
||||||
|
|
@ -320,6 +323,12 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
displayDamageCityQuestion(){
|
||||||
|
return !!this.$root.cmsContentByWidget.DamageCityQuestion;
|
||||||
|
},
|
||||||
|
displayDamageStateQuestion(){
|
||||||
|
return !!this.$root.cmsContentByWidget.DamageStateQuestion;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
siteHeader,
|
siteHeader,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue