Added scrollToPageTop to menu-modal
This commit is contained in:
parent
16cd8f4d87
commit
c5d317e4b7
7 changed files with 13 additions and 15 deletions
|
|
@ -90,7 +90,7 @@ const endpoints = {
|
|||
url: "/parts/api/v1/parts/supporting-items",
|
||||
method: "POST",
|
||||
},
|
||||
GetProviderLocations: {
|
||||
GetProviders: {
|
||||
url: "/location/api/v1/location/providers",
|
||||
method: "GET",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const storeActions = {
|
|||
GET_MOLDING_QUESTIONS: "getMoldingQuestions",
|
||||
GET_MOBILE_FEE_PART: "getMobileFeePart",
|
||||
GET_SERVICEABILITY_DETAILS: "getServiceabilityDetails",
|
||||
GET_PROVIDER_LOCATIONS: "getProviderLocations",
|
||||
GET_PROVIDERS: "getProviders",
|
||||
SAVE_SESSION: "saveSession",
|
||||
LOAD_SESSION: "loadSession",
|
||||
UPDATE_STORE_WITH_SAVE_SESSION_RESPONSE: "updateStoreWithSaveSessionResponse",
|
||||
|
|
|
|||
|
|
@ -129,7 +129,6 @@ export default {
|
|||
valueToLogType: String,
|
||||
additionalButtonStyling: String,
|
||||
isSmallQuestionText: Boolean,
|
||||
availability: String,
|
||||
customButtonQuestionId: String,
|
||||
logDisplayedValuesEvent: {
|
||||
type: Boolean,
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@
|
|||
<script>
|
||||
import textLink from "@/ux-components/text-link/text-link";
|
||||
import { Modal } from "bootstrap";
|
||||
import baseMixin from "@/mixins/base-mixin.js";
|
||||
|
||||
export default {
|
||||
name: "menuModal",
|
||||
|
|
@ -92,10 +93,7 @@ export default {
|
|||
show() {
|
||||
this.currentFooterAndHeaderHeight = this.getFooterInfoBoxHeight() + 72;
|
||||
this.isActive = true;
|
||||
document.querySelector(".page-container-grouped-styles").scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth",
|
||||
});
|
||||
this.scrollToPageTop();
|
||||
},
|
||||
hide() {
|
||||
var self = this;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import shopQuestion from "./shop-question";
|
|||
jest.mock("@/mixins/base-mixin", () => ({
|
||||
methods: {
|
||||
dispatchStoreAction(action, items, encode) {
|
||||
if (action === mockGetProviderLocationsStoreAction) {
|
||||
if (action === mockGetProvidersStoreAction) {
|
||||
return new Promise((resolve) => {
|
||||
resolve(mockNewShopList);
|
||||
});
|
||||
|
|
@ -16,7 +16,7 @@ jest.mock("@/mixins/base-mixin", () => ({
|
|||
},
|
||||
}));
|
||||
|
||||
const mockGetProviderLocationsStoreAction = storeActions.GET_PROVIDER_LOCATIONS;
|
||||
const mockGetProvidersStoreAction = storeActions.GET_PROVIDER_LOCATIONS;
|
||||
const mockNewShopList = {
|
||||
data: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
loadInitialData() {
|
||||
return baseMixin.methods.dispatchStoreAction(storeActions.GET_PROVIDER_LOCATIONS, {
|
||||
return baseMixin.methods.dispatchStoreAction(storeActions.GET_PROVIDERS, {
|
||||
serviceZipCode: this.serviceZipCode,
|
||||
});
|
||||
},
|
||||
|
|
@ -114,11 +114,11 @@ export default {
|
|||
|
||||
// Map API result data
|
||||
const mappedData = nextShop().map((shop) => {
|
||||
return {
|
||||
Name: shop.providerNumber,
|
||||
return {
|
||||
buttonLabel: shop.city,
|
||||
buttonLabelSubCopy: `${shop.distance} mi`,
|
||||
buttonBodyCopy: `${shop.streetAddress}, ${shop.city}, ${shop.state} ${shop.zipCode}`,
|
||||
value: shop.providerNumber,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -980,10 +980,11 @@ export const actions = {
|
|||
});
|
||||
},
|
||||
|
||||
getProviderLocations(context, { serviceZipCode }) {
|
||||
getProviders(context, { serviceZipCode, radius }) {
|
||||
const damageType = context.getters.damage.isRepair ? "Repair" : "Replace";
|
||||
|
||||
return globalMethods.callMockHttpClient({
|
||||
method: endpoints.GetProviderLocations.method,
|
||||
//TODO: Remove Mocky Endpoints
|
||||
method: endpoints.GetProviders.method,
|
||||
endpoint: "https://run.mocky.io/v3/abf2fa63-8287-4e46-b169-f5bec65c8dff",
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue