diff --git a/frontend/src/admin/plans/PlanEditAdmin.js b/frontend/src/admin/plans/PlanEditAdmin.js index 3e2bee7..0168270 100644 --- a/frontend/src/admin/plans/PlanEditAdmin.js +++ b/frontend/src/admin/plans/PlanEditAdmin.js @@ -37,7 +37,13 @@ export default function PlanEditAdmin() { function handleChange(event) { const target = event.target; - const value = target.value; + let value; + try{ + value = parseInt(target.value); + } catch (error){ + value = target.value; + } + const name = target.name; setPlan({ ...plan, [name]: value }); @@ -64,9 +70,7 @@ export default function PlanEditAdmin() { }) .then((response) => response.json()) .then((json) => { - console.log(json.message); - console.log(json.message.startsWith("Plan")); - if (json.message && !json.message.startsWith("Plan")) { + if (json.message) { setMessage(json.message); setVisible(true); } else window.location.href = "/plansAdmin"; diff --git a/src/main/resources/pricing/petclinic.yml b/src/main/resources/pricing/petclinic.yml index e0b39c5..4feb11d 100644 --- a/src/main/resources/pricing/petclinic.yml +++ b/src/main/resources/pricing/petclinic.yml @@ -79,12 +79,12 @@ plans: havePetsDashboard: value: false haveVetSelection: - value: false + value: true haveOnlineConsultation: value: false usageLimits: maxPets: - value: 2 + value: 3 maxVisitsPerMonthAndPet: value: 1 GOLD: