additional stripe settings
This commit is contained in:
+40
-10
@@ -521,6 +521,36 @@ const formatBillingPlanCapacity = (billingPlan: BillingPlan) => {
|
||||
return 'Permits 11 or more birds in the flock.';
|
||||
};
|
||||
|
||||
const formatBillingPlanDropdownLabel = (billingPlan: HouseholdBillingPlan) => {
|
||||
if (billingPlan === 'household_basic') {
|
||||
return 'Conure (4 birds)';
|
||||
}
|
||||
|
||||
if (billingPlan === 'household_plus') {
|
||||
return 'Indian Ringneck (10 birds)';
|
||||
}
|
||||
|
||||
return 'Macaw (11+)';
|
||||
};
|
||||
|
||||
const householdPlanPrices: Record<HouseholdBillingPlan, Record<BillingInterval, string>> = {
|
||||
household_basic: {
|
||||
monthly: '$4.99/month',
|
||||
yearly: '$50/year',
|
||||
},
|
||||
household_plus: {
|
||||
monthly: '$8.99/month',
|
||||
yearly: '$90/year',
|
||||
},
|
||||
household_macaw: {
|
||||
monthly: '$15.99/month',
|
||||
yearly: '$160/year',
|
||||
},
|
||||
};
|
||||
|
||||
const formatBillingIntervalDropdownLabel = (billingPlan: HouseholdBillingPlan, billingInterval: BillingInterval) =>
|
||||
`${formatBillingIntervalName(billingInterval)} (${householdPlanPrices[billingPlan][billingInterval]})`;
|
||||
|
||||
const formatBillingPlanBirdLimit = (billingPlan: BillingPlan) => {
|
||||
if (billingPlan === 'household_basic') {
|
||||
return '4';
|
||||
@@ -3392,9 +3422,9 @@ function App() {
|
||||
})
|
||||
}
|
||||
>
|
||||
<option value="household_basic">Conure - up to 4 birds</option>
|
||||
<option value="household_plus">Indian Ringneck - up to 10 birds</option>
|
||||
<option value="household_macaw">Macaw - 11+ birds</option>
|
||||
<option value="household_basic">Conure (4 birds)</option>
|
||||
<option value="household_plus">Indian Ringneck (10 birds)</option>
|
||||
<option value="household_macaw">Macaw (11+)</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
@@ -3408,8 +3438,8 @@ function App() {
|
||||
})
|
||||
}
|
||||
>
|
||||
<option value="monthly">Monthly</option>
|
||||
<option value="yearly">Annual</option>
|
||||
<option value="monthly">{formatBillingIntervalDropdownLabel(workspaceForm.billingPlan, 'monthly')}</option>
|
||||
<option value="yearly">{formatBillingIntervalDropdownLabel(workspaceForm.billingPlan, 'yearly')}</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
@@ -3763,9 +3793,9 @@ function App() {
|
||||
})
|
||||
}
|
||||
>
|
||||
<option value="household_basic">Conure - up to 4 birds</option>
|
||||
<option value="household_plus">Indian Ringneck - up to 10 birds</option>
|
||||
<option value="household_macaw">Macaw - 11+ birds</option>
|
||||
<option value="household_basic">Conure (4 birds)</option>
|
||||
<option value="household_plus">Indian Ringneck (10 birds)</option>
|
||||
<option value="household_macaw">Macaw (11+)</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
@@ -3779,8 +3809,8 @@ function App() {
|
||||
})
|
||||
}
|
||||
>
|
||||
<option value="monthly">Monthly</option>
|
||||
<option value="yearly">Annual</option>
|
||||
<option value="monthly">{formatBillingIntervalDropdownLabel(workspaceCreateForm.billingPlan, 'monthly')}</option>
|
||||
<option value="yearly">{formatBillingIntervalDropdownLabel(workspaceCreateForm.billingPlan, 'yearly')}</option>
|
||||
</select>
|
||||
</label>
|
||||
<article className="summary-card">
|
||||
|
||||
Reference in New Issue
Block a user