Refactoring.
This commit is contained in:
parent
597685a02b
commit
686f07ec44
2 changed files with 30 additions and 5 deletions
|
|
@ -43,6 +43,34 @@ export default {
|
||||||
scrollToPageBottom() {
|
scrollToPageBottom() {
|
||||||
const container = document.getElementsByClassName('fade-on-route-transition')[0];
|
const container = document.getElementsByClassName('fade-on-route-transition')[0];
|
||||||
container.scrollTo({ top: container.scrollHeight, left: 0, behavior: 'smooth' });
|
container.scrollTo({ top: container.scrollHeight, left: 0, behavior: 'smooth' });
|
||||||
|
},
|
||||||
|
getiOSversion() {
|
||||||
|
if (/iP(hone|od|ad)/.test(navigator.platform)) {
|
||||||
|
// supports iOS 2.0 and later:
|
||||||
|
var v = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
|
||||||
|
return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isMobileDevice() {
|
||||||
|
const userAgent = navigator.userAgent;
|
||||||
|
return (
|
||||||
|
userAgent.includes("Android") ||
|
||||||
|
userAgent.includes("Mobile") ||
|
||||||
|
userAgent.includes("iPod") ||
|
||||||
|
userAgent.includes("iPhone") ||
|
||||||
|
userAgent.includes("IEMobile") ||
|
||||||
|
userAgent.includes("BlackBerry") ||
|
||||||
|
userAgent.includes("webOS")
|
||||||
|
);
|
||||||
|
},
|
||||||
|
isAppleBrowser() {
|
||||||
|
const userAgent = navigator.userAgent;
|
||||||
|
return (
|
||||||
|
userAgent.includes("iPod") ||
|
||||||
|
userAgent.includes("iPad") ||
|
||||||
|
userAgent.includes("iPhone") ||
|
||||||
|
userAgent.includes("Mac")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ import { getTopLevelGlassPartsWithRecal } from '@/helpers/recal-helper';
|
||||||
import { getDateForSavedSessionTimeout } from '@/helpers/session-helper';
|
import { getDateForSavedSessionTimeout } from '@/helpers/session-helper';
|
||||||
import issPageValues from '@/router/router-constants/issPage-values';
|
import issPageValues from '@/router/router-constants/issPage-values';
|
||||||
import CoverageStatuses from '@/constants/coverage-statuses';
|
import CoverageStatuses from '@/constants/coverage-statuses';
|
||||||
|
import baseMixin from '@/mixins/base-mixin';
|
||||||
|
|
||||||
const storeId = 'main';
|
const storeId = 'main';
|
||||||
|
|
||||||
|
|
@ -2644,15 +2645,13 @@ export const useMainStore = defineStore({
|
||||||
actionName: actionName ?? "",
|
actionName: actionName ?? "",
|
||||||
referralSequenceNumber: referralSequenceNumber ?? "",
|
referralSequenceNumber: referralSequenceNumber ?? "",
|
||||||
referralNumber: referralNumber ?? "",
|
referralNumber: referralNumber ?? "",
|
||||||
applicationName: "ISS", //baseMixin.methods.isMobileDevice() ? "2.0 Mobile" : "2.0",
|
applicationName: baseMixin.methods.isMobileDevice() ? "ISS Mobile" : "ISS",
|
||||||
workOrderId: workOrderId ?? "",
|
workOrderId: workOrderId ?? "",
|
||||||
workOrderNumber: workOrderNumber ?? "",
|
workOrderNumber: workOrderNumber ?? "",
|
||||||
conceptVariation: conceptVariation,
|
conceptVariation: conceptVariation,
|
||||||
isConceptExposed: isConceptExposed,
|
isConceptExposed: isConceptExposed,
|
||||||
};
|
};
|
||||||
|
|
||||||
console.error("Logging Digital Consumer Action: ", payload);
|
|
||||||
|
|
||||||
return globalMethods.callHttpClient({
|
return globalMethods.callHttpClient({
|
||||||
method: endpoints.LogDigitalConsumer.method,
|
method: endpoints.LogDigitalConsumer.method,
|
||||||
endpoint: endpoints.LogDigitalConsumer.url,
|
endpoint: endpoints.LogDigitalConsumer.url,
|
||||||
|
|
@ -2771,8 +2770,6 @@ export const useMainStore = defineStore({
|
||||||
billToAccountNumber: billToAccountNumber,
|
billToAccountNumber: billToAccountNumber,
|
||||||
};
|
};
|
||||||
|
|
||||||
console.error("Logging Digital Consumer Session Action: ", payload);
|
|
||||||
|
|
||||||
return globalMethods.callHttpClient({
|
return globalMethods.callHttpClient({
|
||||||
method: endpoints.LogIssSessionData.method,
|
method: endpoints.LogIssSessionData.method,
|
||||||
endpoint: endpoints.LogIssSessionData.url,
|
endpoint: endpoints.LogIssSessionData.url,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue