Bestellen auf Rechnung
This commit is contained in:
@@ -5,9 +5,6 @@
|
||||
import Ansprechpartner from "#components/Ausweis/Ansprechpartner.svelte";
|
||||
import Rechnungsadresse from "#components/Ausweis/Rechnungsadresse.svelte";
|
||||
import Bezahlung from "#components/Ausweis/Bezahlung.svelte";
|
||||
|
||||
import Pruefung from "#components/Ausweis/Pruefung.svelte";
|
||||
|
||||
import type { Bezahlmethoden } from "@ibcornelsen/database/client";
|
||||
import { Enums } from "@ibcornelsen/database/client";
|
||||
import { dialogs } from "svelte-dialogs";
|
||||
@@ -24,8 +21,7 @@
|
||||
} from "#components/Ausweis/types.js";
|
||||
import { validateAccessTokenClient } from "src/client/lib/validateAccessToken.js";
|
||||
import { api } from "astro-typesafe-api/client";
|
||||
import A10WaermequellenAnlagentechnikTrinkwarmwasser from "#components/Tabellen/A10WaermequellenAnlagentechnikTrinkwarmwasser.svelte";
|
||||
|
||||
|
||||
export let user: BenutzerClient;
|
||||
export let ausweis: VerbrauchsausweisWohnenClient;
|
||||
export let aufnahme: AufnahmeClient;
|
||||
@@ -143,11 +139,13 @@
|
||||
Authorization: `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`
|
||||
}
|
||||
})
|
||||
|
||||
window.location.href = checkout_url;
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
|
||||
if (bezahlmethode === Enums.Bezahlmethoden.rechnung) {
|
||||
window.location.href = `/payment/success?uid=${uid}`
|
||||
} else {
|
||||
window.location.href = checkout_url as string;
|
||||
}
|
||||
} catch(e) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +285,7 @@
|
||||
|
||||
<button class="button">Speichern</button>
|
||||
|
||||
<button class="button" data-cy="bestellen" on:click={bestellen} disabled={bestellenNichtMoeglich}>Kostenpflichtig bestellen</button>
|
||||
<button class="button cursor-pointer" data-cy="bestellen" on:click={bestellen} >Kostenpflichtig bestellen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user