Updated subscriptions
This commit is contained in:
+35
-13
@@ -5,7 +5,7 @@ import defaultBirdPhoto from './assets/yoda-default.png';
|
||||
import { findParrotWeightReference, parrotSpeciesOptions, type ParrotWeightReference } from './parrotWeightReference';
|
||||
import QRCode from 'qrcode';
|
||||
|
||||
type BillingPlan = 'rescue_free' | 'household_basic' | 'household_plus' | 'household_macaw';
|
||||
type BillingPlan = 'rescue_free' | 'household_basic' | 'household_plus' | 'household_macaw' | 'household_hyacinth_macaw';
|
||||
type HouseholdBillingPlan = Exclude<BillingPlan, 'rescue_free'>;
|
||||
type BillingInterval = 'monthly' | 'yearly';
|
||||
type WorkspaceType = 'standard' | 'rescue';
|
||||
@@ -978,7 +978,7 @@ const oauthStartUrl = (providerKey: AuthProvider['providerKey']) => {
|
||||
};
|
||||
|
||||
const isHouseholdPlan = (billingPlan: BillingPlan): billingPlan is HouseholdBillingPlan =>
|
||||
billingPlan === 'household_basic' || billingPlan === 'household_plus' || billingPlan === 'household_macaw';
|
||||
billingPlan === 'household_basic' || billingPlan === 'household_plus' || billingPlan === 'household_macaw' || billingPlan === 'household_hyacinth_macaw';
|
||||
|
||||
const formatBillingIntervalName = (billingInterval: BillingInterval) => (billingInterval === 'yearly' ? 'Annual' : 'Monthly');
|
||||
|
||||
@@ -995,7 +995,11 @@ const formatBillingPlanName = (billingPlan: BillingPlan) => {
|
||||
return 'Indian Ringneck';
|
||||
}
|
||||
|
||||
return 'Macaw';
|
||||
if (billingPlan === 'household_macaw') {
|
||||
return 'African Grey';
|
||||
}
|
||||
|
||||
return 'Hyacinth Macaw';
|
||||
};
|
||||
|
||||
const formatBillingPlanCapacity = (billingPlan: BillingPlan) => {
|
||||
@@ -1008,10 +1012,14 @@ const formatBillingPlanCapacity = (billingPlan: BillingPlan) => {
|
||||
}
|
||||
|
||||
if (billingPlan === 'household_plus') {
|
||||
return 'Permits 5 to 10 birds in the flock.';
|
||||
return 'Permits 5 to 9 birds in the flock.';
|
||||
}
|
||||
|
||||
return 'Permits 11 or more birds in the flock.';
|
||||
if (billingPlan === 'household_macaw') {
|
||||
return 'Permits 11 to 16 birds in the flock.';
|
||||
}
|
||||
|
||||
return 'Permits 17 or more birds in the flock.';
|
||||
};
|
||||
|
||||
const formatBillingPlanDropdownLabel = (billingPlan: HouseholdBillingPlan) => {
|
||||
@@ -1020,10 +1028,14 @@ const formatBillingPlanDropdownLabel = (billingPlan: HouseholdBillingPlan) => {
|
||||
}
|
||||
|
||||
if (billingPlan === 'household_plus') {
|
||||
return 'Indian Ringneck (10 birds)';
|
||||
return 'Indian Ringneck (5-9 birds)';
|
||||
}
|
||||
|
||||
return 'Macaw (11+)';
|
||||
if (billingPlan === 'household_macaw') {
|
||||
return 'African Grey (11-16 birds)';
|
||||
}
|
||||
|
||||
return 'Hyacinth Macaw (17+)';
|
||||
};
|
||||
|
||||
const householdPlanPrices: Record<HouseholdBillingPlan, Record<BillingInterval, string>> = {
|
||||
@@ -1039,6 +1051,10 @@ const householdPlanPrices: Record<HouseholdBillingPlan, Record<BillingInterval,
|
||||
monthly: '$15.99/month',
|
||||
yearly: '$160/year',
|
||||
},
|
||||
household_hyacinth_macaw: {
|
||||
monthly: '$49.99/month',
|
||||
yearly: '$500/year',
|
||||
},
|
||||
};
|
||||
|
||||
const formatBillingIntervalDropdownLabel = (billingPlan: HouseholdBillingPlan, billingInterval: BillingInterval) =>
|
||||
@@ -1050,11 +1066,15 @@ const formatBillingPlanBirdLimit = (billingPlan: BillingPlan) => {
|
||||
}
|
||||
|
||||
if (billingPlan === 'household_plus') {
|
||||
return '10';
|
||||
return '9';
|
||||
}
|
||||
|
||||
if (billingPlan === 'household_macaw') {
|
||||
return '11+';
|
||||
return '16';
|
||||
}
|
||||
|
||||
if (billingPlan === 'household_hyacinth_macaw') {
|
||||
return '17+';
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -6432,8 +6452,9 @@ function App() {
|
||||
}
|
||||
>
|
||||
<option value="household_basic">Conure (4 birds)</option>
|
||||
<option value="household_plus">Indian Ringneck (10 birds)</option>
|
||||
<option value="household_macaw">Macaw (11+)</option>
|
||||
<option value="household_plus">Indian Ringneck (5-9 birds)</option>
|
||||
<option value="household_macaw">African Grey (11-16 birds)</option>
|
||||
<option value="household_hyacinth_macaw">Hyacinth Macaw (17+)</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
@@ -6570,8 +6591,9 @@ function App() {
|
||||
}
|
||||
>
|
||||
<option value="household_basic">Conure (4 birds)</option>
|
||||
<option value="household_plus">Indian Ringneck (10 birds)</option>
|
||||
<option value="household_macaw">Macaw (11+)</option>
|
||||
<option value="household_plus">Indian Ringneck (5-9 birds)</option>
|
||||
<option value="household_macaw">African Grey (11-16 birds)</option>
|
||||
<option value="household_hyacinth_macaw">Hyacinth Macaw (17+)</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
|
||||
Reference in New Issue
Block a user