mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
feat: billing page in dashboard and setup.
This commit is contained in:
29
client/src/store/plans/plans.selectors.js
Normal file
29
client/src/store/plans/plans.selectors.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
const plansSelector = (state) => state.plans.plans;
|
||||
const planSelector = (state, props) => state.plans.plans
|
||||
.find((plan) => plan.slug === props.planSlug);
|
||||
|
||||
const plansPeriodsSelector = (state) => state.plans.periods;
|
||||
|
||||
// Retrieve manual jounral current page results.
|
||||
export const getPlansSelector = () => createSelector(
|
||||
plansSelector,
|
||||
(plans) => {
|
||||
return plans;
|
||||
},
|
||||
);
|
||||
|
||||
// Retrieve manual jounral current page results.
|
||||
export const getPlansPeriodsSelector = () => createSelector(
|
||||
plansPeriodsSelector,
|
||||
(periods) => {
|
||||
return periods;
|
||||
},
|
||||
);
|
||||
|
||||
// Retrieve plan details.
|
||||
export const getPlanSelector = () => createSelector(
|
||||
planSelector,
|
||||
(plan) => plan,
|
||||
)
|
||||
Reference in New Issue
Block a user