CFE-1 working on call history of callers and base design completed
This commit is contained in:
@@ -250,5 +250,13 @@
|
|||||||
"delete_tooltip": "حذف",
|
"delete_tooltip": "حذف",
|
||||||
"update_tooltip": "ویرایش",
|
"update_tooltip": "ویرایش",
|
||||||
"update_expert": "ویرایش کارشناس"
|
"update_expert": "ویرایش کارشناس"
|
||||||
|
},
|
||||||
|
"CallHistory": {
|
||||||
|
"topic": "موضوع",
|
||||||
|
"sub_topic": "زیر موضوع",
|
||||||
|
"operator": "اپراتور",
|
||||||
|
"date": "تاریخ",
|
||||||
|
"call_history_of": "تاریخچه تماس های",
|
||||||
|
"call_history_not_found": "تاریخچه ای برای این تماس یافت نشد"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import {useTranslations} from "next-intl";
|
||||||
|
import {Avatar, Box, ListItem, ListItemAvatar, ListItemText, Typography} from "@mui/material";
|
||||||
|
import HeadsetMicIcon from '@mui/icons-material/HeadsetMic';
|
||||||
|
|
||||||
|
const PreviusOperatorData = ({tab}) => {
|
||||||
|
const t = useTranslations();
|
||||||
|
return (
|
||||||
|
<ListItem>
|
||||||
|
<ListItemAvatar>
|
||||||
|
<Avatar sx={{backgroundColor: "primary.light"}}>
|
||||||
|
<HeadsetMicIcon/>
|
||||||
|
</Avatar>
|
||||||
|
</ListItemAvatar>
|
||||||
|
<ListItemText primary={
|
||||||
|
<Box sx={{display: "flex", alignItems: "end"}}>
|
||||||
|
<Typography sx={{marginRight: 1, color: "#545151"}}>
|
||||||
|
اشکان خطیبی
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="caption" sx={{color: "secondary.main"}}>
|
||||||
|
({t("CallHistory.operator")})
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
} secondary="1379/02/03 13:50"/>
|
||||||
|
</ListItem>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PreviusOperatorData
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import {useTranslations} from "next-intl";
|
||||||
|
import {Box, List, ListItem, Typography} from "@mui/material";
|
||||||
|
|
||||||
|
const Topics = ({tab}) => {
|
||||||
|
const t = useTranslations();
|
||||||
|
return (
|
||||||
|
<Box timeout="auto" unmountOnExit>
|
||||||
|
<List component="div" disablePadding>
|
||||||
|
<ListItem sx={{px: 4}}>
|
||||||
|
<Box sx={{width: "100%", display: "flex", justifyContent: "space-between"}}>
|
||||||
|
<Typography variant="subtitle2" sx={{color: "#837e7e"}}>
|
||||||
|
{t("CallHistory.topic")}:
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="subtitle2" sx={{color: "#837e7e"}}>
|
||||||
|
موضوع تست
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
<List component="div" disablePadding>
|
||||||
|
<ListItem sx={{px: 4}}>
|
||||||
|
<Box sx={{width: "100%", display: "flex", justifyContent: "space-between"}}>
|
||||||
|
<Typography variant="subtitle2" sx={{color: "#837e7e"}}>
|
||||||
|
{t("CallHistory.sub_topic")}:
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="subtitle2" sx={{
|
||||||
|
width: "200px",
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
overflow: 'hidden',
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textAlign: "end",
|
||||||
|
color: "#837e7e"
|
||||||
|
}}>
|
||||||
|
زیر موضوع تست با متن طولانی تر از موضوع
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
</Box>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Topics
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import {useTranslations} from "next-intl";
|
||||||
|
import {Divider, List} from "@mui/material";
|
||||||
|
import PreviusOperatorData from "./PreviusOperatorData";
|
||||||
|
import Topics from "./Topics";
|
||||||
|
|
||||||
|
const ListItemOfCalls = ({tab}) => {
|
||||||
|
const t = useTranslations();
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<List sx={{width: '100%', bgcolor: 'rgba(222,234,215,0.11)'}}>
|
||||||
|
<PreviusOperatorData/>
|
||||||
|
<Topics/>
|
||||||
|
</List>
|
||||||
|
<Divider/>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ListItemOfCalls
|
||||||
@@ -1,6 +1,45 @@
|
|||||||
|
import {useTranslations} from "next-intl";
|
||||||
|
import {Box, Typography} from "@mui/material";
|
||||||
|
import ListItemOfCalls
|
||||||
|
from "@/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory/ListItemOfCalls";
|
||||||
|
|
||||||
const CallHistory = ({tab}) => {
|
const CallHistory = ({tab}) => {
|
||||||
|
const t = useTranslations();
|
||||||
return (
|
return (
|
||||||
<>CallHistory - {tab.id}</>
|
<>
|
||||||
|
<Box sx={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "end",
|
||||||
|
justifyContent: "center",
|
||||||
|
py: 2,
|
||||||
|
backgroundColor: "primary.main",
|
||||||
|
overflow: "hidden"
|
||||||
|
}}>
|
||||||
|
<Typography variant="subtitle1" sx={{marginRight: 1, color: "#fff"}}>
|
||||||
|
.... {t("CallHistory.call_history_of")}:
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="subtitle1" sx={{color: "#fff"}}>
|
||||||
|
{tab.phone_number} ....
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
<Box sx={{height: "100%", overflow: "scroll"}}>
|
||||||
|
<ListItemOfCalls tab={tab}/>
|
||||||
|
<ListItemOfCalls tab={tab}/>
|
||||||
|
<ListItemOfCalls tab={tab}/>
|
||||||
|
<ListItemOfCalls tab={tab}/>
|
||||||
|
<ListItemOfCalls tab={tab}/>
|
||||||
|
<ListItemOfCalls tab={tab}/>
|
||||||
|
<ListItemOfCalls tab={tab}/>
|
||||||
|
{/*<Typography variant="subtitle1"*/}
|
||||||
|
{/* sx={{*/}
|
||||||
|
{/* color: "#837e7e",*/}
|
||||||
|
{/* textAlign: "center",*/}
|
||||||
|
{/* mt: "50%"*/}
|
||||||
|
{/* }}>*/}
|
||||||
|
{/* {t("CallHistory.call_history_not_found")}*/}
|
||||||
|
{/*</Typography>*/}
|
||||||
|
</Box>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,19 @@
|
|||||||
import {Grid} from "@mui/material";
|
import {Divider, Grid} from "@mui/material";
|
||||||
import CallActions from "@/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallActions";
|
import CallActions from "@/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallActions";
|
||||||
import CallHistory from "@/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory";
|
import CallHistory from "@/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallHistory";
|
||||||
|
|
||||||
const CallTabPanel = ({tab}) => {
|
const CallTabPanel = ({tab}) => {
|
||||||
return (
|
return (
|
||||||
<Grid container columns={{xs: 3}} sx={{display: !tab.active && 'none'}} role="tabpanel"
|
<Grid container columns={{xs: 3}} sx={{display: !tab.active && 'none', height: '100%', overflow: "hidden"}}
|
||||||
|
role="tabpanel"
|
||||||
id={`answer-tabpanel-${tab.id}`} aria-labelledby={`answer-tab-${tab.id}`}>
|
id={`answer-tabpanel-${tab.id}`} aria-labelledby={`answer-tab-${tab.id}`}>
|
||||||
<Grid item xs={2}>
|
<Grid item xs={2}>
|
||||||
<CallActions tab={tab}/>
|
<CallActions tab={tab}/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={1}>
|
<Grid item>
|
||||||
|
<Divider orientation="vertical"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs sx={{height: "100%", overflow: "scroll"}}>
|
||||||
<CallHistory tab={tab}/>
|
<CallHistory tab={tab}/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -17,7 +17,11 @@ export const AnswersContext = createContext()
|
|||||||
export const AnswersProvider = ({children}) => {
|
export const AnswersProvider = ({children}) => {
|
||||||
const [openCallDialog, setOpenCallDialog] = useState(false)
|
const [openCallDialog, setOpenCallDialog] = useState(false)
|
||||||
const [activeTab, setActiveTab] = useState(0)
|
const [activeTab, setActiveTab] = useState(0)
|
||||||
const [state, dispatch] = useReducer(reducer, []);
|
const [state, dispatch] = useReducer(reducer, [{
|
||||||
|
id: 2,
|
||||||
|
phone_number: "09036949387",
|
||||||
|
active: true
|
||||||
|
}]);
|
||||||
|
|
||||||
return <AnswersContext.Provider
|
return <AnswersContext.Provider
|
||||||
value={{
|
value={{
|
||||||
|
|||||||
Reference in New Issue
Block a user