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

+ 0 - 10
src/client/js/components/Admin/SlackIntegration/CustomBotWithoutProxyIntegrationCard.jsx

@@ -23,15 +23,6 @@ const CustomBotWithoutProxyIntegrationCard = (props) => {
       </div>
       </div>
 
 
       <div className="text-center w-25">
       <div className="text-center w-25">
-        {/* {!props.slackSettingsErrors.includes(false) && (
-        <div className="mt-5">
-          <p className="text-success small">
-            <i className="fa fa-check mr-1" />
-            {t('admin:slack_integration.integration_sentence.integration_successful')}
-          </p>
-          <hr className="align-self-center admin-border-success border-success"></hr>
-        </div>
-          )} */}
         {props.slackSettingsErrors.includes(false) ? (
         {props.slackSettingsErrors.includes(false) ? (
           <div className="mt-4">
           <div className="mt-4">
             <small
             <small
@@ -65,7 +56,6 @@ const CustomBotWithoutProxyIntegrationCard = (props) => {
 CustomBotWithoutProxyIntegrationCard.propTypes = {
 CustomBotWithoutProxyIntegrationCard.propTypes = {
   siteName: PropTypes.string.isRequired,
   siteName: PropTypes.string.isRequired,
   slackWSNameInWithoutProxy: PropTypes.string,
   slackWSNameInWithoutProxy: PropTypes.string,
-  // isSlackScopeSet: PropTypes.bool.isRequired,
   slackSettingsErrors: PropTypes.array,
   slackSettingsErrors: PropTypes.array,
 };
 };
 
 

+ 6 - 11
src/client/js/components/Admin/SlackIntegration/CustomBotWithoutProxySettings.jsx

@@ -23,11 +23,11 @@ const CustomBotWithoutProxySettings = (props) => {
     }
     }
   };
   };
 
 
-  // const onSetIsSlackScopeSet = () => {
-  //   if (props.onSetIsSlackScopeSet != null) {
-  //     props.onSetIsSlackScopeSet();
-  //   }
-  // };
+  const onSetIsSlackScopeSet = () => {
+    if (props.onSetIsSlackScopeSet != null) {
+      props.onSetIsSlackScopeSet();
+    }
+  };
 
 
   const deleteSlackCredentialsHandler = async() => {
   const deleteSlackCredentialsHandler = async() => {
     try {
     try {
@@ -37,7 +37,7 @@ const CustomBotWithoutProxySettings = (props) => {
         currentBotType: '',
         currentBotType: '',
       });
       });
       onSetIsSetupSlackBot(false);
       onSetIsSetupSlackBot(false);
-      // onSetIsSlackScopeSet(false);
+      onSetIsSlackScopeSet(false);
       toastSuccess('success');
       toastSuccess('success');
     }
     }
     catch (err) {
     catch (err) {
@@ -58,8 +58,6 @@ const CustomBotWithoutProxySettings = (props) => {
         siteName={siteName}
         siteName={siteName}
         slackWSNameInWithoutProxy={props.slackWSNameInWithoutProxy}
         slackWSNameInWithoutProxy={props.slackWSNameInWithoutProxy}
         slackSettingsErrors={slackSettingsErrors}
         slackSettingsErrors={slackSettingsErrors}
-        // isSlackScopeSet={slackSettingsErrors.isSlackScopeSet}
-        // isSetupSlackBot={slackSettingsErrors.isSetupSlackBot}
       />
       />
 
 
       <h2 className="admin-setting-header">{t('admin:slack_integration.custom_bot_without_proxy_settings')}</h2>
       <h2 className="admin-setting-header">{t('admin:slack_integration.custom_bot_without_proxy_settings')}</h2>
@@ -98,9 +96,6 @@ CustomBotWithoutProxySettings.propTypes = {
   slackBotToken: PropTypes.string,
   slackBotToken: PropTypes.string,
   slackBotTokenEnv: PropTypes.string,
   slackBotTokenEnv: PropTypes.string,
   isRgisterSlackCredentials: PropTypes.bool,
   isRgisterSlackCredentials: PropTypes.bool,
-  // isConnectedToSlack: PropTypes.bool,
-  // isSlackScopeSet: PropTypes.bool,
-  // isSetupSlackBot: PropTypes.bool,
   slackSettingsErrors: PropTypes.array,
   slackSettingsErrors: PropTypes.array,
   slackWSNameInWithoutProxy: PropTypes.string,
   slackWSNameInWithoutProxy: PropTypes.string,
   onSetIsSetupSlackBot: PropTypes.func,
   onSetIsSetupSlackBot: PropTypes.func,

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

@@ -216,7 +216,6 @@ CustomBotWithoutProxySettingsAccordion.propTypes = {
   slackBotTokenEnv: PropTypes.string,
   slackBotTokenEnv: PropTypes.string,
   isRegisterSlackCredentials: PropTypes.bool,
   isRegisterSlackCredentials: PropTypes.bool,
   isSendTestMessage: PropTypes.bool,
   isSendTestMessage: PropTypes.bool,
-  // isConnectedToSlack: PropTypes.bool,
   fetchSlackIntegrationData: PropTypes.func,
   fetchSlackIntegrationData: PropTypes.func,
   onSetSlackSigningSecret: PropTypes.func,
   onSetSlackSigningSecret: PropTypes.func,
   onSetSlackBotToken: PropTypes.func,
   onSetSlackBotToken: PropTypes.func,