added missing alert to vin-lookup
This commit is contained in:
parent
2d73c30c4d
commit
162743b75f
3 changed files with 37 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
const vehicleLookupAlertTypes = Object.freeze({
|
||||
NOT_FOUND: 'notFound',
|
||||
NOT_MATCHED: 'notMatched',
|
||||
PERFECT_MATCH: 'perfectMatch',
|
||||
});
|
||||
|
||||
export default vehicleLookupAlertTypes;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<alert
|
||||
alertClass="alert-success"
|
||||
cmsWidgetName="AlertPerfectMatchInsuranceNotVerified"
|
||||
id="perfect-match-alert"
|
||||
aria-label="perfect-match-alert"
|
||||
/>
|
||||
</template>
|
||||
<script>
|
||||
import alert from '@/ux-components/alert/alert.vue';
|
||||
|
||||
export default {
|
||||
name: 'perfect-match-alert',
|
||||
components: {
|
||||
alert,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
/**
|
||||
Override wrong margin-bottom rule in the Alert component.
|
||||
*/
|
||||
#perfect-match-found-alert p:last-of-type {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -9,18 +9,24 @@
|
|||
<vehicleNotMatchedAlert
|
||||
v-else-if="isVehicleNotMatchedVisible"
|
||||
/>
|
||||
<perfectMatchAlert
|
||||
v-else-if="isPerfectMatchVisible"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import vehicleLookupAlertTypes from '@/constants/vehicle-lookup-alert-types';
|
||||
import vehicleNotFoundAlert from './vehicle-not-found-alert/vehicle-not-found-alert.vue';
|
||||
import vehicleNotMatchedAlert from './vehicle-not-matched-alert/vehicle-not-matched-alert.vue';
|
||||
import perfectMatchAlert from './perfect-match-alert/perfect-match-alert.vue';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'vin-lookup-alerts',
|
||||
components: {
|
||||
vehicleNotFoundAlert,
|
||||
vehicleNotMatchedAlert,
|
||||
perfectMatchAlert,
|
||||
},
|
||||
props: {
|
||||
activeAlertType: {
|
||||
|
|
@ -39,6 +45,9 @@ export default {
|
|||
isVehicleNotMatchedVisible() {
|
||||
return this.activeAlertType === vehicleLookupAlertTypes.NOT_MATCHED;
|
||||
},
|
||||
isPerfectMatchVisible() {
|
||||
return this.activeAlertType === vehicleLookupAlertTypes.PERFECT_MATCH;
|
||||
},
|
||||
wrapperCssClass() {
|
||||
return {
|
||||
'mb-5': this.activeAlertType !== null,
|
||||
|
|
|
|||
Loading…
Reference in a new issue