Merge pull request #1002 from Safelite/feature/INSR-7977
INSR-7977: Policy-vehicles UI updates
This commit is contained in:
commit
80ced3018a
4 changed files with 60 additions and 14 deletions
|
|
@ -186,7 +186,7 @@ export default {
|
||||||
VehiclesForQuestions() {
|
VehiclesForQuestions() {
|
||||||
// Map API result data, to address-vehicles data structure
|
// Map API result data, to address-vehicles data structure
|
||||||
const mappedData = this.VehiclesFromApi.map((v) => {
|
const mappedData = this.VehiclesFromApi.map((v) => {
|
||||||
const maskSymbol = 'X';
|
const maskSymbol = '*';
|
||||||
const vinStart = maskSymbol.repeat(v.vin.length - 6);
|
const vinStart = maskSymbol.repeat(v.vin.length - 6);
|
||||||
const vinEnd = v.vin.substring(v.vin.length - 6);
|
const vinEnd = v.vin.substring(v.vin.length - 6);
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
ref="policyVehiclesQuestion"
|
ref="policyVehiclesQuestion"
|
||||||
v-model="selectedVehicleVin"
|
v-model="selectedVehicleVin"
|
||||||
groupName="policyVehiclesQuestionOption"
|
groupName="policyVehiclesQuestionOption"
|
||||||
buttonTypeString="listButton"
|
buttonTypeString="listButton"
|
||||||
isOverflowScrollable
|
isOverflowScrollable
|
||||||
:answers="answers"
|
:answers="answers"
|
||||||
isRequired
|
isRequired
|
||||||
:validationRules="validationRules" />
|
:validationRules="validationRules" />
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import buttonQuestion from '@/digital-components/button-question/button-question.vue';
|
import buttonQuestion from '@/digital-components/button-question/button-question.vue';
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
cmsWidgetName="PolicyVehiclesQuestion"
|
cmsWidgetName="PolicyVehiclesQuestion"
|
||||||
:vehicles="VehiclesForQuestions"
|
:vehicles="VehiclesForQuestions"
|
||||||
:validationRules="rules.optionRequired"
|
:validationRules="rules.optionRequired"
|
||||||
class="mb-2"/>
|
class="mb-2" />
|
||||||
<buttonMain
|
<buttonMain
|
||||||
:variant="buttonVariants.primary"
|
:variant="buttonVariants.primary"
|
||||||
buttonText="Add another vehicle"
|
buttonText="Add another vehicle"
|
||||||
|
|
@ -114,7 +114,7 @@ export default {
|
||||||
const vehicles = this.policyVehicles;
|
const vehicles = this.policyVehicles;
|
||||||
const mappedData =
|
const mappedData =
|
||||||
vehicles?.map((v) => {
|
vehicles?.map((v) => {
|
||||||
const maskSymbol = 'X';
|
const maskSymbol = '*';
|
||||||
const vinStart = maskSymbol.repeat(v.vin.length - 6);
|
const vinStart = maskSymbol.repeat(v.vin.length - 6);
|
||||||
const vinEnd = v.vin.substring(v.vin.length - 6);
|
const vinEnd = v.vin.substring(v.vin.length - 6);
|
||||||
return {
|
return {
|
||||||
|
|
@ -122,7 +122,7 @@ export default {
|
||||||
vehicle: v,
|
vehicle: v,
|
||||||
Text: `${v.vehicleYear} ${v.vehicleMake} ${v.vehicleModel}`,
|
Text: `${v.vehicleYear} ${v.vehicleMake} ${v.vehicleModel}`,
|
||||||
Name: v.vin,
|
Name: v.vin,
|
||||||
SubText: `VIN ${vinStart}${vinEnd}`
|
SubText: `VIN: ${vinStart}${vinEnd}`
|
||||||
};
|
};
|
||||||
}) ?? [];
|
}) ?? [];
|
||||||
return mappedData;
|
return mappedData;
|
||||||
|
|
@ -304,6 +304,10 @@ export default {
|
||||||
min-height: 1px;
|
min-height: 1px;
|
||||||
padding-left: .9375rem;
|
padding-left: .9375rem;
|
||||||
padding-right: .9375rem;
|
padding-right: .9375rem;
|
||||||
|
|
||||||
|
.subheader-secondary p {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -319,4 +323,10 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-button-content {
|
||||||
|
span.small {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ html {
|
||||||
border: 1px solid $red;
|
border: 1px solid $red;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
|
border-radius: 60px;
|
||||||
|
|
||||||
.button-content {
|
.button-content {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
@ -28,6 +29,7 @@ html {
|
||||||
|
|
||||||
&.list-card {
|
&.list-card {
|
||||||
border: 1px solid $red;
|
border: 1px solid $red;
|
||||||
|
border-radius: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.ui-radio {
|
&.ui-radio {
|
||||||
|
|
@ -48,7 +50,23 @@ html {
|
||||||
|
|
||||||
// END HOVER
|
// END HOVER
|
||||||
|
|
||||||
&.list-button,
|
&.list-button {
|
||||||
|
color: $red;
|
||||||
|
|
||||||
|
input[type="checkbox"]:focus+label,
|
||||||
|
input[type="radio"]:focus+label {
|
||||||
|
box-shadow: 0 0 0 2.5px $red;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="checkbox"]:checked+label {
|
||||||
|
box-shadow: 0 0 0 1px $red;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-radius: 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.list-card {
|
&.list-card {
|
||||||
color: $red;
|
color: $red;
|
||||||
|
|
||||||
|
|
@ -141,6 +159,7 @@ html {
|
||||||
border: 1px solid $success;
|
border: 1px solid $success;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
|
border-radius: 60px;
|
||||||
|
|
||||||
.button-content {
|
.button-content {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
@ -158,6 +177,7 @@ html {
|
||||||
|
|
||||||
&.list-card {
|
&.list-card {
|
||||||
border: 1px solid $success;
|
border: 1px solid $success;
|
||||||
|
border-radius: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.ui-radio {
|
&.ui-radio {
|
||||||
|
|
@ -178,7 +198,23 @@ html {
|
||||||
|
|
||||||
// END HOVER
|
// END HOVER
|
||||||
|
|
||||||
&.list-button,
|
&.list-button {
|
||||||
|
color: $success;
|
||||||
|
|
||||||
|
input[type="checkbox"]:focus+label,
|
||||||
|
input[type="radio"]:focus+label {
|
||||||
|
box-shadow: 0 0 0 2.5px $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="checkbox"]:checked+label {
|
||||||
|
box-shadow: 0 0 0 1px $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-radius: 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.list-card {
|
&.list-card {
|
||||||
color: $success;
|
color: $success;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue