diff options
Diffstat (limited to 'app/assets/javascripts/issues/index.js')
-rw-r--r-- | app/assets/javascripts/issues/index.js | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/app/assets/javascripts/issues/index.js b/app/assets/javascripts/issues/index.js index eec7c6bf842..3bd28c50800 100644 --- a/app/assets/javascripts/issues/index.js +++ b/app/assets/javascripts/issues/index.js @@ -3,21 +3,20 @@ import IssuableForm from 'ee_else_ce/issuable/issuable_form'; import IssuableLabelSelector from '~/issuable/issuable_label_selector'; import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable'; import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation'; -import { initIssuableHeaderWarnings, initIssuableSidebar } from '~/issuable'; -import { TYPE_INCIDENT } from '~/issues/constants'; +import { initIssuableSidebar } from '~/issuable'; import Issue from '~/issues/issue'; import { initTitleSuggestions, initTypePopover, initTypeSelect } from '~/issues/new'; import { initRelatedMergeRequests } from '~/issues/related_merge_requests'; import { initRelatedIssues } from '~/related_issues'; -import { initIncidentApp, initIssueApp, initSentryErrorStackTrace } from '~/issues/show'; -import { parseIssuableData } from '~/issues/show/utils/parse_data'; +import { initIssuableApp, initSentryErrorStackTrace } from '~/issues/show'; import LabelsSelect from '~/labels/labels_select'; import initNotesApp from '~/notes'; import { store } from '~/notes/stores'; import { mountMilestoneDropdown } from '~/sidebar/mount_sidebar'; +import initSidebarBundle from '~/sidebar/sidebar_bundle'; +import initWorkItemLinks from '~/work_items/components/work_item_links'; import ZenMode from '~/zen_mode'; import initAwardsApp from '~/emoji/awards_app'; -import initLinkedResources from '~/linked_resources'; import FilteredSearchServiceDesk from './filtered_search_service_desk'; export function initFilteredSearchServiceDesk() { @@ -42,33 +41,20 @@ export function initForm() { mountMilestoneDropdown(); } -export function initShow({ notesParams } = {}) { - const el = document.getElementById('js-issuable-app'); - - if (!el) { - return; - } - - const { issueType, ...issuableData } = parseIssuableData(el); - - if (issueType === TYPE_INCIDENT) { - initIncidentApp({ ...issuableData, issuableId: el.dataset.issuableId }, store); - initLinkedResources(); - initRelatedIssues(TYPE_INCIDENT); - } else { - initIssueApp(issuableData, store); - } - +export function initShow() { new Issue(); // eslint-disable-line no-new new ShortcutsIssuable(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new - initIssuableHeaderWarnings(store); + + initAwardsApp(document.getElementById('js-vue-awards-block')); + initIssuableApp(store); initIssuableSidebar(); - initNotesApp(notesParams); + initNotesApp(); + initRelatedIssues(); initRelatedMergeRequests(); initSentryErrorStackTrace(); - - initAwardsApp(document.getElementById('js-vue-awards-block')); + initSidebarBundle(store); + initWorkItemLinks(); import(/* webpackChunkName: 'design_management' */ '~/design_management') .then((module) => module.default()) |