mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat: optimize the onboarding subscription experience.
This commit is contained in:
@@ -26,7 +26,7 @@ export default (mapState) => {
|
||||
const mapped = {
|
||||
...condits,
|
||||
setupStepId: setupStep?.step,
|
||||
setupStepIndex: scenarios.indexOf(setupStep) + 1,
|
||||
setupStepIndex: scenarios.indexOf(setupStep),
|
||||
};
|
||||
return mapState ? mapState(mapped, state, props) : mapped;
|
||||
};
|
||||
|
||||
@@ -3,22 +3,13 @@ import { createReducer } from '@reduxjs/toolkit';
|
||||
import intl from 'react-intl-universal';
|
||||
import t from '@/store/types';
|
||||
|
||||
const getSubscriptionPeriods = () => [
|
||||
{
|
||||
slug: 'month',
|
||||
label: intl.get('plan.monthly'),
|
||||
},
|
||||
{
|
||||
slug: 'year',
|
||||
label: intl.get('plan.yearly'),
|
||||
},
|
||||
];
|
||||
|
||||
const getSubscriptionPlans = () => [
|
||||
{
|
||||
name: intl.get('plan.capital_basic.title'),
|
||||
slug: 'capital_basic',
|
||||
description: [
|
||||
description:
|
||||
'Manage recurring and one-time billing, including subscriptions and invoices.',
|
||||
features: [
|
||||
intl.get('plan.feature.sales_invoices'),
|
||||
intl.get('plan.feature.sales_estimates'),
|
||||
intl.get('plan.feature.customers'),
|
||||
@@ -27,25 +18,15 @@ const getSubscriptionPlans = () => [
|
||||
intl.get('plan.feature.expenses_tracking'),
|
||||
intl.get('plan.feature.basic_financial_reports'),
|
||||
],
|
||||
price: '55',
|
||||
periods: [
|
||||
{
|
||||
slug: 'month',
|
||||
label: intl.get('plan.monthly'),
|
||||
price: '55',
|
||||
},
|
||||
{
|
||||
slug: 'year',
|
||||
label: intl.get('plan.yearly'),
|
||||
price: '595',
|
||||
},
|
||||
],
|
||||
currencyCode: 'LYD',
|
||||
price: '$29',
|
||||
pricePeriod: 'Per Year',
|
||||
},
|
||||
{
|
||||
name: intl.get('plan.capital_plus.title'),
|
||||
slug: 'capital_plus',
|
||||
description: [
|
||||
description:
|
||||
'Manage recurring and one-time billing, including subscriptions and invoices.',
|
||||
features: [
|
||||
intl.get('plan.feature.all_capital_basic'),
|
||||
intl.get('plan.feature.predefined_user_roles'),
|
||||
intl.get('plan.feature.custom_tables_views'),
|
||||
@@ -53,25 +34,16 @@ const getSubscriptionPlans = () => [
|
||||
intl.get('plan.feature.plus_financial_reports'),
|
||||
intl.get('plan.feature.custom_fields_resources'),
|
||||
],
|
||||
price: '75',
|
||||
periods: [
|
||||
{
|
||||
slug: 'month',
|
||||
label: intl.get('plan.monthly'),
|
||||
price: '75',
|
||||
},
|
||||
{
|
||||
slug: 'year',
|
||||
label: intl.get('plan.yearly'),
|
||||
price: '795',
|
||||
},
|
||||
],
|
||||
currencyCode: 'LYD',
|
||||
price: '$29',
|
||||
pricePeriod: 'Per Year',
|
||||
featured: true,
|
||||
},
|
||||
{
|
||||
name: intl.get('plan.essential.title'),
|
||||
slug: 'essentials',
|
||||
description: [
|
||||
description:
|
||||
'Manage recurring and one-time billing, including subscriptions and invoices.',
|
||||
features: [
|
||||
intl.get('plan.feature.all_capital_plus'),
|
||||
intl.get('plan.feature.sales_purchases_order'),
|
||||
intl.get('plan.feature.purchase_invoices'),
|
||||
@@ -81,47 +53,35 @@ const getSubscriptionPlans = () => [
|
||||
intl.get('plan.feature.inventory_reports'),
|
||||
intl.get('plan.feature.landed_cost'),
|
||||
],
|
||||
price: '95',
|
||||
periods: [
|
||||
{
|
||||
slug: 'month',
|
||||
label: intl.get('plan.monthly'),
|
||||
price: '95',
|
||||
},
|
||||
{
|
||||
slug: 'year',
|
||||
label: intl.get('plan.yearly'),
|
||||
price: '995',
|
||||
},
|
||||
],
|
||||
currencyCode: 'LYD',
|
||||
},
|
||||
{
|
||||
name: intl.get('plan.capital_enterprise.title'),
|
||||
slug: 'enterprise',
|
||||
description: [
|
||||
intl.get('plan.feature.all_capital_essential'),
|
||||
intl.get('plan.feature.multiply_branches'),
|
||||
intl.get('plan.feature.multiply_warehouses'),
|
||||
intl.get('plan.feature.accounting_dimensions'),
|
||||
intl.get('plan.feature.warehouses_reports'),
|
||||
intl.get('plan.feature.branches_reports'),
|
||||
],
|
||||
price: '120',
|
||||
currencyCode: 'LYD',
|
||||
periods: [
|
||||
{
|
||||
slug: 'month',
|
||||
label: intl.get('plan.monthly'),
|
||||
price: '120',
|
||||
},
|
||||
{
|
||||
slug: 'year',
|
||||
label: intl.get('plan.yearly'),
|
||||
price: '1,195',
|
||||
},
|
||||
],
|
||||
price: '$29',
|
||||
pricePeriod: 'Per Year',
|
||||
},
|
||||
// {
|
||||
// name: intl.get('plan.capital_enterprise.title'),
|
||||
// slug: 'enterprise',
|
||||
// description: [
|
||||
// intl.get('plan.feature.all_capital_essential'),
|
||||
// intl.get('plan.feature.multiply_branches'),
|
||||
// intl.get('plan.feature.multiply_warehouses'),
|
||||
// intl.get('plan.feature.accounting_dimensions'),
|
||||
// intl.get('plan.feature.warehouses_reports'),
|
||||
// intl.get('plan.feature.branches_reports'),
|
||||
// ],
|
||||
// price: '120',
|
||||
// currencyCode: 'LYD',
|
||||
// periods: [
|
||||
// {
|
||||
// slug: 'month',
|
||||
// label: intl.get('plan.monthly'),
|
||||
// price: '120',
|
||||
// },
|
||||
// {
|
||||
// slug: 'year',
|
||||
// label: intl.get('plan.yearly'),
|
||||
// price: '1,195',
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
];
|
||||
|
||||
const initialState = {
|
||||
@@ -135,9 +95,7 @@ export default createReducer(initialState, {
|
||||
*/
|
||||
[t.INIT_SUBSCRIPTION_PLANS]: (state) => {
|
||||
const plans = getSubscriptionPlans();
|
||||
const periods = getSubscriptionPeriods();
|
||||
|
||||
state.plans = plans;
|
||||
state.periods = periods;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user