cleanup: ckflow, order, checkout page
This commit is contained in:
@@ -10,12 +10,12 @@ import {
|
||||
type PendingActions,
|
||||
} from "$lib/domains/ckflow/data/entities";
|
||||
import type { CustomerInfoModel } from "$lib/domains/customerinfo/data";
|
||||
import { customerInfoModel } from "$lib/domains/customerinfo/data";
|
||||
import { customerInfoVM } from "$lib/domains/customerinfo/view/customerinfo.vm.svelte";
|
||||
import {
|
||||
CheckoutStep,
|
||||
type OrderPriceDetailsModel,
|
||||
} from "$lib/domains/order/data/entities";
|
||||
import { customerInfoModel } from "$lib/domains/passengerinfo/data/entities";
|
||||
import { passengerInfoVM } from "$lib/domains/passengerinfo/view/passenger.info.vm.svelte";
|
||||
import type { PaymentInfoPayload } from "$lib/domains/paymentinfo/data/entities";
|
||||
import { PaymentMethod } from "$lib/domains/paymentinfo/data/entities";
|
||||
import { productStore } from "$lib/domains/product/store";
|
||||
@@ -529,17 +529,19 @@ export class CKFlowViewModel {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get primary passenger's PII
|
||||
const primaryPassengerInfo =
|
||||
passengerInfoVM.passengerInfos.length > 0
|
||||
? passengerInfoVM.passengerInfos[0].passengerPii
|
||||
: undefined;
|
||||
const personalInfo = customerInfoVM.customerInfo;
|
||||
if (!personalInfo) {
|
||||
toast.error("Could not find customer info", {
|
||||
description: "Please try again later or contact support",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const out = await api.ckflow.executePrePaymentStep.mutate({
|
||||
flowId: this.flowId!,
|
||||
payload: {
|
||||
initialUrl: "",
|
||||
personalInfo: primaryPassengerInfo,
|
||||
personalInfo: personalInfo,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user