💥 Done (almost)
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
description: "Preparing checkout session",
|
||||
});
|
||||
window.location.replace(
|
||||
`/checkout/${$checkoutSessionIdStore}/${data.data.id}`,
|
||||
`/checkout/${$checkoutSessionIdStore}/${data.data.linkId}`,
|
||||
);
|
||||
}, 3000);
|
||||
});
|
||||
|
||||
@@ -2,7 +2,5 @@ import { getProductUseCases } from "$lib/domains/product/usecases";
|
||||
import type { PageServerLoad } from "./$types";
|
||||
|
||||
export const load: PageServerLoad = async ({ params }) => {
|
||||
return await getProductUseCases().getProductByLinkId(
|
||||
Number(params.plid ?? "-1"),
|
||||
);
|
||||
return await getProductUseCases().getProductByLinkId(params.plid);
|
||||
};
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import Icon from "$lib/components/atoms/icon.svelte";
|
||||
import Title from "$lib/components/atoms/title.svelte";
|
||||
import MaxWidthWrapper from "$lib/components/molecules/max-width-wrapper.svelte";
|
||||
import Button from "$lib/components/ui/button/button.svelte";
|
||||
import CheckoutConfirmationSection from "$lib/domains/checkout/checkout-confirmation-section.svelte";
|
||||
import CheckoutLoadingSection from "$lib/domains/checkout/checkout-loading-section.svelte";
|
||||
import CheckoutStepsIndicator from "$lib/domains/checkout/checkout-steps-indicator.svelte";
|
||||
@@ -51,10 +50,8 @@
|
||||
<div class="grid h-full min-h-screen w-full place-items-center">
|
||||
<div class="flex flex-col items-center justify-center gap-4">
|
||||
<Icon icon={SearchIcon} cls="w-12 h-12" />
|
||||
<Title size="h4" color="black">No ticket found</Title>
|
||||
<Button href="/search" variant="default">
|
||||
Search for another ticket
|
||||
</Button>
|
||||
<Title size="h4" color="black">Product not found</Title>
|
||||
<p>Something went wrong, please try again or contact us</p>
|
||||
</div>
|
||||
</div>
|
||||
{:else if checkoutVM.checkoutStep === CheckoutStep.Confirmation}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import Title from "$lib/components/atoms/title.svelte";
|
||||
import MaxWidthWrapper from "$lib/components/molecules/max-width-wrapper.svelte";
|
||||
import CheckIcon from "~icons/ic/round-check";
|
||||
// Maybe todo? if the `uid` search param is present, do something?? figure out later
|
||||
</script>
|
||||
|
||||
<div class="grid min-h-[80vh] w-full place-items-center px-4 sm:px-6">
|
||||
|
||||
@@ -3,11 +3,8 @@
|
||||
import Icon from "$lib/components/atoms/icon.svelte";
|
||||
import Title from "$lib/components/atoms/title.svelte";
|
||||
import MaxWidthWrapper from "$lib/components/molecules/max-width-wrapper.svelte";
|
||||
import Button from "$lib/components/ui/button/button.svelte";
|
||||
import CloseIcon from "~icons/mdi/window-close";
|
||||
import ArrowRightIcon from "~icons/solar/multiple-forward-right-line-duotone";
|
||||
import RestartIcon from "~icons/material-symbols/restart-alt-rounded";
|
||||
import { onMount } from "svelte";
|
||||
import CloseIcon from "~icons/mdi/window-close";
|
||||
|
||||
let canRedirect = $state(false);
|
||||
|
||||
@@ -37,25 +34,9 @@
|
||||
<Title size="h3" center weight="medium">Session Terminated</Title>
|
||||
<p class="w-full max-w-prose text-center text-gray-600">
|
||||
Unfortunately, your session has been terminated due to inactivity
|
||||
or expiration of the booking.
|
||||
or something went wrong, please contact us to walk through the
|
||||
steps again.
|
||||
</p>
|
||||
<div class="flex w-full flex-col justify-center gap-4 md:flex-row">
|
||||
{#if canRedirect}
|
||||
<Button
|
||||
variant="default"
|
||||
size="lg"
|
||||
href={`/checkout/${sid}/${tid}`}
|
||||
>
|
||||
<Icon icon={RestartIcon} cls="w-auto h-6" />
|
||||
<span>Try Again</span>
|
||||
</Button>
|
||||
{/if}
|
||||
|
||||
<Button variant="defaultInverted" size="lg" href="/search">
|
||||
<Icon icon={ArrowRightIcon} cls="w-auto h-6" />
|
||||
<span>Back To Search</span>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</MaxWidthWrapper>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user