Merge pull request #436 from Safelite/defect/digital/SSR-640
Fixing adas link not working
This commit is contained in:
commit
228d41a205
2 changed files with 20 additions and 4 deletions
|
|
@ -469,6 +469,20 @@ export function setupModalLinks(context) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param desiredTarget
|
||||||
|
*/
|
||||||
|
export function setupModalLink(context, desiredTarget) {
|
||||||
|
context.$nextTick(() => {
|
||||||
|
const element = document.querySelector(`[modalTarget=${desiredTarget}]`);
|
||||||
|
if (element) {
|
||||||
|
element.addEventListener('click', () => context.$refs[desiredTarget].openModal());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param copy
|
* @param copy
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ import buttonQuestion from '@/digital-components/button-question/button-question
|
||||||
import loadingModal from '@/iss-components/loading-modal/loading-modal.vue';
|
import loadingModal from '@/iss-components/loading-modal/loading-modal.vue';
|
||||||
|
|
||||||
// Import Supporting Files
|
// Import Supporting Files
|
||||||
import { fetchCmsContentForPage, setupModalLinks, processIfStatements } from '@/helpers/cms-content-helper.js';
|
import { fetchCmsContentForPage, setupModalLinks, setupModalLink, processIfStatements } from '@/helpers/cms-content-helper.js';
|
||||||
import settleAllPromises from '@/helpers/layout-helper.js';
|
import settleAllPromises from '@/helpers/layout-helper.js';
|
||||||
import { getDamageString } from '@/helpers/damage-helper.js';
|
import { getDamageString } from '@/helpers/damage-helper.js';
|
||||||
import { useMainStore } from '@/store/index.js';
|
import { useMainStore } from '@/store/index.js';
|
||||||
|
|
@ -314,6 +314,11 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$refs.siteFooter.updateButtonText('Continue');
|
this.$refs.siteFooter.updateButtonText('Continue');
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
nextStepsBody(newValue, oldValue) {
|
||||||
|
if (newValue !== oldValue){
|
||||||
|
setupModalLink(this, "RecalModal");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
|
@ -374,9 +379,6 @@ export default {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openModalAction(modalName) {
|
|
||||||
this.$refs[modalName.args].openModal();
|
|
||||||
},
|
|
||||||
processIfStatements,
|
processIfStatements,
|
||||||
getHeaderTextFromCms(cmsWidgetName) {
|
getHeaderTextFromCms(cmsWidgetName) {
|
||||||
const header = this.getCmsContent(cmsWidgetName, 'HeaderText');
|
const header = this.getCmsContent(cmsWidgetName, 'HeaderText');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue