handle change data in doctor model, set previous data when user close modal, update list doctor after update data and change key name in url

This commit is contained in:
Ehsan
2025-09-05 23:05:02 +03:30
parent ebfe47468c
commit dc40129034
13 changed files with 175 additions and 56 deletions
@@ -51,7 +51,6 @@ function ModalAnswer({ doctor }) {
request
.postDoctorComment(comment.detail)
.then((res) => {
console.log(res);
let newComment = comment.rate;
newComment = {
correct_diagnosis: newComment[1].progress,
@@ -62,25 +61,21 @@ function ModalAnswer({ doctor }) {
doctor: doctor?.id,
rate: averageRate,
};
console.log(newComment);
request
.postDoctorRate(newComment)
.then((res) => {
setLoading(false);
setOpen(false);
console.log(res);
})
.catch((err) => {
setLoading(false);
setOpen(false);
console.log(err);
});
})
.catch((err) => {
setLoading(false);
setOpen(false);
console.log(err);
});
};
+1 -1
View File
@@ -4,7 +4,7 @@ import Share from "./detailDoctor/Share";
import CustomLoading from "@/app/component/loading/Custom";
function DoctorPage({ doctor, doctors, comments }) {
console.log(comments);
comments;
return (
<div className="pt-[92px] sm:pt-[120px] mt:pt-[148px] lg:pt-[176px] mt-[px] padding-responsive">