2019-07-07 11:18:12 +05:30
|
|
|
/* eslint-disable no-new */
|
|
|
|
|
2021-03-11 19:13:27 +05:30
|
|
|
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
|
2019-07-07 11:18:12 +05:30
|
|
|
import { ACTIVE_TAB_SHARED, ACTIVE_TAB_ARCHIVED } from '~/groups/constants';
|
2021-03-11 19:13:27 +05:30
|
|
|
import initInviteMembersBanner from '~/groups/init_invite_members_banner';
|
2021-06-08 01:23:25 +05:30
|
|
|
import initInviteMembersModal from '~/invite_members/init_invite_members_modal';
|
2021-03-11 19:13:27 +05:30
|
|
|
import { getPagePath, getDashPath } from '~/lib/utils/common_utils';
|
|
|
|
import initNotificationsDropdown from '~/notifications';
|
2019-07-07 11:18:12 +05:30
|
|
|
import ProjectsList from '~/projects_list';
|
|
|
|
import GroupTabs from './group_tabs';
|
|
|
|
|
|
|
|
export default function initGroupDetails(actionName = 'show') {
|
|
|
|
const loadableActions = [ACTIVE_TAB_SHARED, ACTIVE_TAB_ARCHIVED];
|
2019-12-21 20:55:43 +05:30
|
|
|
const dashPath = getDashPath();
|
|
|
|
let action = loadableActions.includes(dashPath) ? dashPath : getPagePath(1);
|
2019-07-07 11:18:12 +05:30
|
|
|
if (actionName && action === actionName) {
|
|
|
|
action = 'show'; // 'show' resets GroupTabs to default action through base class
|
|
|
|
}
|
|
|
|
|
|
|
|
new GroupTabs({ parentEl: '.groups-listing', action });
|
|
|
|
new ShortcutsNavigation();
|
2021-03-11 19:13:27 +05:30
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
initNotificationsDropdown();
|
2021-03-11 19:13:27 +05:30
|
|
|
|
2019-07-07 11:18:12 +05:30
|
|
|
new ProjectsList();
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
initInviteMembersBanner();
|
2021-06-08 01:23:25 +05:30
|
|
|
initInviteMembersModal();
|
2019-07-07 11:18:12 +05:30
|
|
|
}
|