change design and data list in doctor-item & handle component appointment in doctor-item & handle functionality date-picker & fix bug appointment page & add req get appointment list
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
function Content({ isConfirmed, children, title, error }) {
|
||||
function Content({ isConfirmed, children, title, error, req }) {
|
||||
return (
|
||||
<div className="flex w-full flex-col items-start justify-start gap-[8px] sm:gap-[3px] md:gap-[7px] lg:gap-[9px]">
|
||||
<div className="flex min-h-[32px] items-center justify-start gap-[8px] md:gap-[6px] lg:gap-[4px]">
|
||||
<p className="text-[#525252] text-[14px] font-medium">{title}</p>
|
||||
<p className="text-[#525252] text-[14px] font-medium">
|
||||
{title} {req && "*"}
|
||||
</p>
|
||||
{isConfirmed && (
|
||||
<p
|
||||
className="py-[4px] md:py-[2px] px-[5px] bg-[#05BA58] rounded-[40px] text-[#FFF]
|
||||
|
||||
@@ -20,8 +20,6 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
list.find((g) => g.id === information[name]);
|
||||
const parsedUserInfo = getParsedUserInfo();
|
||||
|
||||
console.log(information);
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-x-[24px] gap-y-[10px]">
|
||||
<Content title="شماره موبایل" isConfirmed={true}>
|
||||
@@ -35,8 +33,14 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
data={parsedUserInfo?.username}
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.national_code} title="کد ملی" isConfirmed={false}>
|
||||
<Content
|
||||
req={true}
|
||||
error={errors?.national_code}
|
||||
title="کد ملی"
|
||||
isConfirmed={false}
|
||||
>
|
||||
<Field
|
||||
req={true}
|
||||
error={errors?.national_code}
|
||||
type="number"
|
||||
iconGray={true}
|
||||
@@ -47,7 +51,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
disable={information?.prev_data}
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.name} title="نام" isConfirmed={false}>
|
||||
<Content req={true} error={errors?.name} title="نام" isConfirmed={false}>
|
||||
<Field
|
||||
error={errors?.name}
|
||||
isTransparent={true}
|
||||
@@ -57,7 +61,12 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
name="name"
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.family} title="نام خانوادگی" isConfirmed={false}>
|
||||
<Content
|
||||
req={true}
|
||||
error={errors?.family}
|
||||
title="نام خانوادگی"
|
||||
isConfirmed={false}
|
||||
>
|
||||
<Field
|
||||
error={errors?.family}
|
||||
isTransparent={true}
|
||||
@@ -67,7 +76,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
name="family"
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.gender} title="جنسیت">
|
||||
<Content req={true} error={errors?.gender} title="جنسیت">
|
||||
<AutoSelector
|
||||
error={errors?.gender}
|
||||
updateData={(name, data) =>
|
||||
@@ -79,7 +88,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
list={gender}
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.birthday} title="تاریخ تولد">
|
||||
<Content req={true} error={errors?.birthday} title="تاریخ تولد">
|
||||
<DateBirthday
|
||||
error={errors?.birthday}
|
||||
data={information?.birthday}
|
||||
@@ -87,7 +96,12 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
changeData={changeData}
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.fathers_name} title="نام پدر" isConfirmed={false}>
|
||||
<Content
|
||||
req={true}
|
||||
error={errors?.fathers_name}
|
||||
title="نام پدر"
|
||||
isConfirmed={false}
|
||||
>
|
||||
<Field
|
||||
error={errors?.fathers_name}
|
||||
isTransparent={true}
|
||||
@@ -97,7 +111,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
name="fathers_name"
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.basic_insurance} title="نوع بیمه">
|
||||
<Content req={true} error={errors?.basic_insurance} title="نوع بیمه">
|
||||
<AutoSelector
|
||||
error={errors?.basic_insurance}
|
||||
updateData={(name, val) => {
|
||||
@@ -121,6 +135,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
isConfirmed={false}
|
||||
>
|
||||
<Field
|
||||
req={true}
|
||||
error={errors?.insurance_id}
|
||||
isTransparent={true}
|
||||
iconGray={true}
|
||||
@@ -130,7 +145,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
name="insurance_id"
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.blood_type} title="گروه خونی">
|
||||
<Content req={true} error={errors?.blood_type} title="گروه خونی">
|
||||
<AutoSelector
|
||||
error={errors?.blood_type}
|
||||
updateData={(name, value) =>
|
||||
@@ -142,7 +157,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
list={blood_group}
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.marital_status} title="وضعیت تاهل">
|
||||
<Content req={true} error={errors?.marital_status} title="وضعیت تاهل">
|
||||
<AutoSelector
|
||||
error={errors?.marital_status}
|
||||
updateData={(name, value) =>
|
||||
@@ -164,7 +179,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
name="home_phone"
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.education} title="تحصیلات">
|
||||
<Content req={true} error={errors?.education} title="تحصیلات">
|
||||
<AutoSelector
|
||||
error={errors?.education}
|
||||
updateData={(name, value) =>
|
||||
@@ -176,7 +191,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
list={education}
|
||||
/>
|
||||
</Content>
|
||||
<Content error={errors?.job} title="شغل">
|
||||
<Content req={true} error={errors?.job} title="شغل">
|
||||
<AutoSelector
|
||||
error={errors?.job}
|
||||
updateData={(name, value) =>
|
||||
|
||||
Reference in New Issue
Block a user