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="col md-6 location-info">
<div <div
class="location-info-label" class="location-info-label"
v-if="this.buttonBodyCopy" v-if="this.buttonBodyCopy && this.value === 'mobile'"
v-html="this.buttonBodyCopy"></div> 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>
<div class="col md-6 time-info" v-html="this.buttonFooterCopy"></div> <div class="col md-6 time-info" v-html="this.buttonFooterCopy"></div>
</div> </div>
@ -36,12 +45,14 @@ import {
splitCopyOnCMSPlaceHolder, splitCopyOnCMSPlaceHolder,
doesCopyContainTextLink, doesCopyContainTextLink,
} from "@/helpers/cms-content-helper"; } from "@/helpers/cms-content-helper";
import baseMixin from "@/mixins/base-mixin.js";
export default { export default {
name: "multiLocationRadioButton", name: "multiLocationRadioButton",
mixins: [inputButtonWrapperMixin], mixins: [inputButtonWrapperMixin],
components: { components: {
baseInputButton, baseInputButton,
textLink,
}, },
computed: { computed: {
arrayOfListItemsFromBodyText() { arrayOfListItemsFromBodyText() {
@ -53,6 +64,19 @@ export default {
); );
return displayPrice != this.additionalButtonData?.strikeThroughPrice; 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: { methods: {
getRouterLinkDisplayTextFromCopy, getRouterLinkDisplayTextFromCopy,
@ -257,6 +281,12 @@ export default {
padding: 0 0.75rem 0 0; padding: 0 0.75rem 0 0;
@include blue-filter(); @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 { @keyframes slideaway {

View file

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