Commit bd265cc 1 parent ead4c42 commit bd265cc Copy full SHA for bd265cc
File tree 3 files changed +15
-5
lines changed
routes/console/organization-[organization]/billing
3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 68
68
</span >
69
69
</slot >
70
70
</div >
71
- <Button text on:click ={removeCoupon }>Remove </Button >
71
+ <Button round text on:click ={removeCoupon }>< span class = " icon-x " ></ span > </Button >
72
72
</div >
73
73
{/if }
74
74
</FormList >
Original file line number Diff line number Diff line change 71
71
<p class =" text" >Appwrite credit will automatically be applied to your next invoice.</p >
72
72
<svelte:fragment slot =" aside" >
73
73
<div class =" u-flex u-cross-center u-main-space-between" >
74
- <h4 class =" body-text-1 u-bold" >
75
- Credit balance <span class ="inline-tag" >${balance }</span >
76
- </h4 >
74
+ <div class =" u-flex u-gap-8 u-cross-center" >
75
+ <h4 class =" body-text-1 u-bold" >Credit balance</h4 >
76
+ <span class ="inline-tag" >${balance }</span >
77
+ </div >
77
78
{#if creditList ?.total }
78
79
<Button secondary on:click ={handleCredits }>
79
80
<span class =" icon-plus" aria-hidden =" true" ></span >
Original file line number Diff line number Diff line change 4
4
import type { Coupon } from ' $lib/sdk/billing' ;
5
5
import { sdk } from ' $lib/stores/sdk' ;
6
6
import { wizard } from ' $lib/stores/wizard' ;
7
+ import { onMount } from ' svelte' ;
7
8
import { addCreditWizardStore } from ' ../store' ;
8
9
9
10
let coupon: string ;
18
19
try {
19
20
const response = await sdk .forConsole .billing .getCoupon (coupon );
20
21
couponData = response ;
22
+ $addCreditWizardStore .coupon = coupon ;
21
23
coupon = null ;
22
24
} catch (error ) {
23
25
couponData .code = coupon ;
26
28
throw new Error (error );
27
29
}
28
30
}
31
+
32
+ onMount (() => {
33
+ if ($addCreditWizardStore .coupon ) {
34
+ coupon = $addCreditWizardStore .coupon ;
35
+ validateCoupon ();
36
+ }
37
+ });
29
38
</script >
30
39
31
40
<WizardStep beforeSubmit ={validateCoupon }>
41
50
$addCreditWizardStore .coupon = e .detail .code ;
42
51
}}
43
52
let:data >
44
- <span >{data .code } has been successfully added</span >
53
+ <span >{data .code . toUpperCase () } has been successfully added</span >
45
54
</CouponInput >
46
55
</WizardStep >
You can’t perform that action at this time.
0 commit comments