fix bug save and set data just with one key, remove page login from appo page, disable not avalaible data in calendar, change steps for pages in appo, get data user, edit and set in page user-info
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { getParsedUserInfo } from "@/helper";
|
||||
import Content from "./Content";
|
||||
import DateBirthday from "./DateBirthday";
|
||||
import AutoSelector from "../component/AutoSelector";
|
||||
import Field from "../component/Field";
|
||||
import { gender, blood_group, marital_status, job } from "./listSelector";
|
||||
import education from "@/data/education.json";
|
||||
import DefaultSelect from "@/app/component/selectors/DefaultSelect";
|
||||
|
||||
function Form({ insurance, errors, changeData, information }) {
|
||||
const findVal = (list, name) =>
|
||||
@@ -72,7 +72,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
/>
|
||||
</Content>
|
||||
<Content req={true} error={errors?.gender} title="جنسیت">
|
||||
<AutoSelector
|
||||
<DefaultSelect
|
||||
error={errors?.gender}
|
||||
updateData={(name, data) =>
|
||||
changeData(data === "زن" ? "female" : "male", name)
|
||||
@@ -107,7 +107,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
/>
|
||||
</Content>
|
||||
<Content req={true} error={errors?.basic_insurance} title="نوع بیمه">
|
||||
<AutoSelector
|
||||
<DefaultSelect
|
||||
error={errors?.basic_insurance}
|
||||
updateData={(name, val) => {
|
||||
changeData([Number(val.id)], name);
|
||||
@@ -141,7 +141,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
/>
|
||||
</Content>
|
||||
<Content req={true} error={errors?.blood_type} title="گروه خونی">
|
||||
<AutoSelector
|
||||
<DefaultSelect
|
||||
error={errors?.blood_type}
|
||||
updateData={(name, value) =>
|
||||
changeData(blood_group.find((g) => g.label === value).id, name)
|
||||
@@ -153,7 +153,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
/>
|
||||
</Content>
|
||||
<Content req={true} error={errors?.marital_status} title="وضعیت تاهل">
|
||||
<AutoSelector
|
||||
<DefaultSelect
|
||||
error={errors?.marital_status}
|
||||
updateData={(name, value) =>
|
||||
changeData(value === "متاهل" ? "married" : "single", name)
|
||||
@@ -175,7 +175,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
/>
|
||||
</Content>
|
||||
<Content req={true} error={errors?.education} title="تحصیلات">
|
||||
<AutoSelector
|
||||
<DefaultSelect
|
||||
error={errors?.education}
|
||||
updateData={(name, value) =>
|
||||
changeData(education.find((g) => g.label === value).id, name)
|
||||
@@ -187,7 +187,7 @@ function Form({ insurance, errors, changeData, information }) {
|
||||
/>
|
||||
</Content>
|
||||
<Content req={true} error={errors?.job} title="شغل">
|
||||
<AutoSelector
|
||||
<DefaultSelect
|
||||
error={errors?.job}
|
||||
updateData={(name, value) =>
|
||||
changeData(value === "آزاد" ? "azad" : "dolati", name)
|
||||
|
||||
Reference in New Issue
Block a user