|
@@ -13,7 +13,6 @@ import AdminNotificationContainer from '../../../services/AdminNotificationConta
|
|
|
|
|
|
|
|
import { CustomNavTab } from '../../CustomNavigation/CustomNav';
|
|
import { CustomNavTab } from '../../CustomNavigation/CustomNav';
|
|
|
|
|
|
|
|
-import SlackAppConfiguration from './SlackAppConfiguration';
|
|
|
|
|
import UserTriggerNotification from './UserTriggerNotification';
|
|
import UserTriggerNotification from './UserTriggerNotification';
|
|
|
import GlobalNotification from './GlobalNotification';
|
|
import GlobalNotification from './GlobalNotification';
|
|
|
|
|
|
|
@@ -23,8 +22,8 @@ let retrieveErrors = null;
|
|
|
function NotificationSetting(props) {
|
|
function NotificationSetting(props) {
|
|
|
const { adminNotificationContainer } = props;
|
|
const { adminNotificationContainer } = props;
|
|
|
|
|
|
|
|
- const [activeTab, setActiveTab] = useState('slack_configuration');
|
|
|
|
|
- const [activeComponents, setActiveComponents] = useState(new Set(['slack_configuration']));
|
|
|
|
|
|
|
+ const [activeTab, setActiveTab] = useState('user_trigger_notification');
|
|
|
|
|
+ const [activeComponents, setActiveComponents] = useState(new Set(['user_trigger_notification']));
|
|
|
|
|
|
|
|
const switchActiveTab = (selectedTab) => {
|
|
const switchActiveTab = (selectedTab) => {
|
|
|
setActiveTab(selectedTab);
|
|
setActiveTab(selectedTab);
|
|
@@ -52,20 +51,15 @@ function NotificationSetting(props) {
|
|
|
|
|
|
|
|
const navTabMapping = useMemo(() => {
|
|
const navTabMapping = useMemo(() => {
|
|
|
return {
|
|
return {
|
|
|
- slack_configuration: {
|
|
|
|
|
- Icon: () => <i className="icon-settings" />,
|
|
|
|
|
- i18n: 'Slack configuration',
|
|
|
|
|
- index: 0,
|
|
|
|
|
- },
|
|
|
|
|
user_trigger_notification: {
|
|
user_trigger_notification: {
|
|
|
Icon: () => <i className="icon-settings" />,
|
|
Icon: () => <i className="icon-settings" />,
|
|
|
i18n: 'User trigger notification',
|
|
i18n: 'User trigger notification',
|
|
|
- index: 1,
|
|
|
|
|
|
|
+ index: 0,
|
|
|
},
|
|
},
|
|
|
global_notification: {
|
|
global_notification: {
|
|
|
Icon: () => <i className="icon-settings" />,
|
|
Icon: () => <i className="icon-settings" />,
|
|
|
i18n: 'Global notification',
|
|
i18n: 'Global notification',
|
|
|
- index: 2,
|
|
|
|
|
|
|
+ index: 1,
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
}, []);
|
|
}, []);
|
|
@@ -75,9 +69,6 @@ function NotificationSetting(props) {
|
|
|
<CustomNavTab activeTab={activeTab} navTabMapping={navTabMapping} onNavSelected={switchActiveTab} hideBorderBottom />
|
|
<CustomNavTab activeTab={activeTab} navTabMapping={navTabMapping} onNavSelected={switchActiveTab} hideBorderBottom />
|
|
|
|
|
|
|
|
<TabContent activeTab={activeTab} className="p-5">
|
|
<TabContent activeTab={activeTab} className="p-5">
|
|
|
- <TabPane tabId="slack_configuration">
|
|
|
|
|
- {activeComponents.has('slack_configuration') && <SlackAppConfiguration />}
|
|
|
|
|
- </TabPane>
|
|
|
|
|
<TabPane tabId="user_trigger_notification">
|
|
<TabPane tabId="user_trigger_notification">
|
|
|
{activeComponents.has('user_trigger_notification') && <UserTriggerNotification />}
|
|
{activeComponents.has('user_trigger_notification') && <UserTriggerNotification />}
|
|
|
</TabPane>
|
|
</TabPane>
|