✅ admin side for now | 🔄 started FE
This commit is contained in:
@@ -18,7 +18,7 @@ import {
|
||||
type FlightPriceDetails,
|
||||
} from "$lib/domains/ticket/data/entities";
|
||||
import { flightTicketStore } from "$lib/domains/ticket/data/store";
|
||||
import { ticketCheckoutVM } from "$lib/domains/ticket/view/checkout/flight-checkout.vm.svelte";
|
||||
import { checkoutVM } from "$lib/domains/ticket/view/checkout/checkout.vm.svelte";
|
||||
import { billingDetailsVM } from "$lib/domains/ticket/view/checkout/payment-info-section/billing.details.vm.svelte";
|
||||
import { paymentInfoVM } from "$lib/domains/ticket/view/checkout/payment-info-section/payment.info.vm.svelte";
|
||||
import { trpcApiStore } from "$lib/stores/api";
|
||||
@@ -61,7 +61,7 @@ class ActionRunner {
|
||||
}
|
||||
}
|
||||
private async completeOrder(data: any) {
|
||||
const ok = await ticketCheckoutVM.checkout();
|
||||
const ok = await checkoutVM.checkout();
|
||||
if (!ok) return;
|
||||
|
||||
const cleanupSuccess = await ckFlowVM.cleanupFlowInfo(
|
||||
@@ -117,7 +117,7 @@ class ActionRunner {
|
||||
|
||||
await ckFlowVM.refreshFlowInfo(false);
|
||||
|
||||
ticketCheckoutVM.checkoutStep = CheckoutStep.Verification;
|
||||
checkoutVM.checkoutStep = CheckoutStep.Verification;
|
||||
toast.info("Verification required", {
|
||||
description: "Please enter the verification code sent to your device",
|
||||
});
|
||||
@@ -131,7 +131,7 @@ class ActionRunner {
|
||||
toast.error("Some information provided is not valid", {
|
||||
description: "Please double check your info & try again",
|
||||
});
|
||||
ticketCheckoutVM.checkoutStep = CheckoutStep.Initial;
|
||||
checkoutVM.checkoutStep = CheckoutStep.Initial;
|
||||
}
|
||||
|
||||
private async backToPayment(action: PendingAction) {
|
||||
@@ -155,13 +155,13 @@ class ActionRunner {
|
||||
duration: 6000,
|
||||
});
|
||||
|
||||
ticketCheckoutVM.checkoutStep = CheckoutStep.Payment;
|
||||
checkoutVM.checkoutStep = CheckoutStep.Payment;
|
||||
}
|
||||
|
||||
private async terminateSession() {
|
||||
await ckFlowVM.cleanupFlowInfo();
|
||||
ckFlowVM.reset();
|
||||
ticketCheckoutVM.reset();
|
||||
checkoutVM.reset();
|
||||
const tid = page.params.tid as any as string;
|
||||
const sid = page.params.sid as any as string;
|
||||
window.location.replace(`/checkout/terminated?sid=${sid}&tid=${tid}`);
|
||||
|
||||
Reference in New Issue
Block a user