commit
06f67099fa
2 changed files with 63 additions and 4 deletions
|
|
@ -67,7 +67,7 @@ beforeEach(() => {
|
||||||
describe("mobile-details.vue", () => {
|
describe("mobile-details.vue", () => {
|
||||||
test("if the continue button is clicked, navigate forward", async () => {
|
test("if the continue button is clicked, navigate forward", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const { wrapper } = setupMocks(mobileDetails, {
|
const { wrapper } = setupMocks({
|
||||||
mixins: [mockMixin],
|
mixins: [mockMixin],
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
});
|
});
|
||||||
|
|
@ -91,7 +91,7 @@ describe("mobile-details.vue", () => {
|
||||||
});
|
});
|
||||||
test("arePagePrerequisitesValid should be true ", async () => {
|
test("arePagePrerequisitesValid should be true ", async () => {
|
||||||
//Arrange
|
//Arrange
|
||||||
const { wrapper } = setupMocks(mobileDetails, {
|
const { wrapper } = setupMocks({
|
||||||
mixins: [mockMixin],
|
mixins: [mockMixin],
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
});
|
});
|
||||||
|
|
@ -105,7 +105,7 @@ describe("mobile-details.vue", () => {
|
||||||
|
|
||||||
test("if the back button is clicked, navigate back", async () => {
|
test("if the back button is clicked, navigate back", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const { wrapper } = setupMocks(mobileDetails, {
|
const { wrapper } = setupMocks({
|
||||||
mixins: [mockMixin],
|
mixins: [mockMixin],
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,26 @@
|
||||||
<div class="col-12 col-md-10 col-lg-8 col-xl-7">
|
<div class="col-12 col-md-10 col-lg-8 col-xl-7">
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||||
<hr class="my-3" />
|
<hr class="my-3" />
|
||||||
<textBlock cmsWidgetName="AppointmentTimeOfService" class="time-header" />
|
<div class="date-time-edit">
|
||||||
|
<textBlock cmsWidgetName="AppointmentTimeOfService" class="time-header" />
|
||||||
|
<textLink
|
||||||
|
linkType="navigation"
|
||||||
|
:text="editLink"
|
||||||
|
@click-event="linkClick"
|
||||||
|
href="javascript:void(0)"
|
||||||
|
data-bs-target="#footerModal"
|
||||||
|
data-bs-dismiss="modal" />
|
||||||
|
</div>
|
||||||
<textBlock cmsWidgetName="AppointmentDateAndTime" />
|
<textBlock cmsWidgetName="AppointmentDateAndTime" />
|
||||||
<hr class="my-3" />
|
<hr class="my-3" />
|
||||||
<div class="mobile-location-questions">
|
<div class="mobile-location-questions">
|
||||||
<div class="address-questions-container">
|
<div class="address-questions-container">
|
||||||
|
<textBlock
|
||||||
|
cmsWidgetName="PleaseProvideAddressWidget"
|
||||||
|
class="provide-address-header" />
|
||||||
|
<textBlock
|
||||||
|
cmsWidgetName="VehicleKeysMessageWidget"
|
||||||
|
class="keys-message" />
|
||||||
<mobileAddressQuestions
|
<mobileAddressQuestions
|
||||||
ref="addressQuestions"
|
ref="addressQuestions"
|
||||||
v-model="this.addressQuestions"
|
v-model="this.addressQuestions"
|
||||||
|
|
@ -56,6 +71,8 @@ import store from "@/store";
|
||||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||||
import { AppointmentTypeStrings } from "@/constants/schedule-constants";
|
import { AppointmentTypeStrings } from "@/constants/schedule-constants";
|
||||||
|
import textLink from "@/ux-components/text-link/text-link";
|
||||||
|
import analyticsMixin from "@/mixins/analytics-mixin";
|
||||||
export default {
|
export default {
|
||||||
name: "MobileDetails",
|
name: "MobileDetails",
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -142,6 +159,17 @@ export default {
|
||||||
this.pageName
|
this.pageName
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
linkClick() {
|
||||||
|
// check session expired and initSession to recreate cookies
|
||||||
|
if (analyticsMixin.methods.sessionExpired()) {
|
||||||
|
this.routeReturnUser();
|
||||||
|
} else {
|
||||||
|
this.backButtonAction();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
routeReturnUser() {
|
||||||
|
this.$router.sendToReturnUser();
|
||||||
|
},
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
this.$router.navigateWithoutSaving(
|
this.$router.navigateWithoutSaving(
|
||||||
this.navigationScenarios.CLICKED_BACK,
|
this.navigationScenarios.CLICKED_BACK,
|
||||||
|
|
@ -156,6 +184,9 @@ export default {
|
||||||
AppointmentTimeOfService() {
|
AppointmentTimeOfService() {
|
||||||
return this.getCmsContent("AppointmentDateAndTime", "Text");
|
return this.getCmsContent("AppointmentDateAndTime", "Text");
|
||||||
},
|
},
|
||||||
|
editLink() {
|
||||||
|
return this.getCmsContent("EditLinkWidget", "Text");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
mobileAddressQuestions,
|
mobileAddressQuestions,
|
||||||
|
|
@ -166,6 +197,7 @@ export default {
|
||||||
funnelSubHeader,
|
funnelSubHeader,
|
||||||
Form,
|
Form,
|
||||||
loadingModal,
|
loadingModal,
|
||||||
|
textLink,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -175,5 +207,32 @@ export default {
|
||||||
font-family: UrbanistSemibold, Arial, Helvetica, sans-serif;
|
font-family: UrbanistSemibold, Arial, Helvetica, sans-serif;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: $black;
|
color: $black;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.provide-address-header {
|
||||||
|
font-family: UrbanistSemibold, Arial, Helvetica, sans-serif;
|
||||||
|
font-weight: 600;
|
||||||
|
color: $black;
|
||||||
|
line-height: 1.625rem;
|
||||||
|
letter-spacing: 0.03rem;
|
||||||
|
}
|
||||||
|
.keys-message {
|
||||||
|
background-color: #fff5eb;
|
||||||
|
color: #4d5151;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0.5rem 1rem 0.5rem 1rem;
|
||||||
|
min-height: 3.656rem;
|
||||||
|
line-height: 1.625rem;
|
||||||
|
margin-top: 1.25rem;
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
border-radius: 5px;
|
||||||
|
letter-spacing: 0;
|
||||||
|
}
|
||||||
|
.date-time-edit {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue