Fixing loading modal position

This commit is contained in:
Michaela Brydon 2024-11-18 13:35:08 -05:00
parent b024fa2dd2
commit 6933e7fc92
2 changed files with 11 additions and 8 deletions

View file

@ -382,9 +382,10 @@
name="calling_application" name="calling_application"
value="ISSNextGen" /> value="ISSNextGen" />
<input type="hidden" <input
type="hidden"
name="parentdomainname" name="parentdomainname"
:value="parentNomainName" /> :value="parentDomainName" />
</form> </form>
</template> </template>
<script> <script>
@ -409,6 +410,7 @@ import queryStrings from '@/constants/query-strings';
import alert from '@/ux-components/alert/alert.vue'; import alert from '@/ux-components/alert/alert.vue';
import cartDropdown from '@/iss-components/cart-dropdown/cart-dropdown.vue'; import cartDropdown from '@/iss-components/cart-dropdown/cart-dropdown.vue';
import { formatAmountInDollars } from '@/helpers/text-helper'; import { formatAmountInDollars } from '@/helpers/text-helper';
import showIssLoadingModal from '@/helpers/loading-modal-helper';
export default { export default {
name: 'payment-page', name: 'payment-page',
@ -499,7 +501,7 @@ export default {
}; };
}, },
computed: { computed: {
parentNomainName() { parentDomainName() {
return window.location.hostname; return window.location.hostname;
}, },
payInAdvanceResponseUrl() { payInAdvanceResponseUrl() {
@ -731,16 +733,20 @@ export default {
} }
if (event.data.includes('creditCardSubmit')) { if (event.data.includes('creditCardSubmit')) {
this.showIssLoadingModal(true);
useMainStore().savePaymentMethodChoice(paymentMethods.CREDIT_CARD); useMainStore().savePaymentMethodChoice(paymentMethods.CREDIT_CARD);
this.setUIBlock(true); this.setUIBlock(true);
} }
if (event.data.includes('afterpayPaymentReceived')) { if (event.data.includes('afterpayPaymentReceived')) {
this.showIssLoadingModal(true);
useMainStore().savePaymentMethodChoice(paymentMethods.AFTERPAY); useMainStore().savePaymentMethodChoice(paymentMethods.AFTERPAY);
} }
if (event.data.includes('applepayOpened')) { if (event.data.includes('applepayOpened')) {
this.showIssLoadingModal(true);
useMainStore().savePaymentMethodChoice(paymentMethods.APPLEPAY); useMainStore().savePaymentMethodChoice(paymentMethods.APPLEPAY);
} }
if (event.data.includes('showLoaderForPaypal')) { if (event.data.includes('showLoaderForPaypal')) {
this.showIssLoadingModal(true);
useMainStore().savePaymentMethodChoice(paymentMethods.PAYPAL); useMainStore().savePaymentMethodChoice(paymentMethods.PAYPAL);
} }
}, },
@ -775,7 +781,8 @@ export default {
this.navigationScenarios.CLICKED_FORWARD, this.navigationScenarios.CLICKED_FORWARD,
this.$route this.$route
); );
} },
showIssLoadingModal
} }
}; };
</script> </script>

View file

@ -15,7 +15,6 @@ import getQueryStringParameter from '@/helpers/querystring-helper.js';
import { paymentMethods } from '@/constants/payment-method-constants.js'; import { paymentMethods } from '@/constants/payment-method-constants.js';
import { getCartTotal } from '@/helpers/cart-helper'; import { getCartTotal } from '@/helpers/cart-helper';
import { submitWorkOrder } from '@/helpers/order-helper.js'; import { submitWorkOrder } from '@/helpers/order-helper.js';
import showIssLoadingModal from '@/helpers/loading-modal-helper';
import submitType from '@/constants/submit-type'; import submitType from '@/constants/submit-type';
export default { export default {
@ -44,7 +43,6 @@ export default {
} }
}, },
async mounted() { async mounted() {
showIssLoadingModal(true);
const payInAdvanceError = getQueryStringParameter(queryStrings.ERROR); const payInAdvanceError = getQueryStringParameter(queryStrings.ERROR);
const { paymentMethod } = useMainStore().order.payment; const { paymentMethod } = useMainStore().order.payment;
@ -130,11 +128,9 @@ export default {
} catch (error) { } catch (error) {
console.error(`error: response from submit work order:${error.message}`); console.error(`error: response from submit work order:${error.message}`);
this.navigateOnPayInAdvanceError(); this.navigateOnPayInAdvanceError();
showIssLoadingModal(false);
return; return;
} }
showIssLoadingModal(false);
this.$router.navigate( this.$router.navigate(
this.navigationScenarios.PAY_IN_ADVANCE_SUCCESS, this.navigationScenarios.PAY_IN_ADVANCE_SUCCESS,
this.$route this.$route