Commit 2e281a1
committed
feat(gifts): add redeem action and improve redeem UI state
Add a redeem member action to MembershipGiftModel that posts to the
redeem endpoint, enabling gift redemption via the API.
Update the gifts redeem controller to disable the redeem button while
a redemption is in progress to prevent duplicate submissions.
Implement actual redeem logic by calling the model's redeem action and
redirecting to the catalog on success.
Improve error handling by rethrowing caught errors and resetting the
redeeming state accordingly.1 parent 7355456 commit 2e281a1
2 files changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
48 | 46 | | |
49 | | - | |
| 47 | + | |
50 | 48 | | |
51 | 49 | | |
| 50 | + | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments