remove value step

This commit is contained in:
Ehsan
2024-10-20 00:38:30 +03:30
parent 5ff157d04b
commit 2b64cb3601
5 changed files with 33 additions and 17 deletions
@@ -1,6 +1,6 @@
import { Button } from "@mui/material";
import FieldDate from "./FieldDate";
import { degree } from "./listSelector";
import { degree, expertise } from "./listSelector";
import RadioGender from "./RadioGender";
// Components
@@ -35,6 +35,7 @@ function Form({ setValue, parent, data, setData }) {
iconGray={true}
changeData={changeData}
data={data?.name}
placeholder={data?.name.placeholder}
name="name"
/>
</ContentText>
@@ -44,16 +45,16 @@ function Form({ setValue, parent, data, setData }) {
iconGray={true}
changeData={changeData}
data={data?.medical_system_number}
placeholder={data?.medical_system_number.placeholder}
name="medical_system_number"
/>
</ContentText>
<ContentText text="تخصص">
<EditField
isTransparent={true}
iconGray={true}
changeData={changeData}
data={data?.expertise}
<AutoCompleteSelect
updateData={changeData}
label="انتخاب کنید..."
name="expertise"
list={expertise}
/>
</ContentText>
<ContentText text="مدرک">
@@ -4,3 +4,10 @@ export const degree = [
{ label: "مدرک 3", id: 30 },
{ label: "مدرک 4", id: 40 },
];
export const expertise = [
{ label: "فوق تخصص", id: 10 },
{ label: "دکترای تخصصی", id: 20 },
{ label: "متخصص", id: 30 },
{ label: "دکتری", id: 40 },
];
@@ -10,13 +10,17 @@ function OfficeInformation({ setValue, parent, data, setData }) {
<div className="mt-[40px] w-full flex justify-end">
<Button
className={`!w-full md:!w-fit !shadow-none !rounded-[4px] !gap-[4px] !text-[#EFEFEF] !text-[14px] md:!text-[16px] !font-medium
${!checkAllValues(data) && "opacity-60"}`}
disabled={!checkAllValues(data)}
${!checkAllValues(data.office) && "opacity-60"}`}
disabled={!checkAllValues(data.office)}
onClick={() => setValue((prev) => prev + 1)}
variant="contained"
>
ثبت اطلاعات
<div className={!checkAllValues(data) ? "opacity-40" : "opacity-100"}>
<div
className={
!checkAllValues(data.office) ? "opacity-40" : "opacity-100"
}
>
<ArrowLeftPA />
</div>
</Button>