diff --git a/example.env.local b/example.env.local
index d7db66e..cbea825 100644
--- a/example.env.local
+++ b/example.env.local
@@ -1,5 +1,5 @@
NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard"
-NEXT_PUBLIC_API_VERSION = "1.28.6"
+NEXT_PUBLIC_API_VERSION = "1.29.0"
NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa"
NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"
diff --git a/package.json b/package.json
index c03278c..33261ac 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,7 @@
"dayjs": "^1.11.9",
"eslint": "8.36.0",
"file-saver": "^2.0.5",
- "formik": "^2.2.9",
+ "formik": "^2.4.5",
"fs-extra": "^11.1.1",
"image-resize": "^1.3.2",
"image-to-file-converter": "^1.0.6",
diff --git a/public/locales/fa/app.json b/public/locales/fa/app.json
index 1cfa2f8..0b4d635 100644
--- a/public/locales/fa/app.json
+++ b/public/locales/fa/app.json
@@ -603,6 +603,15 @@
"loading_permissions_list": "درحال دریافت لیست دسترسی ها"
},
"reports": {
+ "dynamic_label_functionality": "{done} از {total} انجام شده",
+ "dynamic_total_budget": "ابلاغ تسهیلات: {total_budget} میلیون ریال",
+ "dynamic_label_referred": "{count} فقره در مجموع {total_amount} میلیون ریال",
+ "referred_loans_to_bank": "ارسال مدیرکل به بانک",
+ "paid_loans": "پرداخت شده بانک",
+ "expert": "عملکرد کارشناس",
+ "transportation_assistant": "عملکرد معاون",
+ "province_manager": "عملکرد مدیر",
+ "bank": "عملکرد بانک",
"loan_progress": "درصد پیشرفت تسویه وام",
"loan_distribution": "درصد توزیع وام ها در هر مرحله",
"filter_as": "فیلتر های اعمال شده",
@@ -663,6 +672,7 @@
"Table_head_position": "سمت",
"Table_head_action": "عملیات",
"Table_head_file": "فایل پیوست",
+ "Table_head_expert_description": "توضیحات",
"empty_history_detail": "سابقه ای برای این وام وجود ندارد"
}
}
\ No newline at end of file
diff --git a/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx b/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx
index 79af47c..438bff5 100644
--- a/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx
+++ b/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx
@@ -19,21 +19,17 @@ const PrintHistory = ({attachment}) => {
}
- return (
- :
- }
- onClick={() => clickHandler(attachment)}
- >
- {t("LoanHistory.history_report")}
-
- )
+ return ( : }
+ onClick={() => clickHandler(attachment.file)}
+ >
+ {attachment.title}
+ )
}
export default PrintHistory
\ No newline at end of file
diff --git a/src/components/dashboard/loan-history/Form/HistoryForm/TableContent.jsx b/src/components/dashboard/loan-history/Form/HistoryForm/TableContent.jsx
index 34b1529..d9382a1 100644
--- a/src/components/dashboard/loan-history/Form/HistoryForm/TableContent.jsx
+++ b/src/components/dashboard/loan-history/Form/HistoryForm/TableContent.jsx
@@ -33,77 +33,77 @@ const TableContent = ({rowId}) => {
})
}, []);
- return (
-
+ return (
{error ? ({t("LoanHistory.Table_history_error")}) :
- (isLoading ? () : (
- historyDetails.latest_histories.length === 0 ? (
- {t("LoanHistory.empty_history_detail")}
- ) : (
-
-
-
-
-
- {t("LoanHistory.Table_head_name")}
- {t("LoanHistory.Table_head_date")}
- {t("LoanHistory.Table_head_position")}
- {t("LoanHistory.Table_head_action")}
- {t("LoanHistory.Table_head_file")}
-
-
-
- {
- historyDetails.latest_histories.map((latest_history, index) => {
- return (
-
-
- {latest_history.expert.name}
-
- {moment(latest_history.created_at).locale("fa").format("HH:mm | yyyy/MM/DD")}
- {latest_history.expert.position}
- {latest_history.previous_state_name}
-
- {latest_history.attachment ? (
-
- ) : null}
-
-
- )
- })
- }
-
-
-
-
- )
- ))
- }
+ padding: 2, display: "flex", alignItems: "center", justifyContent: "center"
+ }}>{t("LoanHistory.Table_history_error")}) : (isLoading ? (
+ ) : (historyDetails.latest_histories.length === 0 ? ({t("LoanHistory.empty_history_detail")}) : (
+
+
+
+
+ {t("LoanHistory.Table_head_name")}
+ {t("LoanHistory.Table_head_date")}
+ {t("LoanHistory.Table_head_position")}
+ {t("LoanHistory.Table_head_action")}
+ {t("LoanHistory.Table_head_expert_description")}
+ {t("LoanHistory.Table_head_file")}
+
+
+
+
+
+ {historyDetails.latest_histories[0].expert.name}
+
+ {moment(historyDetails.latest_histories[0].created_at).locale("fa").format("HH:mm | yyyy/MM/DD")}
+ {historyDetails.latest_histories[0].expert.position}
+ {historyDetails.state_name}
+ {historyDetails.latest_histories[0].expert_description}
+
+ {historyDetails.latest_histories[0].attachments.map(attachment => )}
+
+
+ {historyDetails.latest_histories.map((latest_history, index) => {
+ const _name = historyDetails.latest_histories.length > (index + 1) ? historyDetails.latest_histories[index + 1].expert.name : '-'
+ const _created_at = historyDetails.latest_histories.length > (index + 1) ? moment(historyDetails.latest_histories[index + 1].created_at).locale("fa").format("HH:mm | yyyy/MM/DD") : '-'
+ const _position = historyDetails.latest_histories.length > (index + 1) ? historyDetails.latest_histories[index + 1].expert.position : '-'
+ const _expert_description = historyDetails.latest_histories.length > (index + 1) ? historyDetails.latest_histories[index + 1].expert_description : '-'
+ const _attachments = historyDetails.latest_histories.length > (index + 1) ? historyDetails.latest_histories[index + 1].attachments : []
+ return (
+ {_name}
+ {_created_at}
+ {_position}
+ {latest_history.previous_state_name}
+ {_expert_description}
+
+ {_attachments.map(attachment => )}
+
+ )
+ })}
+
+
+
+ )))}
)
diff --git a/src/components/dashboard/loan-history/Form/HistoryForm/index.jsx b/src/components/dashboard/loan-history/Form/HistoryForm/index.jsx
index de20f60..a7f8eef 100644
--- a/src/components/dashboard/loan-history/Form/HistoryForm/index.jsx
+++ b/src/components/dashboard/loan-history/Form/HistoryForm/index.jsx
@@ -19,7 +19,7 @@ const History = ({rowId, mutate}) => {
-