From 9e5da8f19e0b90cc424868a266ad8621be58da57 Mon Sep 17 00:00:00 2001 From: hamed <15238-genius.ha@users.noreply.drupalcode.org> Date: Thu, 2 Jul 2026 11:13:18 +0330 Subject: [PATCH] feat: update QueryForDoctorsReq and buildDoctorParams to use *_id for specialty, city, and state --- helper/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/helper/index.js b/helper/index.js index 31d4eb0..d8c1687 100644 --- a/helper/index.js +++ b/helper/index.js @@ -425,13 +425,13 @@ export const QueryForDoctorsReq = (newFilter) => { if (newFilter.active === 1) params.active = 1; if (newFilter.specialty?.id) { - params.specialty = newFilter.specialty.id; + params.specialty_id = newFilter.specialty.id; } else if (newFilter.category?.id) { - params.specialty = newFilter.category.id; + params.specialty_id = newFilter.category.id; } - if (newFilter.city?.id) params.city = newFilter.city.id; - if (newFilter.state?.id) params.state = newFilter.state.id; + if (newFilter.city?.id) params.city_id = newFilter.city.id; + if (newFilter.state?.id) params.state_id = newFilter.state.id; if (newFilter.degree && newFilter.degree !== "همه موارد") switch (newFilter.degree) { @@ -516,7 +516,7 @@ export const buildDoctorParams = (searchParams) => { if (searchParams.specialty) { const spec = specialties.find((s) => s.name === searchParams.specialty); if (spec) { - params.specialty = spec.id; + params.specialty_id = spec.id; } } @@ -524,7 +524,7 @@ export const buildDoctorParams = (searchParams) => { if (searchParams.city) { const cityObj = cities.find((c) => c.name === searchParams.city); if (cityObj) { - params.city = cityObj.id; + params.city_id = cityObj.id; } } @@ -532,7 +532,7 @@ export const buildDoctorParams = (searchParams) => { if (searchParams.state) { const stateObj = states.find((s) => s.name === searchParams.state); if (stateObj) { - params.state = stateObj.id; + params.state_id = stateObj.id; } }