From 1c5ec9d2a8d81d1d2e0620e598996f602fc00a92 Mon Sep 17 00:00:00 2001 From: Mohammad Jalali Date: Mon, 20 Nov 2023 12:04:07 +0330 Subject: [PATCH 1/2] CFE-18 description added to call history --- public/locales/fa/app.json | 3 ++- .../CallHistory/ListItemOfCalls/Topics/index.jsx | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/public/locales/fa/app.json b/public/locales/fa/app.json index 3224263..1bfe8d3 100644 --- a/public/locales/fa/app.json +++ b/public/locales/fa/app.json @@ -262,7 +262,8 @@ "call_history_not_found": "تاریخچه ای برای تماس دریافتی یافت نشد", "call_history_error_fetching": "خطا در دریافت تاریخچه تماس دریافتی", "show_more": "نمایش موارد بیشتر", - "no_data_exist": "اطلاعاتی موجود نیست" + "no_data_exist": "اطلاعاتی موجود نیست", + "description": "توضیحات" }, "CallAction": { "call_history_of": "عملیات های مربوط به تماس", diff --git a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/Topics/index.jsx b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/Topics/index.jsx index c9be4c0..064c37b 100644 --- a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/Topics/index.jsx +++ b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/Topics/index.jsx @@ -36,6 +36,19 @@ const Topics = ({historyItem}) => { + {historyItem.description ? + + + + {t("CallHistory.description")}: + + + {historyItem.description} + + + + : ""} + ) } From 98e240ae49a5b06ada2757b2e02eecf86e8768a8 Mon Sep 17 00:00:00 2001 From: Mohammad Jalali Date: Mon, 20 Nov 2023 12:17:13 +0330 Subject: [PATCH 2/2] CFE-18 fix test and add desc testing --- .../ListItemOfCalls/Topics/__tests__/index.test.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/Topics/__tests__/index.test.js b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/Topics/__tests__/index.test.js index d9d77e4..6f1c3cb 100644 --- a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/Topics/__tests__/index.test.js +++ b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/Topics/__tests__/index.test.js @@ -6,7 +6,8 @@ describe("Topics Component From call history", () => { describe("Rendering", () => { const historyItem = { category_name: "test category", - subcategory_name: "test sub category" + subcategory_name: "test sub category", + description: "test desc" } it("operator name rendered", () => { render(); @@ -18,5 +19,10 @@ describe("Topics Component From call history", () => { const operatorAnswerDate = screen.queryByText("test sub category"); expect(operatorAnswerDate).toBeInTheDocument(); }); + it("operator description rendered", () => { + render(); + const operatorAnswerDate = screen.queryByText("test desc"); + expect(operatorAnswerDate).toBeInTheDocument(); + }); }); }); \ No newline at end of file