diff options
Diffstat (limited to 'app/assets/javascripts/pages/admin/jobs/index/index.js')
-rw-r--r-- | app/assets/javascripts/pages/admin/jobs/index/index.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/pages/admin/jobs/index/index.js b/app/assets/javascripts/pages/admin/jobs/index/index.js index 4cd312b403c..c82b186f671 100644 --- a/app/assets/javascripts/pages/admin/jobs/index/index.js +++ b/app/assets/javascripts/pages/admin/jobs/index/index.js @@ -1,29 +1,29 @@ import Vue from 'vue'; import { BV_SHOW_MODAL } from '~/lib/utils/constants'; import Translate from '~/vue_shared/translate'; +import { STOP_JOBS_MODAL_ID } from './components/constants'; import StopJobsModal from './components/stop_jobs_modal.vue'; Vue.use(Translate); function initJobs() { const buttonId = 'js-stop-jobs-button'; - const modalId = 'stop-jobs-modal'; const stopJobsButton = document.getElementById(buttonId); if (stopJobsButton) { // eslint-disable-next-line no-new new Vue({ - el: `#js-${modalId}`, + el: `#js-${STOP_JOBS_MODAL_ID}`, components: { StopJobsModal, }, mounted() { stopJobsButton.classList.remove('disabled'); stopJobsButton.addEventListener('click', () => { - this.$root.$emit(BV_SHOW_MODAL, modalId, `#${buttonId}`); + this.$root.$emit(BV_SHOW_MODAL, STOP_JOBS_MODAL_ID, `#${buttonId}`); }); }, render(createElement) { - return createElement(modalId, { + return createElement(STOP_JOBS_MODAL_ID, { props: { url: stopJobsButton.dataset.url, }, |