change name office-info && change name img uploaded && change theme selector && set default tab in appo page && clean code

This commit is contained in:
Ehsan
2025-07-25 00:02:46 +03:30
parent 901bca6529
commit 7e61867e3d
11 changed files with 33 additions and 23 deletions
@@ -1,9 +1,10 @@
import ArrowLeftPA from "@/components/icons/ArrowLeftPA";
import { checkAllValues } from "@/helper";
import { alert, checkAllValues } from "@/helper";
import { request } from "@/services/response";
import { Button } from "@mui/material";
import { useState } from "react";
import { useEffect, useState } from "react";
import { transformData } from "./function";
import { toast, ToastContainer } from "react-toastify";
function SendReq({ img, data, resetData }) {
const [loading, setLoading] = useState(false);
@@ -17,12 +18,16 @@ function SendReq({ img, data, resetData }) {
request
.postDoctor(transformed)
.then(() => {
resetData();
setLoading(false);
.then((res) => {
if (res.id) {
alert("success", "پزشک جدید با موفقیت اضافه شد!");
resetData();
setLoading(false);
}
})
.catch(() => {
setLoading(false);
alert("error", "خطا در ثبت پزشک! لطفاً دوباره تلاش کنید.");
});
};