zahmis 4 лет назад
Родитель
Сommit
12fcb8067b

+ 3 - 2
src/client/js/components/Admin/SlackIntegration/CustomBotWithoutProxySettings.jsx

@@ -10,7 +10,7 @@ import CustomBotWithoutProxyIntegrationCard from './CustomBotWithoutProxyIntegra
 import DeleteSlackCredentialsModal from './DeleteSlackCredentialsModal';
 
 const CustomBotWithoutProxySettings = (props) => {
-  const { appContainer, isSlackScopeSet, isSetupSlackBot } = props;
+  const { appContainer, isSlackScopeSet } = props;
   const { t } = useTranslation();
 
   const [siteName, setSiteName] = useState('');
@@ -23,7 +23,7 @@ const CustomBotWithoutProxySettings = (props) => {
         slackBotToken: '',
         currentBotType: 'customBotWithoutProxy',
       });
-      // props.onSetIsSetupSlackBot(false);
+      props.onSetIsSlackScopeSet(false);
       props.fetchSlackIntegrationData();
       toastSuccess('success');
     }
@@ -87,6 +87,7 @@ CustomBotWithoutProxySettings.propTypes = {
   isSetupSlackBot: PropTypes.bool,
   slackWSNameInWithoutProxy: PropTypes.string,
   onSetIsSetupSlackBot: PropTypes.func,
+  onSetIsSlackScopeSet: PropTypes.func,
   fetchSlackIntegrationData: PropTypes.func,
 };
 

+ 2 - 2
src/client/js/components/Admin/SlackIntegration/CustomBotWithoutProxySettingsAccordion.jsx

@@ -19,7 +19,7 @@ const CustomBotWithoutProxySettingsAccordion = ({
   appContainer, activeStep, fetchSlackIntegrationData,
   slackSigningSecret, slackSigningSecretEnv, slackBotToken, slackBotTokenEnv,
   isRegisterSlackCredentials, isSendTestMessage,
-  onSetSlackSigningSecret, onSetSlackBotToken, onSetIsSendTestMessage, /*  onSetIsSlackScopeSet, */
+  onSetSlackSigningSecret, onSetSlackBotToken, onSetIsSendTestMessage, onSetIsSlackScopeSet,
 }) => {
   const { t } = useTranslation();
   // TODO: GW-5644 Store default open accordion
@@ -43,7 +43,7 @@ const CustomBotWithoutProxySettingsAccordion = ({
       if (fetchSlackIntegrationData == null) {
         return null;
       }
-      // onSetIsSlackScopeSet(true);
+      onSetIsSlackScopeSet(true);
       fetchSlackIntegrationData();
       toastSuccess(t('toaster.update_successed', { target: t('admin:slack_integration.custom_bot_without_proxy_settings') }));
     }

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

@@ -67,8 +67,7 @@ const SlackIntegration = (props) => {
       setSlackBotTokenEnv(slackBotTokenEnvVars);
       setIsConnectedToSlack(isConnectedToSlack);
       setIsSetupSlackBot(isSetupSlackBot);
-      setIsSlackScopeSet(isSlackScopeSet);
-
+      // setIsSlackScopeSet(isSlackScopeSet);
       fetchSlackWorkSpaceNameInWithoutProxy();
 
       if (isConnectedToSlack) {
@@ -83,7 +82,7 @@ const SlackIntegration = (props) => {
     catch (err) {
       toastError(err);
     }
-  }, [appContainer.apiv3, fetchSlackWorkSpaceNameInWithoutProxy, isSlackScopeSet]);
+  }, [appContainer.apiv3, fetchSlackWorkSpaceNameInWithoutProxy]);
 
 
   useEffect(() => {
@@ -149,7 +148,7 @@ const SlackIntegration = (props) => {
           slackSigningSecret={slackSigningSecret}
           slackWSNameInWithoutProxy={slackWSNameInWithoutProxy}
           onSetIsSetupSlackBot={setIsSetupSlackBot}
-          // onSetIsSlackScopeSet={setIsSlackScopeSet}
+          onSetIsSlackScopeSet={setIsSlackScopeSet}
           onSetSlackSigningSecret={setSlackSigningSecret}
           onSetSlackBotToken={setSlackBotToken}
           onSetIsSendTestMessage={setIsSendTestMessage}