change name office-info && change name img uploaded && change theme selector && set default tab in appo page && clean code
This commit is contained in:
@@ -5,7 +5,6 @@ import { useState } from "react";
|
||||
import Content from "./Content";
|
||||
import Layout from "@/components/layout";
|
||||
import doctors from "@/data/doctors.json";
|
||||
import Date from "@/components/appointment/date";
|
||||
import RegisterPage from "@/components/register";
|
||||
import Paying from "@/components/appointment/paying";
|
||||
import Detail from "@/components/appointment/detail";
|
||||
@@ -13,6 +12,7 @@ import FailedPay from "@/components/appointment/failedPay";
|
||||
import LogInPage from "@/components/register/LogInPage";
|
||||
import SuccessPay from "@/components/appointment/successPay";
|
||||
import VerificationPage from "@/components/register/verificationPage";
|
||||
import Date from "./date";
|
||||
|
||||
function AppointmentPage({ slug, matchedCity }) {
|
||||
const doctor = doctors.find((item) => item.id === +slug);
|
||||
|
||||
@@ -52,8 +52,6 @@ function ModalSearchCity() {
|
||||
<SettingD />
|
||||
</div>
|
||||
<p className="text-[#616161] text-[11px] sm:text-[13px] md:text-[15px] lg:text-[16px] font-medium mx-2">
|
||||
{/* {selected.first && selected.second ?
|
||||
`${selected.first} | ${selected.second}` : 'فیلترها'} */}
|
||||
فیلترها
|
||||
</p>
|
||||
<div className="w-[16px] h-[16px] md:w-[20px] md:h-[20px] lg:w-[24px] lg:h-[24px]">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Selector from "./fields/Selector";
|
||||
import ContentText from "@/app/component/ContentText";
|
||||
import EditField from "@/app/component/fields/EditField";
|
||||
import GroupedSelect from "@/app/component/selectors/GroupedSelect";
|
||||
import MultipleSelect from "@/app/component/selectors/MultipleSelect";
|
||||
@@ -6,7 +7,6 @@ import MultipleSelect from "@/app/component/selectors/MultipleSelect";
|
||||
// Data
|
||||
import specialties from "@/data/specialties.json";
|
||||
import education from "@/data/education.json";
|
||||
import ContentText from "@/app/component/ContentText";
|
||||
|
||||
const validate_medical_number = {
|
||||
min: 1,
|
||||
|
||||
@@ -51,8 +51,8 @@ function Form({ image, data, setData, resetData }) {
|
||||
<Fields
|
||||
data={data}
|
||||
services={services}
|
||||
changeData={changeData}
|
||||
updateNum={updateNum}
|
||||
changeData={changeData}
|
||||
/>
|
||||
<div className="flex flex-col gap-y-[24px]">
|
||||
<FieldDate changeListData={changeData} data={data?.time_work} />
|
||||
|
||||
@@ -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", "خطا در ثبت پزشک! لطفاً دوباره تلاش کنید.");
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user