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:
@@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user