commit
c5426c5e04
14 changed files with 80 additions and 61 deletions
|
|
@ -7,11 +7,12 @@
|
||||||
<menuModal/>
|
<menuModal/>
|
||||||
</div>
|
</div>
|
||||||
<alert
|
<alert
|
||||||
class="position-absolute rounded-0 w-100 border-0 shadow-sm"
|
|
||||||
v-if="displayGlobalAlert"
|
v-if="displayGlobalAlert"
|
||||||
:alertClass="globalAlertMessage.type"
|
class="position-absolute rounded-0 w-100 border-0 shadow-sm"
|
||||||
|
cmsWidgetName="GlobalAlert"
|
||||||
:manualHeadline="globalAlertMessage.messageHeadline"
|
:manualHeadline="globalAlertMessage.messageHeadline"
|
||||||
:manualCopy="globalAlertMessage.messageCopy"
|
:manualCopy="globalAlertMessage.messageCopy"
|
||||||
|
:alertClass="globalAlertMessage.type"
|
||||||
v-bind:isDismissible="globalAlertMessage.isDismissible"
|
v-bind:isDismissible="globalAlertMessage.isDismissible"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -12,27 +12,33 @@
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" ref="funnelSubHeader" />
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" ref="funnelSubHeader" />
|
||||||
<div class="fade-on-route-transition sub-container make-tall">
|
<div class="fade-on-route-transition sub-container make-tall">
|
||||||
<customerQuestions ref="customerQuestions" v-model="customerQuestions" />
|
<customerQuestions ref="customerQuestions" v-model="customerQuestions" />
|
||||||
<alert ref="alertVinNotFound" v-if="displayVinNotFoundAlert"
|
<alert ref="alertVinNotFound"
|
||||||
|
v-if="displayVinNotFoundAlert"
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
cmsWidgetName="AlertVinNotFoundWidget"
|
cmsWidgetName="AlertVinNotFoundWidget"
|
||||||
alertClass="alert-danger"
|
alertClass="alert-danger"
|
||||||
v-bind:isDismissible="false"
|
v-bind:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
<alert ref="alertMatchedDifferentVehicle" v-if="displayMatchedDifferentVehicleAlert"
|
<alert ref="alertMatchedDifferentVehicle"
|
||||||
|
v-if="displayMatchedDifferentVehicleAlert"
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
|
cmsWidgetName="AlertMatchedDifferentVehicleWidget"
|
||||||
:manualHeadline="AlertMatchedDifferentVehicleHeader"
|
:manualHeadline="AlertMatchedDifferentVehicleHeader"
|
||||||
:manualCopy="AlertMatchedDifferentVehicleBody"
|
:manualCopy="AlertMatchedDifferentVehicleBody"
|
||||||
alertClass="alert-warning"
|
alertClass="alert-warning"
|
||||||
v-bind:isDismissible="false"
|
v-bind:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
<alert ref="alertNonServiceableZip" v-if="displayNonServiceableZipAlert"
|
<alert ref="alertNonServiceableZip"
|
||||||
|
v-if="displayNonServiceableZipAlert"
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
alertClass="alert-danger"
|
cmsWidgetName="AlertNonServiceableZipWidget"
|
||||||
:manualHeadline="AlertNonServiceableZipHeader"
|
:manualHeadline="AlertNonServiceableZipHeader"
|
||||||
:manualCopy="AlertNonServiceableZipBody"
|
:manualCopy="AlertNonServiceableZipBody"
|
||||||
|
alertClass="alert-danger"
|
||||||
v-bind:isDismissible="false"
|
v-bind:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
<alert ref="alertVinLookupsByHomeAddressNotAllowed" v-if="displayVinLookupByHomeAddressNotAllowedAlert"
|
<alert ref="alertVinLookupsByHomeAddressNotAllowed"
|
||||||
|
v-if="displayVinLookupByHomeAddressNotAllowedAlert"
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
cmsWidgetName="AlertVinLookupsByHomeAddressNotAllowedWidget"
|
cmsWidgetName="AlertVinLookupsByHomeAddressNotAllowedWidget"
|
||||||
alertClass="alert-danger"
|
alertClass="alert-danger"
|
||||||
|
|
|
||||||
|
|
@ -57,13 +57,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
<alert ref="alertVerificationWarning" v-if="displayVerificationWarning"
|
<alert ref="alertVerificationWarning"
|
||||||
|
v-if="displayVerificationWarning"
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
cmsWidgetName="AlertVerificationWarningWidget"
|
cmsWidgetName="AlertVerificationWarningWidget"
|
||||||
alertClass="alert-warning"
|
alertClass="alert-warning"
|
||||||
v-bind:isDismissible="false"
|
v-bind:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
<alert ref="alertNoMatchWarning" v-if="displayNoMatchWarning"
|
<alert ref="alertNoMatchWarning"
|
||||||
|
v-if="displayNoMatchWarning"
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
cmsWidgetName="AlertNoMatchWarningWidget"
|
cmsWidgetName="AlertNoMatchWarningWidget"
|
||||||
alertClass="alert-warning"
|
alertClass="alert-warning"
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@
|
||||||
isRequired=true
|
isRequired=true
|
||||||
:validation-rules="validationRules"
|
:validation-rules="validationRules"
|
||||||
/>
|
/>
|
||||||
<alert
|
<alert ref="differentVehicleAlert"
|
||||||
ref="differentVehicleAlert"
|
|
||||||
v-if="isCarIdDifferent"
|
v-if="isCarIdDifferent"
|
||||||
class="my-3"
|
class="my-3"
|
||||||
alertClass="alert-warning"
|
cmsWidgetName="FoundWindshield"
|
||||||
:manualHeadline="differentVehicleAlertHeader"
|
:manualHeadline="differentVehicleAlertHeader"
|
||||||
:manualCopy="differentVehicleAlertBody"
|
:manualCopy="differentVehicleAlertBody"
|
||||||
|
alertClass="alert-warning"
|
||||||
v-bind:isDismissible="false"
|
v-bind:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,15 @@
|
||||||
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
|
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
|
||||||
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage="false" />
|
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage="false" />
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||||
<alert
|
<alert ref="alertFoundMultipleVehicles"
|
||||||
ref="alertFoundMultipleVehicles"
|
|
||||||
class="my-5"
|
class="my-5"
|
||||||
alertClass="alert-warning"
|
cmsWidgetName="FoundMultipleVehicles"
|
||||||
:manualHeadline="AlertFoundMultipleVehiclesHeader"
|
:manualHeadline="AlertFoundMultipleVehiclesHeader"
|
||||||
manualCopy=""
|
manualCopy=""
|
||||||
|
alertClass="alert-warning"
|
||||||
v-bind:isDismissible="false"
|
v-bind:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
<addressVehiclesQuestion
|
<addressVehiclesQuestion ref="addressVehiclesQuestion"
|
||||||
ref="addressVehiclesQuestion"
|
|
||||||
cmsWidgetName="VehicleConfirmationQuestion"
|
cmsWidgetName="VehicleConfirmationQuestion"
|
||||||
:vehicles="VehiclesForQuestions"
|
:vehicles="VehiclesForQuestions"
|
||||||
validationRules="vehicle-required"
|
validationRules="vehicle-required"
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,10 @@
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||||
<div class="fade-on-route-transition sub-container make-tall">
|
<div class="fade-on-route-transition sub-container make-tall">
|
||||||
<alert
|
<alert
|
||||||
class="vinLookupMethodHeading"
|
class="vinLookupMethodHeading"
|
||||||
v-model="customAlertData"
|
cmsWidgetName="AlertVinLookupQuestion"
|
||||||
alertClass=""
|
alertClass=""
|
||||||
cmsWidgetName="AlertVinLookupQuestion"
|
/>
|
||||||
/>
|
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
cmsWidgetName="VinLookupMethod"
|
cmsWidgetName="VinLookupMethod"
|
||||||
:answers="answersFromCms"
|
:answers="answersFromCms"
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<alert
|
<alert
|
||||||
|
v-if="!isRegistrationZipServicable && isVinValid && !isCarIdDifferent"
|
||||||
class="my-3"
|
class="my-3"
|
||||||
|
cmsWidgetName="NoServiceZipWidget"
|
||||||
:manualHeadline="NoServiceZipHeader"
|
:manualHeadline="NoServiceZipHeader"
|
||||||
:manualCopy="NoServiceZipBody"
|
:manualCopy="NoServiceZipBody"
|
||||||
v-if="!isRegistrationZipServicable && isVinValid && !isCarIdDifferent"
|
|
||||||
alertClass="alert-danger"
|
alertClass="alert-danger"
|
||||||
/>
|
/>
|
||||||
<div class="row my-2">
|
<div class="row my-2">
|
||||||
|
|
@ -58,14 +59,17 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<alert class="my-3"
|
<alert
|
||||||
cmsWidgetName="NoMatchAlertWidget"
|
|
||||||
v-if="!isVinValid"
|
v-if="!isVinValid"
|
||||||
|
class="my-3"
|
||||||
|
cmsWidgetName="NoMatchAlertWidget"
|
||||||
alertClass="alert-warning" />
|
alertClass="alert-warning" />
|
||||||
<alert class="my-3"
|
<alert
|
||||||
|
v-if="isCarIdDifferent"
|
||||||
|
class="my-3"
|
||||||
|
cmsWidgetName="MatchedDifferentVehicleAlertWidget"
|
||||||
:manualHeadline="MatchedDifferentVehicleAlertHeader"
|
:manualHeadline="MatchedDifferentVehicleAlertHeader"
|
||||||
:manualCopy="MatchedDifferentVehicleAlertBody"
|
:manualCopy="MatchedDifferentVehicleAlertBody"
|
||||||
v-if="isCarIdDifferent"
|
|
||||||
alertClass="alert-warning"
|
alertClass="alert-warning"
|
||||||
/>
|
/>
|
||||||
<funnelFooter
|
<funnelFooter
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ describe("vehicle-damage.vue", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("alert", () => {
|
describe("alert", () => {
|
||||||
test("when displayVehicleChangeAlert router params is true, the alert: 'vehicleChangeAlert' should be visible", () => {
|
test("when displayVehicleChangeAlert router params is true, the alert: 'vehicleChangeAlert' should be rendered", () => {
|
||||||
// Arrange & Act
|
// Arrange & Act
|
||||||
const { wrapper } = setupMocks({
|
const { wrapper } = setupMocks({
|
||||||
mountOptionsMockData: {
|
mountOptionsMockData: {
|
||||||
|
|
@ -272,10 +272,10 @@ describe("vehicle-damage.vue", () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).isVisible()).toBe(true);
|
expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).exists()).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("when displayVehicleChangeAlert router params is false, the alert: 'vehicleChangeAlert' should not be visible", () => {
|
test("when displayVehicleChangeAlert router params is false, the alert: 'vehicleChangeAlert' should not be rendered", () => {
|
||||||
// Arrange & Act
|
// Arrange & Act
|
||||||
const { wrapper } = setupMocks({
|
const { wrapper } = setupMocks({
|
||||||
mountOptionsMockData: {
|
mountOptionsMockData: {
|
||||||
|
|
@ -287,10 +287,10 @@ describe("vehicle-damage.vue", () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).isVisible()).toBe(false);
|
expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).exists()).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("when displayVehicleChangeAlert router params is undefined, the alert: 'vehicleChangeAlert' should not be visible", () => {
|
test("when displayVehicleChangeAlert router params is undefined, the alert: 'vehicleChangeAlert' should not be rednered", () => {
|
||||||
// Arrange & Act
|
// Arrange & Act
|
||||||
const { wrapper } = setupMocks({
|
const { wrapper } = setupMocks({
|
||||||
mountOptionsMockData: {
|
mountOptionsMockData: {
|
||||||
|
|
@ -302,7 +302,7 @@ describe("vehicle-damage.vue", () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).isVisible()).toBe(false);
|
expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).exists()).toBe(false);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,10 @@
|
||||||
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage=false />
|
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage=false />
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||||
<div class="fade-on-route-transition sub-container make-tall">
|
<div class="fade-on-route-transition sub-container make-tall">
|
||||||
<alert
|
<alert ref="vehicleChangeAlert"
|
||||||
ref="vehicleChangeAlert"
|
v-if="shouldDisplayVehicleChangeAlert"
|
||||||
class="mt-5 mb-0"
|
class="mt-5 mb-0"
|
||||||
cmsWidgetName="VehicleChangeAlert"
|
cmsWidgetName="VehicleChangeAlert"
|
||||||
v-show="shouldDisplayVehicleChangeAlert"
|
|
||||||
alertClass="alert-warning"
|
alertClass="alert-warning"
|
||||||
:isDismissible="false"
|
:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
|
|
@ -32,9 +31,9 @@
|
||||||
:selectedDamageLocations="selectedDamageLocations"
|
:selectedDamageLocations="selectedDamageLocations"
|
||||||
/>
|
/>
|
||||||
<alert
|
<alert
|
||||||
|
v-if="hasRepairReplaceConflict"
|
||||||
class="my-5"
|
class="my-5"
|
||||||
cmsWidgetName="HasReplacementConflict"
|
cmsWidgetName="HasReplacementConflict"
|
||||||
v-show="hasRepairReplaceConflict"
|
|
||||||
alertClass="alert-danger"
|
alertClass="alert-danger"
|
||||||
:isDismissible="false"
|
:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@
|
||||||
:validationRules="windshieldDamageTypeQuestionValidationRules"
|
:validationRules="windshieldDamageTypeQuestionValidationRules"
|
||||||
/>
|
/>
|
||||||
<alert
|
<alert
|
||||||
|
v-if="showNoReplacementAvailableError"
|
||||||
class="my-3"
|
class="my-3"
|
||||||
cmsWidgetName="NoReplacementAvailableError"
|
cmsWidgetName="NoReplacementAvailableError"
|
||||||
v-if="showNoReplacementAvailableError"
|
|
||||||
alertClass="alert-danger"
|
alertClass="alert-danger"
|
||||||
:isDismissible="false"
|
:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
|
|
@ -30,9 +30,9 @@
|
||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
<alert
|
<alert
|
||||||
|
v-if="hasSplitSingleConflict"
|
||||||
class="mt-5"
|
class="mt-5"
|
||||||
cmsWidgetName="SplitSingleConflict"
|
cmsWidgetName="SplitSingleConflict"
|
||||||
v-if="hasSplitSingleConflict"
|
|
||||||
alertClass="alert-danger"
|
alertClass="alert-danger"
|
||||||
:isDismissible="false"
|
:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<alert
|
<alert
|
||||||
class="rounded border-0 shadow-sm"
|
class="rounded border-0 shadow-sm"
|
||||||
alertClass="alert-warning"
|
|
||||||
cmsWidgetName="AlertWidget"
|
cmsWidgetName="AlertWidget"
|
||||||
|
alertClass="alert-warning"
|
||||||
:isDismissible="false"
|
:isDismissible="false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -60,49 +60,47 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<alert
|
<alert
|
||||||
class="my-4"
|
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="noMatchAlert"
|
v-if="noMatchAlert"
|
||||||
alertClass="alert-warning"
|
class="my-4"
|
||||||
cmsWidgetName="NoMatchAlertWidget"
|
cmsWidgetName="NoMatchAlertWidget"
|
||||||
|
alertClass="alert-warning"
|
||||||
/>
|
/>
|
||||||
<alert
|
<alert
|
||||||
|
v-if="isVinFieldReadOnly"
|
||||||
class="my-4"
|
class="my-4"
|
||||||
|
cmsWidgetName="PerfectMatchNewVinAlertReadOnly"
|
||||||
:manualHeadline="PerfectMatchNewVinAlertReadOnlyHeader"
|
:manualHeadline="PerfectMatchNewVinAlertReadOnlyHeader"
|
||||||
:manualCopy="PerfectMatchNewVinAlertReadOnlyBody"
|
:manualCopy="PerfectMatchNewVinAlertReadOnlyBody"
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="isVinFieldReadOnly"
|
|
||||||
alertClass="alert-success"
|
alertClass="alert-success"
|
||||||
/>
|
/>
|
||||||
<alert
|
<alert
|
||||||
|
v-if="isCarIdDifferent && !vinNotFound && !perfectMatchNewVinAlert"
|
||||||
class="my-4"
|
class="my-4"
|
||||||
|
cmsWidgetName="MatchedDifferentVehicle"
|
||||||
:manualHeadline="MatchedDifferentVehicleAlertHeader"
|
:manualHeadline="MatchedDifferentVehicleAlertHeader"
|
||||||
:manualCopy="MatchedDifferentVehicleAlertBody"
|
:manualCopy="MatchedDifferentVehicleAlertBody"
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="isCarIdDifferent && !vinNotFound && !perfectMatchNewVinAlert"
|
|
||||||
alertClass="alert-warning"
|
alertClass="alert-warning"
|
||||||
/>
|
/>
|
||||||
<alert
|
<alert
|
||||||
|
v-if="noServiceZip"
|
||||||
class="my-4"
|
class="my-4"
|
||||||
|
cmsWidgetName="NoServiceZipWidget"
|
||||||
:manualHeadline="NoServiceZipHeader"
|
:manualHeadline="NoServiceZipHeader"
|
||||||
:manualCopy="NoServiceZipBody"
|
:manualCopy="NoServiceZipBody"
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="noServiceZip"
|
|
||||||
alertClass="alert-danger"
|
alertClass="alert-danger"
|
||||||
/>
|
/>
|
||||||
<alert
|
<alert
|
||||||
class="my-4"
|
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="vinNotFound"
|
v-if="vinNotFound"
|
||||||
alertClass="alert-danger"
|
class="my-4"
|
||||||
cmsWidgetName="VinNotFound"
|
cmsWidgetName="VinNotFound"
|
||||||
|
alertClass="alert-danger"
|
||||||
/>
|
/>
|
||||||
<alert
|
<alert
|
||||||
|
v-if="perfectMatchNewVinAlert && !noServiceZip && !vinNotFound && meta.valid && !isVinFieldReadOnly"
|
||||||
class="my-4"
|
class="my-4"
|
||||||
|
cmsWidgetName="PerfectMatchNewVinAlert"
|
||||||
:manualHeadline="PerfectMatchNewVinAlertHeader"
|
:manualHeadline="PerfectMatchNewVinAlertHeader"
|
||||||
:manualCopy="PerfectMatchNewVinAlertBody"
|
:manualCopy="PerfectMatchNewVinAlertBody"
|
||||||
v-model="customAlertData"
|
|
||||||
v-if="perfectMatchNewVinAlert && !noServiceZip && !vinNotFound && meta.valid && !isVinFieldReadOnly"
|
|
||||||
alertClass="alert-success"
|
alertClass="alert-success"
|
||||||
/>
|
/>
|
||||||
<funnelFooter
|
<funnelFooter
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,10 @@ export default {
|
||||||
},
|
},
|
||||||
dynamicStrings(){
|
dynamicStrings(){
|
||||||
return dynamicStrings;
|
return dynamicStrings;
|
||||||
}
|
},
|
||||||
|
cssClassNameForCmsWidget(){
|
||||||
|
return "widget-name-" + this.cmsWidgetName;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div
|
<div
|
||||||
class="alert fade show text-center mb-0 py-2 px-4"
|
class="alert fade show text-center mb-0 py-2 px-4"
|
||||||
role="alert"
|
role="alert"
|
||||||
:class="[isDismissible ? 'alert-dismissible' : '', this.alertClass]"
|
:class="[isDismissible ? 'alert-dismissible' : '', this.alertClass, this.cssClassNameForCmsWidget]"
|
||||||
>
|
>
|
||||||
<p class="m-0 fw-bold alert-heading">{{ alertHeadline }}</p>
|
<p class="m-0 fw-bold alert-heading">{{ alertHeadline }}</p>
|
||||||
<template v-for="paragraph in splitAlertCopyForParagraphTag" :key="paragraph">
|
<template v-for="paragraph in splitAlertCopyForParagraphTag" :key="paragraph">
|
||||||
|
|
@ -54,7 +54,15 @@ export default {
|
||||||
alert-info (blue)
|
alert-info (blue)
|
||||||
*/
|
*/
|
||||||
alertClass: String,
|
alertClass: String,
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: {
|
||||||
|
type: String,
|
||||||
|
default(rawProps) {
|
||||||
|
if (!rawProps.cmsWidgetName) {
|
||||||
|
console.log('Error: Missing a CMS Widget Name (required field)');
|
||||||
|
}
|
||||||
|
return 'widgetUndefined';
|
||||||
|
},
|
||||||
|
},
|
||||||
manualHeadline: String,
|
manualHeadline: String,
|
||||||
manualCopy: String,
|
manualCopy: String,
|
||||||
shouldScrollToOnMount: {
|
shouldScrollToOnMount: {
|
||||||
|
|
@ -64,10 +72,10 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
alertHeadline(){
|
alertHeadline(){
|
||||||
return this.cmsWidgetName ? this.getCmsContent(this.cmsWidgetName, 'HeadlineText') : this.manualHeadline;
|
return this.manualHeadline ? this.manualHeadline : this.getCmsContent(this.cmsWidgetName, 'HeadlineText');
|
||||||
},
|
},
|
||||||
alertCopy(){
|
alertCopy(){
|
||||||
return this.cmsWidgetName ? this.getCmsContent(this.cmsWidgetName, 'BodyText') : this.manualCopy;
|
return this.manualCopy ? this.manualCopy : this.getCmsContent(this.cmsWidgetName, 'BodyText');
|
||||||
},
|
},
|
||||||
splitAlertCopyForParagraphTag(){
|
splitAlertCopyForParagraphTag(){
|
||||||
return splitCMSCopyOnParagraphTag(this.alertCopy);
|
return splitCMSCopyOnParagraphTag(this.alertCopy);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue