CASH-185
CASH-185 added success message to display when user clicks checkbox
This commit is contained in:
parent
001a3e0e86
commit
c3538ce36e
1 changed files with 56 additions and 0 deletions
|
|
@ -39,6 +39,13 @@
|
||||||
v-model="waitListRequested"
|
v-model="waitListRequested"
|
||||||
@click="waitListChecked" />
|
@click="waitListChecked" />
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="waitListRequested"
|
||||||
|
class="mt-5 rounded waitlist-success"
|
||||||
|
ref="waitlistSuccessMessage"
|
||||||
|
>
|
||||||
|
<img :src="WaitListSuccessImage" class="success-image"/>
|
||||||
|
<span v-html="WaitListSuccessText" class="success-text"></span>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mt-5 mb-2 supplemental-information"
|
class="mt-5 mb-2 supplemental-information"
|
||||||
v-if="supplementalInformationBlock"
|
v-if="supplementalInformationBlock"
|
||||||
|
|
@ -359,6 +366,12 @@ export default {
|
||||||
displayWaitListFeature() {
|
displayWaitListFeature() {
|
||||||
return this.displayWaitList;
|
return this.displayWaitList;
|
||||||
},
|
},
|
||||||
|
WaitListSuccessImage(){
|
||||||
|
return this.getCmsContent("WaitListSuccessWidget", "Image");
|
||||||
|
},
|
||||||
|
WaitListSuccessText(){
|
||||||
|
return this.getCmsContent("WaitListSuccessWidget", "BodyText");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openModal() {
|
openModal() {
|
||||||
|
|
@ -528,11 +541,24 @@ export default {
|
||||||
waitListChecked(event) {
|
waitListChecked(event) {
|
||||||
this.$emit("waitListRequested-emitted", event.target.checked);
|
this.$emit("waitListRequested-emitted", event.target.checked);
|
||||||
},
|
},
|
||||||
|
scrollToSuccessMessage() {
|
||||||
|
const successMessageElement = this.$refs.waitlistSuccessMessage;
|
||||||
|
if (successMessageElement) {
|
||||||
|
successMessageElement.scrollIntoView({ behavior: 'smooth' });
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
unmounted() {
|
unmounted() {
|
||||||
if (this.isModalOpened) this.closeModal();
|
if (this.isModalOpened) this.closeModal();
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
waitListRequested(newVal) {
|
||||||
|
if (newVal) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.scrollToSuccessMessage();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
modelValue: {
|
modelValue: {
|
||||||
handler(newValue) {
|
handler(newValue) {
|
||||||
this.handleChange(newValue);
|
this.handleChange(newValue);
|
||||||
|
|
@ -583,10 +609,40 @@ export default {
|
||||||
margin-bottom: -8px;
|
margin-bottom: -8px;
|
||||||
.ui-checkbox {
|
.ui-checkbox {
|
||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
|
input{
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0px 1px 4px 0px #00000033;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.form-check-input {
|
.form-check-input {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.waitlist-success {
|
||||||
|
background-color: #ECF5E9;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
border: 1px solid #0C7E47;
|
||||||
|
border-radius: 5px;
|
||||||
|
font-size: $h5-font-size;
|
||||||
|
padding: 12px 16px;
|
||||||
|
margin-bottom: -8px;
|
||||||
|
height: 78px;
|
||||||
|
width:326px;
|
||||||
|
.success-text{
|
||||||
|
margin-left:8px;
|
||||||
|
strong{
|
||||||
|
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 0%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.success-image{
|
||||||
|
margin-top: 4.5px;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
color:#0C7E47
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue