INSR-7765 Heritage Policy Vehicle changes
This commit is contained in:
parent
8fafb118d4
commit
6f1f963604
4 changed files with 37 additions and 30 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
ref="policyVehiclesQuestion"
|
ref="policyVehiclesQuestion"
|
||||||
v-model="selectedVehicleVin"
|
v-model="selectedVehicleVin"
|
||||||
:questionText="questionText"
|
|
||||||
groupName="policyVehiclesQuestionOption"
|
groupName="policyVehiclesQuestionOption"
|
||||||
buttonTypeString="listButton"
|
buttonTypeString="listButton"
|
||||||
isOverflowScrollable
|
isOverflowScrollable
|
||||||
|
|
@ -25,9 +24,6 @@ export default ({
|
||||||
},
|
},
|
||||||
emits: ['update:modelValue'],
|
emits: ['update:modelValue'],
|
||||||
computed: {
|
computed: {
|
||||||
questionText() {
|
|
||||||
return this.getCmsContent('PolicyVehiclesQuestion', 'QuestionText');
|
|
||||||
},
|
|
||||||
answers() {
|
answers() {
|
||||||
const policyVehiclesAnswerFromCMS = this.getCmsContent('PolicyVehiclesQuestion', 'Answers');
|
const policyVehiclesAnswerFromCMS = this.getCmsContent('PolicyVehiclesQuestion', 'Answers');
|
||||||
const combinedVehicles = [...this.vehicles, ...policyVehiclesAnswerFromCMS];
|
const combinedVehicles = [...this.vehicles, ...policyVehiclesAnswerFromCMS];
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,20 @@
|
||||||
<div class="iss-heritage-container-width">
|
<div class="iss-heritage-container-width">
|
||||||
<div class="policy-vehicles-container iss-heritage-content-container-width">
|
<div class="policy-vehicles-container iss-heritage-content-container-width">
|
||||||
<div class="select-car-form rounded text-center">
|
<div class="select-car-form rounded text-center">
|
||||||
|
<siteSubHeader
|
||||||
|
cmsWidgetName="SiteSubHeaderWidget"
|
||||||
|
class="mt-4" />
|
||||||
<policyVehiclesQuestion
|
<policyVehiclesQuestion
|
||||||
v-model="selectedVehicleVin"
|
v-model="selectedVehicleVin"
|
||||||
cmsWidgetName="PolicyVehiclesQuestion"
|
cmsWidgetName="PolicyVehiclesQuestion"
|
||||||
:vehicles="VehiclesForQuestions"
|
:vehicles="VehiclesForQuestions"
|
||||||
:validationRules="rules.optionRequired" />
|
:validationRules="rules.optionRequired"
|
||||||
|
class="mb-2"/>
|
||||||
|
<buttonMain
|
||||||
|
:variant="buttonVariants.primary"
|
||||||
|
buttonText="Add another vehicle"
|
||||||
|
class="w-100"
|
||||||
|
@clickEvent="addAnotherVehicle" />
|
||||||
<alert
|
<alert
|
||||||
v-if="displayNoServiceAlert"
|
v-if="displayNoServiceAlert"
|
||||||
ref="AlertNoService"
|
ref="AlertNoService"
|
||||||
|
|
@ -59,10 +68,15 @@ import {
|
||||||
} from '@/helpers/policy-vehicle-helper';
|
} from '@/helpers/policy-vehicle-helper';
|
||||||
import coverageType from '@/constants/coverage-type';
|
import coverageType from '@/constants/coverage-type';
|
||||||
import alert from '@/ux-components/alert/alert.vue';
|
import alert from '@/ux-components/alert/alert.vue';
|
||||||
|
import siteSubHeader from '@/iss-components/site-sub-header/site-sub-header.vue';
|
||||||
|
import buttonMain from '@/ux-components/button-main/button-main.vue';
|
||||||
|
import buttonVariants from '@/constants/button-variants';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'policy-vehicles',
|
name: 'policy-vehicles',
|
||||||
components: {
|
components: {
|
||||||
|
buttonMain,
|
||||||
|
siteSubHeader,
|
||||||
siteHeader,
|
siteHeader,
|
||||||
siteFooter,
|
siteFooter,
|
||||||
policyVehiclesQuestion,
|
policyVehiclesQuestion,
|
||||||
|
|
@ -90,7 +104,8 @@ export default {
|
||||||
rules: {
|
rules: {
|
||||||
optionRequired: globalRules.OPTION_REQUIRED
|
optionRequired: globalRules.OPTION_REQUIRED
|
||||||
},
|
},
|
||||||
displayNoServiceAlert: false
|
displayNoServiceAlert: false,
|
||||||
|
buttonVariants
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -274,6 +289,10 @@ export default {
|
||||||
data: responseError.data
|
data: responseError.data
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
async addAnotherVehicle() {
|
||||||
|
this.selectedVehicleVin = vehicleSelectionOptions.VEHICLE_NOT_LISTED;
|
||||||
|
await this.forwardButtonAction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
&.list-button,
|
&.list-button,
|
||||||
&.list-button-horizontal,
|
&.list-button-horizontal,
|
||||||
&.list-card {
|
&.list-card {
|
||||||
&:not(.selected) {
|
&:not(.selected):not(.no-hover) {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
@include box-shadow-hover($blue-300);
|
@include box-shadow-hover($blue-300);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<baseInputButton
|
<baseInputButton
|
||||||
v-bind="$props"
|
v-bind="$props"
|
||||||
v-model="selectedValue"
|
v-model="selectedValue"
|
||||||
buttonWrapperClasses="list-group base-input-button list-button rounded-3 d-flex flex-column w-100 mb-2">
|
buttonWrapperClasses="list-group base-input-button list-button no-hover d-flex flex-column w-100 mb-2">
|
||||||
<div
|
<div
|
||||||
:aria-label="buttonLabel"
|
:aria-label="buttonLabel"
|
||||||
class="button-content list-button-content d-flex flex-column justify-content-center py-3 px-4">
|
class="button-content list-button-content d-flex flex-column justify-content-center py-3 px-4">
|
||||||
|
|
@ -67,6 +67,12 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
$heritage-border-radius: 60px;
|
||||||
|
$heritage-border-color: #CACBCC;
|
||||||
|
$heritage-box-shadow: 0 1px 5px rgba($black, 0.2);
|
||||||
|
$heritage-checked-background-color: #e7f1f6;
|
||||||
|
$heritage-checked-border-color: #0070d1;
|
||||||
|
|
||||||
.loader {
|
.loader {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
@ -75,26 +81,11 @@ export default {
|
||||||
input[type="radio"],
|
input[type="radio"],
|
||||||
input[type="checkbox"] {
|
input[type="checkbox"] {
|
||||||
position: static; //override bootstrap
|
position: static; //override bootstrap
|
||||||
|
|
||||||
&:focus-visible + .list-button-content {
|
|
||||||
box-shadow: 0 0 0 2.5px $blue;
|
|
||||||
}
|
|
||||||
&:focus + .list-button-content {
|
|
||||||
box-shadow: 0 0 0 2.5px $blue;
|
|
||||||
}
|
|
||||||
&:checked + .list-button-content {
|
&:checked + .list-button-content {
|
||||||
color: $black;
|
background: $heritage-checked-background-color;
|
||||||
font-weight: 500;
|
border-color: $heritage-checked-border-color;
|
||||||
background: $blue-100;
|
|
||||||
box-shadow: 0 0 0 1px $blue;
|
box-shadow: 0 0 0 1px $blue;
|
||||||
}
|
}
|
||||||
&:checked:focus + .list-button-content {
|
|
||||||
box-shadow: 0 0 0 2.5px $blue;
|
|
||||||
}
|
|
||||||
&:checked + .list-button-content p,
|
|
||||||
&:checked + .list-button-content span {
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
&:checked + .list-button-content span:nth-child(2) {
|
&:checked + .list-button-content span:nth-child(2) {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: $gray-600;
|
color: $gray-600;
|
||||||
|
|
@ -102,19 +93,20 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.list-button-content {
|
.list-button-content {
|
||||||
color: $gray-600;
|
color: $black;
|
||||||
|
font-weight: $font-weight-semibold;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: $white;
|
background: $white;
|
||||||
transition: all 150ms linear;
|
transition: all 150ms linear;
|
||||||
border-radius: $border-radius-lg;
|
border-radius: $heritage-border-radius;
|
||||||
border: 1px solid $gray-500;
|
border: 1px solid $heritage-border-color;
|
||||||
|
box-shadow: $heritage-box-shadow;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
&.small {
|
&.small {
|
||||||
font-size: 0.75rem;
|
color: $darker-gray;
|
||||||
color: $gray-550;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue