From 49c24de47385c4e3e58585163c918f201decfa54 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Tue, 31 Oct 2023 12:02:02 +0330 Subject: [PATCH] CFE-8 Fixed scroll actions in call widget --- .../CallTabPanel/CallActions/index.jsx | 35 +++++++++++-------- .../CallTabPanel/CallHistory/index.jsx | 2 +- .../CallTabs/CallTabPanel/index.jsx | 2 +- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallActions/index.jsx b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallActions/index.jsx index f5c76b0..082d701 100644 --- a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallActions/index.jsx +++ b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/CallActions/index.jsx @@ -2,15 +2,16 @@ import CallActionsCategories from "./CallActionCategories"; import CallActionsSubcategories from "./CallActionSubcategories"; import ActionHeader from "./ActionHeader"; import CallActionDescription from "./CallActionDescription"; -import { CALL_ACTION } from "@/core/data/apiRoutes"; +import {CALL_ACTION} from "@/core/data/apiRoutes"; import useRequest from "@/lib/app/hooks/useRequest"; import useAnswers from "@/lib/callWidget/hooks/useAnswers"; -import { useState } from "react"; +import {useState} from "react"; +import {Stack} from "@mui/material"; -function CallActions({ tab }) { +function CallActions({tab}) { const [description, setDescription] = useState('') - const requestServer = useRequest({ auth: true }); - const { closeAnswerTab } = useAnswers(); + const requestServer = useRequest({auth: true}); + const {closeAnswerTab} = useAnswers(); const handleSubcategoryButton = (category_id, subcategory_id) => { requestServer(`${CALL_ACTION}/${tab.id}`, "post", { @@ -20,23 +21,29 @@ function CallActions({ tab }) { description }, success: { - notification: { show: false }, + notification: {show: false}, }, }) .then(() => { closeAnswerTab(tab.id); }) - .catch(() => {}); + .catch(() => { + }); }; - + return ( - <> - - - - - + + + + + + + + ); } 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 c83bc49..1e940cb 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 @@ -25,7 +25,7 @@ const CallHistory = ({tab}) => { overflow: "hidden" }}> - + {errorHistoryList ? ( ) : isLoadingHistoryList ? ( diff --git a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/index.jsx b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/index.jsx index 8fc1d87..be7e9d2 100644 --- a/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/index.jsx +++ b/src/components/layouts/Dashboard/CallWidget/CallWidgetDialog/CallTabs/CallTabPanel/index.jsx @@ -7,7 +7,7 @@ const CallTabPanel = ({tab}) => { - +