diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/pages/admin/users/index.js | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/pages/admin/users/index.js')
-rw-r--r-- | app/assets/javascripts/pages/admin/users/index.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/pages/admin/users/index.js b/app/assets/javascripts/pages/admin/users/index.js index 75a8284f5f8..b1079c3b068 100644 --- a/app/assets/javascripts/pages/admin/users/index.js +++ b/app/assets/javascripts/pages/admin/users/index.js @@ -1,11 +1,13 @@ import Vue from 'vue'; +import { initAdminUsersApp, initCohortsEmptyState } from '~/admin/users'; +import initTabs from '~/admin/users/tabs'; +import initConfirmModal from '~/confirm_modal'; +import csrf from '~/lib/utils/csrf'; import Translate from '~/vue_shared/translate'; import ModalManager from './components/user_modal_manager.vue'; -import csrf from '~/lib/utils/csrf'; -import initConfirmModal from '~/confirm_modal'; -import initAdminUsersApp from '~/admin/users'; +const CONFIRM_DELETE_BUTTON_SELECTOR = '.js-delete-user-modal-button'; const MODAL_TEXTS_CONTAINER_SELECTOR = '#js-modal-texts'; const MODAL_MANAGER_SELECTOR = '#js-delete-user-modal'; @@ -32,6 +34,8 @@ function loadModalsConfigurationFromHtml(modalsElement) { document.addEventListener('DOMContentLoaded', () => { Vue.use(Translate); + initAdminUsersApp(); + const modalConfiguration = loadModalsConfigurationFromHtml( document.querySelector(MODAL_TEXTS_CONTAINER_SELECTOR), ); @@ -49,6 +53,7 @@ document.addEventListener('DOMContentLoaded', () => { return h(ModalManager, { ref: 'manager', props: { + selector: CONFIRM_DELETE_BUTTON_SELECTOR, modalConfiguration, csrfToken: csrf.token, }, @@ -57,5 +62,6 @@ document.addEventListener('DOMContentLoaded', () => { }); initConfirmModal(); - initAdminUsersApp(); + initCohortsEmptyState(); + initTabs(); }); |