change key field to specialty, filter list doctors with name, remove loading state from doctors page, save state id in url

This commit is contained in:
Ehsan
2025-09-07 10:22:53 +03:30
parent dc40129034
commit 10d4c39a4d
11 changed files with 142 additions and 59 deletions
+4 -4
View File
@@ -19,13 +19,13 @@ function ButtonApply({
setLoading(true);
const params = new URLSearchParams(window.location.search);
const field = params.get("field");
const specialty = params.get("specialty");
const gender = params.get("gender");
const degree = params.get("degree");
const turn = params.get("turn");
const requestData = {
field: field === "null" ? null : field,
specialty: specialty === "null" ? null : specialty,
gender,
degree,
turn,
@@ -38,7 +38,7 @@ function ButtonApply({
.then((res) => {
if (res && res.data) setDoctors(res.data);
})
.catch((err) => {})
.catch(() => {})
.finally(() => {
setOpen(false);
setLoading(false);
@@ -50,7 +50,7 @@ function ButtonApply({
const mappings = [
{
key: "field",
key: "specialty",
getValue: () => {
if (data.category) {
const children = specialties.filter(