mirror of
https://github.com/KevinMidboe/planetposen-frontend.git
synced 2025-12-08 20:28:42 +00:00
Patch: Receipt page (#7)
* OrderSection receipts list of lineItems instead of always getting cart * Hide express checkout behind feature flag * Add torn receipt paper css look to order list * Re-use OrderSection on receipt page * Linting * Reduced max font from 130->120%, now only applies scaling on div.main Reducing relative font size for the largest screen width. Scaling only applies to main container, not header and footer. * Minor header size changes * Set max-width to login input elements on desktop * Prettier doesn't liek shorthand props
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import CheckoutButton from '$lib/components/Button.svelte';
|
||||
import StripeCard from '$lib/components/StripeCard.svelte';
|
||||
import ErrorStack from '$lib/components/ErrorStack.svelte';
|
||||
import { cart } from '$lib/cartStore';
|
||||
import { cart, subTotal } from '$lib/cartStore';
|
||||
import stripeApi from '$lib/stripe/index';
|
||||
import { OrderSubmitUnsuccessfullError } from '$lib/errors/OrderErrors';
|
||||
import Loading from '$lib/components/loading/index.svelte';
|
||||
@@ -28,6 +28,7 @@
|
||||
let card: StripeCardElement;
|
||||
let form: HTMLFormElement;
|
||||
let errors: string[] = [];
|
||||
let showExpressCheckout = false;
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
let resolvePaymentPromise: (value: any) => void;
|
||||
@@ -147,13 +148,15 @@
|
||||
|
||||
<form class="checkout" bind:this="{form}" on:submit|preventDefault="{postOrder}">
|
||||
<div class="main">
|
||||
<section class="express-checkout" style="display: block;">
|
||||
<h2>Hurtigkasse</h2>
|
||||
{#if showExpressCheckout}
|
||||
<section class="express-checkout" style="display: block;">
|
||||
<h2>Hurtigkasse</h2>
|
||||
|
||||
<ExpressSection />
|
||||
<ExpressSection />
|
||||
|
||||
<p style="margin: 0 0 -0.5rem 0.5rem; text-align: left; color: rgba(0,0,0,0.5);">eller</p>
|
||||
</section>
|
||||
<p style="margin: 0 0 -0.5rem 0.5rem; text-align: left; color: rgba(0,0,0,0.5);">eller</p>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
<section id="delivery">
|
||||
<h2>Leveringsaddresse</h2>
|
||||
@@ -178,7 +181,7 @@
|
||||
<aside class="sidebar">
|
||||
<section id="order">
|
||||
<h2>Din ordre</h2>
|
||||
<OrderSection />
|
||||
<OrderSection lineItems="{$cart}" subTotal="{$subTotal}" />
|
||||
</section>
|
||||
</aside>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user