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
|
||||
:max="new Date().toJSON().slice(0,10)"
|
||||
:min="'1972-12-01'"
|
||||
validationRules="loss-date-required"
|
||||
validationRules="loss-date-required"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -54,34 +54,7 @@
|
|||
/>
|
||||
</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">
|
||||
<buttonQuestion
|
||||
class="px-0"
|
||||
|
|
@ -121,6 +94,36 @@
|
|||
disableAutoFill />
|
||||
</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="col">
|
||||
<site-footer
|
||||
|
|
@ -184,8 +187,8 @@
|
|||
mixins: [BaseFormMixin],
|
||||
data() {
|
||||
return {
|
||||
welcomePageModel: this.getWelcomePageModelFromStore()
|
||||
};
|
||||
welcomePageModel: this.getWelcomePageModelFromStore()
|
||||
};
|
||||
},
|
||||
setup() {
|
||||
const mainStore = useMainStore();
|
||||
|
|
@ -210,9 +213,9 @@
|
|||
|
||||
//use resultMap to populate layout content.
|
||||
let resultMap = await settleAllPromises(promiseResultMap);
|
||||
|
||||
|
||||
next((vm) => {
|
||||
vm.setCmsContent(resultMap.cmsContent);
|
||||
vm.setCmsContent(resultMap.cmsContent);
|
||||
});
|
||||
},
|
||||
methods:
|
||||
|
|
@ -320,6 +323,12 @@
|
|||
};
|
||||
},
|
||||
},
|
||||
displayDamageCityQuestion(){
|
||||
return !!this.$root.cmsContentByWidget.DamageCityQuestion;
|
||||
},
|
||||
displayDamageStateQuestion(){
|
||||
return !!this.$root.cmsContentByWidget.DamageStateQuestion;
|
||||
},
|
||||
},
|
||||
components: {
|
||||
siteHeader,
|
||||
|
|
|
|||
Loading…
Reference in a new issue