zahmis 4 лет назад
Родитель
Сommit
0b30c339b7

+ 4 - 1
src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx

@@ -27,6 +27,8 @@ const SlackIntegration = (props) => {
   const [isSendTestMessage, setIsSendTestMessage] = useState(false);
   const [slackWSNameInWithoutProxy, setSlackWSNameInWithoutProxy] = useState(null);
   const [isDeleteConfirmModalShown, setIsDeleteConfirmModalShown] = useState(false);
+  const [isResetAll, setIsResetAll] = useState(false);
+
 
   const fetchSlackIntegrationData = useCallback(async() => {
     try {
@@ -54,6 +56,7 @@ const SlackIntegration = (props) => {
   const resetAllSettings = async() => {
     try {
       await appContainer.apiv3.delete('/slack-integration-settings/bot-type');
+      setIsResetAll(true);
       fetchSlackIntegrationData();
       toastSuccess(t('admin:slack_integration.bot_all_reset_successful'));
     }
@@ -149,7 +152,7 @@ const SlackIntegration = (props) => {
       />
 
       <DeleteSlackBotSettingsModal
-        isResetAll={false}
+        isResetAll={isResetAll}
         isOpen={isDeleteConfirmModalShown}
         onClose={() => setIsDeleteConfirmModalShown(false)}
         onClickDeleteButton={resetAllSettings}