✅ UI refactor and some logical fixes
This commit is contained in:
@@ -74,7 +74,7 @@ class ActionRunner {
|
||||
return;
|
||||
}
|
||||
|
||||
toast.success("Your booking has been confirmed", {
|
||||
toast.success("Checkout completed successfully", {
|
||||
description: "Redirecting, please wait...",
|
||||
});
|
||||
|
||||
@@ -160,9 +160,9 @@ class ActionRunner {
|
||||
await ckFlowVM.cleanupFlowInfo();
|
||||
ckFlowVM.reset();
|
||||
checkoutVM.reset();
|
||||
const tid = page.params.tid as any as string;
|
||||
const plid = page.params.plid as any as string;
|
||||
const sid = page.params.sid as any as string;
|
||||
window.location.replace(`/checkout/terminated?sid=${sid}&tid=${tid}`);
|
||||
window.location.replace(`/checkout/terminated?sid=${sid}&plid=${plid}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,9 +174,8 @@ export class CKFlowViewModel {
|
||||
|
||||
otpCode: string | undefined = $state(undefined);
|
||||
|
||||
poller: NodeJS.Timer | undefined = undefined;
|
||||
pinger: NodeJS.Timer | undefined = undefined;
|
||||
priceFetcher: NodeJS.Timer | undefined = undefined;
|
||||
_flowPoller: NodeJS.Timeout | undefined = undefined;
|
||||
_flowPinger: NodeJS.Timeout | undefined = undefined;
|
||||
|
||||
// Data synchronization control
|
||||
private personalInfoDebounceTimer: NodeJS.Timeout | null = null;
|
||||
@@ -334,27 +333,27 @@ export class CKFlowViewModel {
|
||||
}
|
||||
|
||||
private clearPoller() {
|
||||
if (this.poller) {
|
||||
clearInterval(this.poller);
|
||||
if (this._flowPoller) {
|
||||
clearInterval(this._flowPoller);
|
||||
}
|
||||
}
|
||||
|
||||
private clearPinger() {
|
||||
if (this.pinger) {
|
||||
clearInterval(this.pinger);
|
||||
if (this._flowPinger) {
|
||||
clearInterval(this._flowPinger);
|
||||
}
|
||||
}
|
||||
|
||||
private async startPolling() {
|
||||
this.clearPoller();
|
||||
this.poller = setInterval(() => {
|
||||
this._flowPoller = setInterval(() => {
|
||||
this.refreshFlowInfo();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
private async startPinging() {
|
||||
this.clearPinger();
|
||||
this.pinger = setInterval(() => {
|
||||
this._flowPinger = setInterval(() => {
|
||||
this.pingFlow();
|
||||
}, 30000); // Every 30 seconds
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user