CASH-164
CASH-164 add session check on modal continue button
This commit is contained in:
parent
12e9f8f0a4
commit
c353fa4815
2 changed files with 15 additions and 4 deletions
|
|
@ -45,6 +45,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
||||||
|
import analyticsMixin from "@/mixins/analytics-mixin";
|
||||||
|
import router from "@/router/index.js";
|
||||||
import modalButtonMain from "@/digital-components/modal/ux-components/modal-button-main/modal-button-main";
|
import modalButtonMain from "@/digital-components/modal/ux-components/modal-button-main/modal-button-main";
|
||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
import { useForm } from "vee-validate";
|
import { useForm } from "vee-validate";
|
||||||
|
|
@ -86,7 +89,15 @@ export default {
|
||||||
async validateAndEmit() {
|
async validateAndEmit() {
|
||||||
const validationResult = await this.validate();
|
const validationResult = await this.validate();
|
||||||
if (validationResult.valid) {
|
if (validationResult.valid) {
|
||||||
this.$emit("footer-button-event");
|
if (analyticsMixin.methods.sessionExpired()) {
|
||||||
|
analyticsMixin.methods.initSession();
|
||||||
|
router.push({
|
||||||
|
path: "/",
|
||||||
|
query: { fmgPage: fmgPageValues.RETURN_USER },
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$emit("footer-button-event");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.resetButtonStyle();
|
this.resetButtonStyle();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@ export function getQuerystringParameter(key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// if you add the fmgPage to the querystringobject before calling, then pass true for skipFmgPageName
|
// if you add the fmgPage to the querystringobject before calling, then pass true for skipFmgPageName
|
||||||
export function buildQuerystringObject(qso, skipFmgPageName=false) {
|
export function buildQuerystringObject(qso, skipFmgPageName = false) {
|
||||||
const queryString = window.location.search;
|
const queryString = window.location.search;
|
||||||
const urlParams = new URLSearchParams(queryString);
|
const urlParams = new URLSearchParams(queryString);
|
||||||
|
|
||||||
for (const [name, value] of urlParams) {
|
for (const [name, value] of urlParams) {
|
||||||
if (name.toLowerCase() === "fmgpage" && skipFmgPageName) {
|
if (name.toLowerCase() === "fmgpage" && skipFmgPageName) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -21,4 +21,4 @@ export function buildQuerystringObject(qso, skipFmgPageName=false) {
|
||||||
qso[name] = value;
|
qso[name] = value;
|
||||||
}
|
}
|
||||||
return qso;
|
return qso;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue