Merge pull request #2808 from Safelite/feature/CASH-1184

CASH-1184
This commit is contained in:
Johnny Shultz 2025-08-28 16:42:17 -04:00 committed by GitHub
commit 06f67099fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 63 additions and 4 deletions

View file

@ -67,7 +67,7 @@ beforeEach(() => {
describe("mobile-details.vue", () => {
test("if the continue button is clicked, navigate forward", async () => {
// Arrange
const { wrapper } = setupMocks(mobileDetails, {
const { wrapper } = setupMocks({
mixins: [mockMixin],
attachTo: document.body,
});
@ -91,7 +91,7 @@ describe("mobile-details.vue", () => {
});
test("arePagePrerequisitesValid should be true ", async () => {
//Arrange
const { wrapper } = setupMocks(mobileDetails, {
const { wrapper } = setupMocks({
mixins: [mockMixin],
attachTo: document.body,
});
@ -105,7 +105,7 @@ describe("mobile-details.vue", () => {
test("if the back button is clicked, navigate back", async () => {
// Arrange
const { wrapper } = setupMocks(mobileDetails, {
const { wrapper } = setupMocks({
mixins: [mockMixin],
attachTo: document.body,
});

View file

@ -7,11 +7,26 @@
<div class="col-12 col-md-10 col-lg-8 col-xl-7">
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<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" />
<hr class="my-3" />
<div class="mobile-location-questions">
<div class="address-questions-container">
<textBlock
cmsWidgetName="PleaseProvideAddressWidget"
class="provide-address-header" />
<textBlock
cmsWidgetName="VehicleKeysMessageWidget"
class="keys-message" />
<mobileAddressQuestions
ref="addressQuestions"
v-model="this.addressQuestions"
@ -56,6 +71,8 @@ import store from "@/store";
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
import { settleAllPromises } from "@/helpers/layout-helper";
import { AppointmentTypeStrings } from "@/constants/schedule-constants";
import textLink from "@/ux-components/text-link/text-link";
import analyticsMixin from "@/mixins/analytics-mixin";
export default {
name: "MobileDetails",
data() {
@ -142,6 +159,17 @@ export default {
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() {
this.$router.navigateWithoutSaving(
this.navigationScenarios.CLICKED_BACK,
@ -156,6 +184,9 @@ export default {
AppointmentTimeOfService() {
return this.getCmsContent("AppointmentDateAndTime", "Text");
},
editLink() {
return this.getCmsContent("EditLinkWidget", "Text");
},
},
components: {
mobileAddressQuestions,
@ -166,6 +197,7 @@ export default {
funnelSubHeader,
Form,
loadingModal,
textLink,
},
};
</script>
@ -175,5 +207,32 @@ export default {
font-family: UrbanistSemibold, Arial, Helvetica, sans-serif;
font-weight: 600;
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>