Bugfixes
This commit is contained in:
@@ -285,6 +285,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (rechnung && rechnung.status === "paid") {
|
||||
window.location.href = "/dashboard"
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
let uid: string, checkout_url: string | undefined;
|
||||
|
||||
@@ -309,10 +314,7 @@
|
||||
headers: {
|
||||
Authorization: `Bearer ${Cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)}`,
|
||||
},
|
||||
})
|
||||
|
||||
console.log(result);
|
||||
|
||||
})
|
||||
|
||||
uid = result.uid
|
||||
checkout_url = result.checkout_url
|
||||
@@ -897,20 +899,30 @@ sm:grid-cols-[min-content_min-content_min-content] sm:justify-self-end sm:mt-8"
|
||||
|
||||
<button class="order-2 button" type="button" on:click={speichern}>Speichern</button>
|
||||
|
||||
{#if gegAnfrage}
|
||||
{#if rechnung && rechnung.status === "paid"}
|
||||
<!-- Von einer GEG Anfrage sollte man sowieso nicht noch mal auf die Kundendaten Seite gelangen, also brauchen wir das hier nicht. -->
|
||||
<button
|
||||
class="order-1 sm:order-2 button cursor-pointer"
|
||||
type="button"
|
||||
data-cy="bestellen"
|
||||
on:click={anfordern}>Angebot anfordern</button
|
||||
type="button"
|
||||
on:click={bestellen}>Absenden</button
|
||||
>
|
||||
{:else}
|
||||
<button
|
||||
class="order-1 sm:order-2 button cursor-pointer"
|
||||
data-cy="bestellen"
|
||||
type="button"
|
||||
on:click={bestellen}>Kostenpflichtig bestellen</button
|
||||
>
|
||||
{#if gegAnfrage}
|
||||
<button
|
||||
class="order-1 sm:order-2 button cursor-pointer"
|
||||
type="button"
|
||||
data-cy="bestellen"
|
||||
on:click={anfordern}>Angebot anfordern</button
|
||||
>
|
||||
{:else}
|
||||
<button
|
||||
class="order-1 sm:order-2 button cursor-pointer"
|
||||
data-cy="bestellen"
|
||||
type="button"
|
||||
on:click={bestellen}>Kostenpflichtig bestellen</button
|
||||
>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user