Merge branch 'feature/amin_navgan_type' into 'develop'

delete navgan type input and change plate number default

See merge request witel-front-end/loan-facilities/user-v2!8
This commit is contained in:
AmirHossein Mahmoodi
2024-05-26 08:18:38 +00:00
2 changed files with 45 additions and 123 deletions

View File

@@ -61,9 +61,8 @@ const LegalPersonForm = ({setFinishLoanRequest}) => {
boss_national_serial_number: "",
boss_national_card_tracking_code: "",
national_serial_number_or_tracking_code: "national_serial_number",
navgan_type: "",
plate_part1: "",
plate_part2: "الف",
plate_part2: "ع",
plate_part3: "",
plate_part4: "",
address: "",
@@ -88,7 +87,6 @@ const LegalPersonForm = ({setFinishLoanRequest}) => {
birthday: Yup.string().required(t("LoanRequest.error_message_boss_date_of_birth")),
company_name: Yup.string().required(t("LoanRequest.error_message_company_name")),
boss_gender: Yup.string().required(t("LoanRequest.error_message_boss_gender")),
navgan_type: Yup.string().required(t("LoanRequest.error_message_navgan_type")),
occupation_id: Yup.string().required(t("LoanRequest.error_message_occupation_id")),
education_id: Yup.string().required(t("LoanRequest.error_message_education_id")),
address: Yup.string().required(t("LoanRequest.error_message_address")),
@@ -187,7 +185,7 @@ const LegalPersonForm = ({setFinishLoanRequest}) => {
activity_type_id: values.activity_type,
navgan_plan_id: values.navgan_plan_id,
postal_code: values.company_postal_code,
navgan_type: values.navgan_type,
navgan_type: "عمومی",
gender: values.boss_gender,
plate_part1: values.plate_part1,
plate_part2: values.plate_part2,
@@ -198,7 +196,7 @@ const LegalPersonForm = ({setFinishLoanRequest}) => {
birthday: values.birthday.locale("en").format("YYYY-MM-DD"),
education_id: values.education_id,
occupation_id: values.occupation_id,
boss_father_name: values.boss_father_name,
father_name: values.boss_father_name,
facility_usage_history: values.history_facilities === true ? 1 : 0,
..._national_card,
..._national_number,
@@ -678,61 +676,6 @@ const LegalPersonForm = ({setFinishLoanRequest}) => {
/>
</Grid>
</Grid>
<Grid container spacing={2} sx={{padding: 2}}>
<Grid item xs={12} sm={6}>
<SelectBox
name="navgan_type"
label={t("LoanRequest.text_field_navgan_type")}
size="small"
value={formik.values.navgan_type}
selectType="navgan_type"
selectors={[
{
id: 1,
value: "روستایی",
name: "روستایی",
},
{
id: 2,
value: "عمومی",
name: "عمومی",
},
{
id: 3,
value: "منطقه آزاد",
name: "منطقه آزاد",
},
]}
schema={{value: "value", name: "name"}}
select={formik.values.navgan_type}
handleChange={(event) => {
formik.setFieldValue("navgan_type", event.target.value);
}}
setFieldTouched={formik.setFieldTouched}
error={formik.touched.navgan_type && Boolean(formik.errors.navgan_type)}
helperText={formik.touched.navgan_type && formik.errors.navgan_type}
onBlur={formik.handleBlur("navgan_type")}
/>
</Grid>
<Grid item xs={12} sm={6}>
<TextField
sx={{width: "100%"}}
name="navgan_id"
variant="outlined"
inputProps={{inputMode: "numeric", pattern: "[0-9]*"}}
type={"tel"}
value={formik.values.navgan_id}
onChange={formik.handleChange}
size="small"
label={t("LoanRequest.text_field_navgan_id")}
placeholder={t("LoanRequest.text_field_enter_your_navgan_id")}
fullWidth
onBlur={formik.handleBlur("navgan_id")}
error={formik.touched.navgan_id && Boolean(formik.errors.navgan_id)}
helperText={formik.touched.navgan_id && formik.errors.navgan_id}
/>
</Grid>
</Grid>
<Grid container spacing={2} sx={{padding: 2}}>
<Grid item xs={12} sm={6}>
<SelectBox
@@ -766,7 +709,25 @@ const LegalPersonForm = ({setFinishLoanRequest}) => {
</Grid>
</Grid>
<Grid container spacing={2} sx={{padding: 2}}>
<Grid item xs={12} sm={6}>
<Grid item xs={12} sm={4}>
<TextField
sx={{width: "100%"}}
name="navgan_id"
variant="outlined"
inputProps={{inputMode: "numeric", pattern: "[0-9]*"}}
type={"tel"}
value={formik.values.navgan_id}
onChange={formik.handleChange}
size="small"
label={t("LoanRequest.text_field_navgan_id")}
placeholder={t("LoanRequest.text_field_enter_your_navgan_id")}
fullWidth
onBlur={formik.handleBlur("navgan_id")}
error={formik.touched.navgan_id && Boolean(formik.errors.navgan_id)}
helperText={formik.touched.navgan_id && formik.errors.navgan_id}
/>
</Grid>
<Grid item xs={12} sm={4}>
<SelectBox
name="education_id"
label={t("LoanRequest.text_field_education_id")}
@@ -787,7 +748,7 @@ const LegalPersonForm = ({setFinishLoanRequest}) => {
onBlur={formik.handleBlur("education_id")}
/>
</Grid>
<Grid item xs={12} sm={6}>
<Grid item xs={12} sm={4}>
<SelectBox
name="occupation_id"
label={t("LoanRequest.text_field_occupation_id")}

View File

@@ -58,10 +58,9 @@ const RealPersonForm = ({setFinishLoanRequest}) => {
national_card_tracking_code: "",
national_serial_number_or_tracking_code: "national_serial_number",
postal_code: "",
navgan_type: "",
address: "",
plate_part1: "",
plate_part2: "الف",
plate_part2: "ع",
plate_part3: "",
plate_part4: "",
birthday: "",
@@ -83,7 +82,6 @@ const RealPersonForm = ({setFinishLoanRequest}) => {
father_name: Yup.string().required(t("LoanRequest.error_message_father_name")),
occupation_id: Yup.string().required(t("LoanRequest.error_message_occupation_id")),
education_id: Yup.string().required(t("LoanRequest.error_message_education_id")),
navgan_type: Yup.string().required(t("LoanRequest.error_message_navgan_type")),
address: Yup.string().required(t("LoanRequest.error_message_address")),
birthday: Yup.string().required(t("LoanRequest.error_message_date_of_birth")),
postal_code: Yup.mixed()
@@ -156,7 +154,7 @@ const RealPersonForm = ({setFinishLoanRequest}) => {
last_name: values.last_name,
navgan_id: values.navgan_id,
postal_code: values.postal_code,
navgan_type: values.navgan_type,
navgan_type: "عمومی",
gender: values.gender,
address: values.address,
education_id: values.education_id,
@@ -452,7 +450,25 @@ const RealPersonForm = ({setFinishLoanRequest}) => {
</Grid>
</Grid>
<Grid container spacing={2} sx={{padding: 2}}>
<Grid item xs={12} sm={6}>
<Grid item xs={12} sm={4}>
<TextField
sx={{width: "100%"}}
name="navgan_id"
variant="outlined"
inputProps={{inputMode: "numeric", pattern: "[0-9]*"}}
type={"tel"}
value={formik.values.navgan_id}
onChange={formik.handleChange}
size="small"
label={t("LoanRequest.text_field_navgan_id")}
placeholder={t("LoanRequest.text_field_enter_your_navgan_id")}
fullWidth
onBlur={formik.handleBlur("navgan_id")}
error={formik.touched.navgan_id && Boolean(formik.errors.navgan_id)}
helperText={formik.touched.navgan_id && formik.errors.navgan_id}
/>
</Grid>
<Grid item xs={12} sm={4}>
<TextField
sx={{width: "100%"}}
name="postal_code"
@@ -481,7 +497,7 @@ const RealPersonForm = ({setFinishLoanRequest}) => {
helperText={formik.touched.postal_code && formik.errors.postal_code}
/>
</Grid>
<Grid item xs={12} sm={6}>
<Grid item xs={12} sm={4}>
<TextField
sx={{width: "100%"}}
name="telephone_number"
@@ -511,61 +527,6 @@ const RealPersonForm = ({setFinishLoanRequest}) => {
/>
</Grid>
</Grid>
<Grid container spacing={2} sx={{padding: 2}}>
<Grid item xs={12} sm={6}>
<SelectBox
name="navgan_type"
label={t("LoanRequest.text_field_navgan_type")}
size="small"
value={formik.values.navgan_type}
selectType="navgan_type"
selectors={[
{
id: 1,
value: "روستایی",
name: "روستایی",
},
{
id: 2,
value: "عمومی",
name: "عمومی",
},
{
id: 3,
value: "منطقه آزاد",
name: "منطقه آزاد",
},
]}
schema={{value: "value", name: "name"}}
select={formik.values.navgan_type}
handleChange={(event) => {
formik.setFieldValue("navgan_type", event.target.value);
}}
setFieldTouched={formik.setFieldTouched}
error={formik.touched.navgan_type && Boolean(formik.errors.navgan_type)}
helperText={formik.touched.navgan_type && formik.errors.navgan_type}
onBlur={formik.handleBlur("navgan_type")}
/>
</Grid>
<Grid item xs={12} sm={6}>
<TextField
sx={{width: "100%"}}
name="navgan_id"
variant="outlined"
inputProps={{inputMode: "numeric", pattern: "[0-9]*"}}
type={"tel"}
value={formik.values.navgan_id}
onChange={formik.handleChange}
size="small"
label={t("LoanRequest.text_field_navgan_id")}
placeholder={t("LoanRequest.text_field_enter_your_navgan_id")}
fullWidth
onBlur={formik.handleBlur("navgan_id")}
error={formik.touched.navgan_id && Boolean(formik.errors.navgan_id)}
helperText={formik.touched.navgan_id && formik.errors.navgan_id}
/>
</Grid>
</Grid>
<Grid container spacing={2} sx={{padding: 2}}>
<Grid item xs={12} sm={6}>
<SelectBox