remove additional code && fix bug select city and state && alert success and error message for comment in doctors page && handle set data after user searched in field doctors page && set data appointment from doctor data && set value in field search after user reload in doctors page

This commit is contained in:
ehsan
2025-09-22 19:56:28 +03:30
parent e11f4ed3c5
commit 74c6cf7b6b
13 changed files with 132 additions and 59 deletions
+7 -1
View File
@@ -2,6 +2,7 @@ import { Button } from "@mui/material";
import Field from "./Field";
import { useState } from "react";
import { request } from "@/services/response";
import { alert } from "@/helper";
function SendAnswer({ data }) {
const [comment, setComment] = useState("");
@@ -24,9 +25,14 @@ function SendAnswer({ data }) {
request
.postDoctorComment(body)
.then(() => {
alert(
"success",
"کامنت شما با موفقیت ثبت شد و پس از تأیید نمایش داده می‌شود."
);
resetData();
})
.catch(() => {
alert("error", "خطایی رخ داد! لطفاً دوباره تلاش کنید.");
resetData();
});
};
@@ -45,8 +51,8 @@ function SendAnswer({ data }) {
/>
<Button
loading={loading}
variant="contained"
onClick={sendReq}
variant="contained"
className="!p-2 !h-10 !text-[12px] !font-medium sm:!py-[10px] md:!px-[12px] !rounded-[8px]
!shadow-none sm:!shadow-[0px_4px_30px_0px_rgba(56,_160,_162,_0.30)]"
>