CASH-2449: added link to address

This commit is contained in:
Adam Caouette 2026-03-06 14:52:54 -05:00
parent a45d3d7f74
commit def39132eb
2 changed files with 40 additions and 1 deletions

View file

@ -16,8 +16,17 @@
<div class="col md-6 location-info">
<div
class="location-info-label"
v-if="this.buttonBodyCopy"
v-if="this.buttonBodyCopy && this.value === 'mobile'"
v-html="this.buttonBodyCopy"></div>
<div
class="location-info-label"
v-if="this.buttonBodyCopy && this.value === 'inshop'">
<textLink
linkType="newWindowLink"
:text="this.buttonBodyCopy"
:href="inshopHref"
target="_blank" />
</div>
</div>
<div class="col md-6 time-info" v-html="this.buttonFooterCopy"></div>
</div>
@ -36,12 +45,14 @@ import {
splitCopyOnCMSPlaceHolder,
doesCopyContainTextLink,
} from "@/helpers/cms-content-helper";
import baseMixin from "@/mixins/base-mixin.js";
export default {
name: "multiLocationRadioButton",
mixins: [inputButtonWrapperMixin],
components: {
baseInputButton,
textLink,
},
computed: {
arrayOfListItemsFromBodyText() {
@ -53,6 +64,19 @@ export default {
);
return displayPrice != this.additionalButtonData?.strikeThroughPrice;
},
isAppleBrowser() {
return baseMixin.methods.isAppleBrowser();
},
inshopHref() {
if (this.isAppleBrowser) {
return "https://maps.apple.com/?q=" + encodeURIComponent(this.buttonBodyCopy) + '"';
}
return (
"https://www.google.com/maps/search/?api=1&query=" +
encodeURIComponent(this.buttonBodyCopy) +
'"'
);
},
},
methods: {
getRouterLinkDisplayTextFromCopy,
@ -257,6 +281,12 @@ export default {
padding: 0 0.75rem 0 0;
@include blue-filter();
}
& > a.new-window-link {
margin-bottom: 0;
font-family: $font-family-sans-serif;
font-size: $font-size-12;
padding-bottom: 0;
}
}
@keyframes slideaway {

View file

@ -209,6 +209,15 @@ export default {
userAgent.includes("webOS")
);
},
isAppleBrowser() {
const userAgent = navigator.userAgent;
return (
userAgent.includes("iPod") ||
userAgent.includes("iPad") ||
userAgent.includes("iPhone") ||
userAgent.includes("Mac")
);
},
getSubmittedOrder() {
return JSON.parse(
window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE)