Update frontend/src/components/admin/PlanForm.jsx
Browse files
frontend/src/components/admin/PlanForm.jsx
CHANGED
|
@@ -39,6 +39,7 @@ export default function PlanForm({ plan, onSave, onCancel, isLoading }) {
|
|
| 39 |
function handleSubmit(e) {
|
| 40 |
e.preventDefault();
|
| 41 |
const priceNumber = parseFloat(price || "0") || 0;
|
|
|
|
| 42 |
|
| 43 |
onSave({
|
| 44 |
name,
|
|
@@ -46,6 +47,7 @@ export default function PlanForm({ plan, onSave, onCancel, isLoading }) {
|
|
| 46 |
price: priceNumber,
|
| 47 |
stripe_link: stripeLink || null,
|
| 48 |
description: description || null,
|
|
|
|
| 49 |
is_active: isActive,
|
| 50 |
});
|
| 51 |
}
|
|
|
|
| 39 |
function handleSubmit(e) {
|
| 40 |
e.preventDefault();
|
| 41 |
const priceNumber = parseFloat(price || "0") || 0;
|
| 42 |
+
const maxStudentsNumber = parseInt(maxStudents || "1", 10) || 1;
|
| 43 |
|
| 44 |
onSave({
|
| 45 |
name,
|
|
|
|
| 47 |
price: priceNumber,
|
| 48 |
stripe_link: stripeLink || null,
|
| 49 |
description: description || null,
|
| 50 |
+
max_students: maxStudentsNumber,
|
| 51 |
is_active: isActive,
|
| 52 |
});
|
| 53 |
}
|