add field number in step 3

This commit is contained in:
Ehsan
2024-10-20 01:00:34 +03:30
parent 2b64cb3601
commit 46c33c6eb9
6 changed files with 45 additions and 21 deletions
+14 -9
View File
@@ -12,16 +12,19 @@ function EditField({
iconGray,
isTransparent,
noDisable,
type,
props,
}) {
return (
<div className="relative w-full">
<TextField
{...props}
value={data?.value}
rows={multiline}
multiline={multiline}
disabled={noDisable ? false : !data?.isEdit}
placeholder={placeholder || ""}
type="text"
type={type || "text"}
className={`!w-full res-field-account dark:!bg-transparent ${
isTransparent ? "!bg-transparent lg:!bg-[#FFF]" : "!bg-[#FFF]"
}`}
@@ -48,15 +51,17 @@ function EditField({
},
}}
/>
<Button
className={`!absolute !left-[8px] !-translate-y-1/2 !min-w-fit !p-1
{!type && (
<Button
className={`!absolute !left-[8px] !-translate-y-1/2 !min-w-fit !p-1
${multiline ? "!top-[24px]" : "!top-1/2"}`}
onClick={() => {
changeData(!data.isEdit, "isEdit", name);
}}
>
{icon ? icon : iconGray ? <EditGrayA /> : <EditOrangeA />}
</Button>
onClick={() => {
changeData(!data.isEdit, "isEdit", name);
}}
>
{icon ? icon : iconGray ? <EditGrayA /> : <EditOrangeA />}
</Button>
)}
</div>
);
}
+1 -1
View File
@@ -647,7 +647,7 @@ html {
}
.dark .panel-jalaali .days-body .day.hovered:not(.weekend-day) span {
color: #A1A1A1 !important;
color: #a1a1a1 !important;
}
.dark .panel-jalaali .days-body .day.hovered.today:not(.weekend-day) span {
+1 -1
View File
@@ -9,7 +9,7 @@ import GeneralInformation from "./listMenu/generalInformation";
import Step from "./Step";
function AddDoctorPage() {
const [value, setValue] = useState(1);
const [value, setValue] = useState(0);
const [data, setData] = useState({
general: {
name: { value: "", placeholder: "احسان احمدی", isEdit: true },
@@ -27,8 +27,8 @@ function Form({ setValue, parent, data, setData }) {
});
return (
<div>
<div className="mt-[24px] md:mt-[26px] lg:mt-[28px] grid grid-cols-1 md:grid-cols-2 gap-x-[48px] gap-y-[24px]">
<>
<div className="mt-[24px] scroll-mui md:mt-[26px] lg:mt-[28px] grid grid-cols-1 md:grid-cols-2 gap-x-[48px] gap-y-[24px]">
<ContentText text="نام و نام خانوادگی">
<EditField
isTransparent={true}
@@ -105,7 +105,7 @@ function Form({ setValue, parent, data, setData }) {
</div>
</Button>
</div>
</div>
</>
);
}
@@ -3,6 +3,7 @@ import ContentText from "@/app/component/ContentText";
import TimePickerField from "@/app/component/TimePickerField";
import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect";
import { numberTurns, turnTime, workplace } from "./listSelector";
import EditField from "@/app/component/EditField";
function Form({
handleClose,
@@ -24,11 +25,21 @@ function Form({
<div className="flex flex-col gap-[32px] md:gap-[36px] lg:gap-[40px] min-w-fit md:min-w-[420px]">
<div className="flex relative flex-col gap-[16px]">
<ContentText text="تعداد نوبت">
<AutoCompleteSelect
updateData={updateData}
label="تعداد نوبت"
<EditField
isTransparent={true}
iconGray={true}
changeData={updateData}
data={data?.number_turns}
noDisable={true}
type="number"
placeholder="انتخاب کنید..."
name="number_turns"
list={numberTurns}
props={{
inputProps: {
min: 0,
max: 10,
},
}}
/>
</ContentText>
<ContentText text="زمان نوبت">
@@ -5,9 +5,17 @@ const numberTurns = [
];
const turnTime = [
{ id: "1", label: "10:00" },
{ id: "2", label: "11:00" },
{ id: "3", label: "12:00" },
{ id: 1, label: "00:05" },
{ id: 2, label: "00:10" },
{ id: 3, label: "00:15" },
{ id: 4, label: "00:20" },
{ id: 5, label: "00:25" },
{ id: 6, label: "00:30" },
{ id: 7, label: "00:40" },
{ id: 8, label: "00:50" },
{ id: 9, label: "01:00" },
{ id: 10, label: "01:15" },
{ id: 11, label: "01:30" },
];
const workplace = [