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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user