Commit f39264e
authored
fix(ux): show Stripe setup link on event form when community has no payout configured (#1040)
## Problem
On the event creation/edit form, price inputs stay disabled after
selecting a community that has not configured Stripe payout. The helper
text "Select a community to set a price." never updates, leaving users
confused about why inputs are still grayed out even after selecting a
community.
## Solution
Added a third state to the price helper text:
| State | Message |
|---|---|
| No community selected | "Select a community to set a price." |
| Community selected, Stripe **not configured** | "This community has
not configured Stripe yet. [Set up payouts →]" |
| Community selected, Stripe **verified** | *(no message, price inputs
enabled)* |
The "Set up payouts →" link redirects to
`/dashboard/community/{id}/payouts`.
## Changes
- **`lib/pricing.ts`** — `useCurrencyOptionsForCommunity` now returns `{
options, isLoading }` instead of the raw array, so callers can avoid
flashing the "not configured" message during the payout status fetch.
- **`components/features/event/event-form.tsx`** — updated
`FormDescription` to 3-state display with the Stripe setup link.
-
**`components/features/dashboard/event/_components/dashboard-form-prices.tsx`**
— same update (second caller of the hook).
- **`app/i18n/messages/{en,fr,es}.json`** — added
`price-stripe-not-configured` and `price-stripe-setup-link` translation
keys.
## How to test
1. Go to `/dashboard/event/create`
2. **Before** selecting a community: see "Select a community to set a
price."
3. Select a community **without** Stripe payout configured: message
becomes "This community has not configured Stripe yet. Set up payouts →"
(price inputs still disabled)
4. Click "Set up payouts →": lands on
`/dashboard/community/{id}/payouts`
5. Select a community **with** Stripe verified: price inputs become
enabled, no helper message
Closes #10381 parent e5f8b73 commit f39264e
6 files changed
Lines changed: 49 additions & 11 deletions
File tree
- app/i18n/messages
- components/features
- dashboard/event/_components
- event
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
962 | 964 | | |
963 | 965 | | |
964 | 966 | | |
965 | | - | |
| 967 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
962 | 964 | | |
963 | 965 | | |
964 | 966 | | |
965 | | - | |
| 967 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
962 | 964 | | |
963 | 965 | | |
964 | 966 | | |
965 | | - | |
| 967 | + | |
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
36 | 51 | | |
37 | 52 | | |
38 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | | - | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
422 | 424 | | |
423 | 425 | | |
424 | 426 | | |
425 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
426 | 441 | | |
427 | 442 | | |
428 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
120 | 122 | | |
0 commit comments