pcm-shared-components 0.0.248 → 0.0.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -157,6 +157,16 @@ export const PlatformPaymentPlans = props => {
|
|
|
157
157
|
platform_plan_type_id = 1,
|
|
158
158
|
billing_period_id = 1
|
|
159
159
|
} = props;
|
|
160
|
+
|
|
161
|
+
const handlePlanSelection = platform_pricing_model_id => {
|
|
162
|
+
try {
|
|
163
|
+
let selectedPlatform = platformPricingModels.find(pricing_model => Number(pricing_model.id) === Number(platform_pricing_model_id));
|
|
164
|
+
onClickPlanSelection(selectedPlatform);
|
|
165
|
+
} catch (error) {
|
|
166
|
+
console.error(error);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
160
170
|
return /*#__PURE__*/React.createElement("div", {
|
|
161
171
|
className: "mx-0 px-4 w-full max-w-full md:max-w-288 bg-white rounded-lg drop-shadow hover:drop-shadow-2xl sm:p-8 border-t-8 transition-all ",
|
|
162
172
|
style: {
|
|
@@ -193,7 +203,7 @@ export const PlatformPaymentPlans = props => {
|
|
|
193
203
|
color: color
|
|
194
204
|
},
|
|
195
205
|
onClick: () => {
|
|
196
|
-
|
|
206
|
+
handlePlanSelection(platform_pricing_model_id);
|
|
197
207
|
}
|
|
198
208
|
}, i18next.t('common.app.start_today')))), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", {
|
|
199
209
|
className: "flex flex-col mx-auto w-full max-w-fill text-center min-h-256 "
|
|
@@ -268,7 +278,7 @@ PlatformPaymentPlans.propTypes = {
|
|
|
268
278
|
/** This is the individual pricing models that are offered to our clients */
|
|
269
279
|
platformPricingModels: PropTypes.array.isRequired,
|
|
270
280
|
|
|
271
|
-
/** Callback when a plan is selected. Returns the platform pricing model
|
|
281
|
+
/** Callback when a plan is selected. Returns the selected platform pricing model object. */
|
|
272
282
|
onClickPlanSelection: PropTypes.func,
|
|
273
283
|
|
|
274
284
|
/** i18next localization to use for the component. Don't use the library localization or else it won't load properly on the consuming application */
|