redirect filter data to doctors page from home page just with one key && add picture url to doctors page && add conditional to appo page and change data in server
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { Button } from "@mui/material";
|
||||
import AddCircleBlueA from "@/components/icons/AddCircleBlueA";
|
||||
import ArrowLeftB from "@/components/icons/ArrowLeftB";
|
||||
import ButtonFixed from "../paying/ButtonFixed";
|
||||
import Form from "./Form";
|
||||
import { request } from "@/services/response";
|
||||
import SubmitData from "./SubmitData";
|
||||
|
||||
function Detail({
|
||||
isForAnother,
|
||||
@@ -12,15 +11,11 @@ function Detail({
|
||||
setIsForAnother,
|
||||
data,
|
||||
setData,
|
||||
prevData,
|
||||
fadeElement,
|
||||
setIsPay,
|
||||
}) {
|
||||
const [insurance, setInsurance] = useState();
|
||||
const [selected, setSelected] = useState({
|
||||
first: "",
|
||||
second: "",
|
||||
});
|
||||
|
||||
const changeData = (value, type, name) =>
|
||||
setData({
|
||||
...data,
|
||||
@@ -30,14 +25,6 @@ function Detail({
|
||||
},
|
||||
});
|
||||
|
||||
const updateSelect = (event, name) =>
|
||||
setSelected({ ...selected, [name]: event });
|
||||
|
||||
const newStep = () => {
|
||||
// if(data)
|
||||
setStep((prev) => prev + 1);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
request.getInsuranceType().then((res) => {
|
||||
if (res && res.data) {
|
||||
@@ -61,7 +48,6 @@ function Detail({
|
||||
data={data}
|
||||
insurance={insurance}
|
||||
changeData={changeData}
|
||||
updateSelect={updateSelect}
|
||||
isForAnother={isForAnother}
|
||||
/>
|
||||
{!isForAnother && (
|
||||
@@ -82,25 +68,7 @@ function Detail({
|
||||
</p>
|
||||
</Button>
|
||||
)}
|
||||
<ButtonFixed>
|
||||
<Button
|
||||
className={`
|
||||
!flex !w-full md:!w-fit
|
||||
!gap-[4px] md:!mr-auto !px-[12px] !py-[8px] md:!py-[9px] !min-w-[150px]
|
||||
${
|
||||
isForAnother
|
||||
? "!mt-0 md:!mt-[40px]"
|
||||
: "!mt-0 md:!mt-[32px]"
|
||||
}`}
|
||||
variant="contained"
|
||||
onClick={newStep}
|
||||
>
|
||||
<p className="text-[#EFEFEF] text-[16px] font-medium">
|
||||
ثبت اطلاعات
|
||||
</p>
|
||||
<ArrowLeftB />
|
||||
</Button>
|
||||
</ButtonFixed>
|
||||
<SubmitData setStep={setStep} data={data} prevData={prevData} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user