feat: add credit modal

This commit is contained in:
Arman
2023-12-04 16:38:12 +01:00
parent 720a68a0c5
commit 155c545e65
2 changed files with 6 additions and 2 deletions
@@ -34,7 +34,7 @@
}
</script>
<Modal title="Add credits" headerDivider={false} onSubmit={redeem}>
<Modal bind:show title="Add credits" headerDivider={false} onSubmit={redeem} size="big">
Apply Appwrite credits to your organization.
<FormList>
@@ -42,7 +42,7 @@
</FormList>
<svelte:fragment slot="footer">
<Button text>Cancel</Button>
<Button text on:click={() => (show = false)}>Cancel</Button>
<Button submit>Add credits</Button>
</svelte:fragment>
</Modal>
@@ -17,6 +17,7 @@
import { onMount } from 'svelte';
import AddCreditWizard from './addCreditWizard.svelte';
import { Button } from '$lib/elements/forms';
import AddCreditModal from './addCreditModal.svelte';
let offset = 0;
let creditList: CreditList = {
@@ -33,6 +34,7 @@
function handleCredits() {
if ($organization?.paymentMethodId || $organization?.backupPaymentMethodId) {
console.log('askdjsad');
show = true;
} else {
console.log('test');
@@ -103,3 +105,5 @@
{/if}
</svelte:fragment>
</CardGrid>
<AddCreditModal bind:show />