formatting

This commit is contained in:
Amirhossein Mahmoodi
2024-11-16 11:07:28 +03:30
parent dabd0345a6
commit d0245c7a37
2 changed files with 29 additions and 27 deletions

View File

@@ -87,9 +87,10 @@ const RequestCard = ({ item }) => {
wordBreak: "break-word",
}}
>
{`${t("LoanFollowUp.loan_description")}: ${item.latestHistory?.expert_description
? item.latestHistory.expert_description
: t("LoanFollowUp.loan_no_expert_description")
{`${t("LoanFollowUp.loan_description")}: ${
item.latestHistory?.expert_description
? item.latestHistory.expert_description
: t("LoanFollowUp.loan_no_expert_description")
}`}
</Typography>
)}
@@ -104,9 +105,10 @@ const RequestCard = ({ item }) => {
wordBreak: "break-word",
}}
>
{`${t("LoanFollowUp.loan_description")}: ${item.latestHistory?.expert_description
? item.latestHistory.expert_description
: t("LoanFollowUp.loan_no_expert_description")
{`${t("LoanFollowUp.loan_description")}: ${
item.latestHistory?.expert_description
? item.latestHistory.expert_description
: t("LoanFollowUp.loan_no_expert_description")
}`}
</Typography>
)}

View File

@@ -110,12 +110,12 @@ const UpdateFormReal = ({ LoanDetails, LoanId }) => {
([national_serial_number_or_tracking_code], schema) => {
return national_serial_number_or_tracking_code === "serial_number"
? schema
.test(
"max",
`${t("LoanRequest.national_serial_number_max")}`,
(value) => value && value.toString().length === 10
)
.required(t("ShowLoan.error_message_shenasname_serial"))
.test(
"max",
`${t("LoanRequest.national_serial_number_max")}`,
(value) => value && value.toString().length === 10
)
.required(t("ShowLoan.error_message_shenasname_serial"))
: schema;
}
),
@@ -124,12 +124,12 @@ const UpdateFormReal = ({ LoanDetails, LoanId }) => {
([national_serial_number_or_tracking_code], schema) => {
return national_serial_number_or_tracking_code === "tracking_code"
? schema
.test(
"max",
`${t("LoanRequest.national_tracking_code_max")}`,
(value) => value && value.toString().length === 10
)
.required(t("ShowLoan.error_message_tracking_code"))
.test(
"max",
`${t("LoanRequest.national_tracking_code_max")}`,
(value) => value && value.toString().length === 10
)
.required(t("ShowLoan.error_message_tracking_code"))
: schema;
}
),
@@ -170,7 +170,7 @@ const UpdateFormReal = ({ LoanDetails, LoanId }) => {
.then(() => {
router.push("/dashboard/navgan/followUp-loan");
})
.catch(() => { })
.catch(() => {})
.finally(() => {
props.setSubmitting(false);
});
@@ -492,15 +492,15 @@ const UpdateFormReal = ({ LoanDetails, LoanId }) => {
});
value === "serial_number"
? formik.setFieldValue(
"national_tracking_code",
formik.initialValues.national_tracking_code,
false
)
"national_tracking_code",
formik.initialValues.national_tracking_code,
false
)
: formik.setFieldValue(
"national_serial_number",
formik.initialValues.national_serial_number,
false
);
"national_serial_number",
formik.initialValues.national_serial_number,
false
);
}}
>
<ToggleButton value="serial_number">