diff --git a/public/locales/fa/app.json b/public/locales/fa/app.json index 21776ae..3224263 100644 --- a/public/locales/fa/app.json +++ b/public/locales/fa/app.json @@ -261,7 +261,8 @@ "call_history_of": "تاریخچه تماس های", "call_history_not_found": "تاریخچه ای برای تماس دریافتی یافت نشد", "call_history_error_fetching": "خطا در دریافت تاریخچه تماس دریافتی", - "show_more": "نمایش موارد بیشتر" + "show_more": "نمایش موارد بیشتر", + "no_data_exist": "اطلاعاتی موجود نیست" }, "CallAction": { "call_history_of": "عملیات های مربوط به تماس", diff --git a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/PreviousOperatorData/index.jsx b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/PreviousOperatorData/index.jsx index afd2ad7..357c6e8 100644 --- a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/PreviousOperatorData/index.jsx +++ b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls/PreviousOperatorData/index.jsx @@ -1,8 +1,11 @@ import {useTranslations} from "next-intl"; import {Avatar, Box, ListItem, ListItemAvatar, ListItemText, Typography} from "@mui/material"; import HeadsetMicIcon from '@mui/icons-material/HeadsetMic'; +import useLanguage from "@/lib/app/hooks/useLanguage"; +import moment from "jalali-moment"; const PreviousOperatorData = ({historyItem}) => { + const {languageApp} = useLanguage() const t = useTranslations(); return ( @@ -14,13 +17,13 @@ const PreviousOperatorData = ({historyItem}) => { - {historyItem.operator_name} + {historyItem.operator_full_name} ({t("CallHistory.operator")}) - } secondary={historyItem.answer_date}/> + } secondary={moment(historyItem.created_at).locale(languageApp).format("HH:mm:ss | YYYY/MM/DD")}/> ) } 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 3b57744..c9be4c0 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 @@ -12,7 +12,7 @@ const Topics = ({historyItem}) => { {t("CallHistory.category_name")}: - {historyItem.category_name} + {historyItem.category_name || t("CallHistory.no_data_exist")} @@ -31,7 +31,7 @@ const Topics = ({historyItem}) => { textAlign: "end", color: "#837e7e" }}> - {historyItem.subcategory_name} + {historyItem.subcategory_name || t("CallHistory.no_data_exist")} diff --git a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/index.jsx b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/index.jsx index 9d61cce..1ac6e1e 100644 --- a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/index.jsx +++ b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/index.jsx @@ -6,7 +6,7 @@ import HistoryHeader from "./HistoryHeader"; import ErrorOrEmpty from "./ErrorOrEmpty"; import useCallerHistory from "@/lib/callWidget/hooks/useCallerHistory"; import ListItemOfCalls from "./ListItemOfCalls"; -import {useState} from "react"; +import {Fragment, useState} from "react"; const max_size = 10; const CallHistory = ({tab}) => { @@ -40,7 +40,7 @@ const CallHistory = ({tab}) => { } onClick={() => setShowRestOfHistory(true)} - label={t("show_more")} + label={t("CallHistory.show_more")} disabled={showRestOfHistory} /> @@ -48,10 +48,10 @@ const CallHistory = ({tab}) => { {showRestOfHistory && ( <> {historyList.map((historyItem, index) => ( - <> + - + ))} ) }