24 lines
578 B
JavaScript
24 lines
578 B
JavaScript
import Vue from 'vue';
|
|
import { mapActions } from 'vuex';
|
|
import store from '~/mr_notes/stores';
|
|
import ReviewBar from './components/review_bar.vue';
|
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
export const initReviewBar = () => {
|
|
const el = document.getElementById('js-review-bar');
|
|
|
|
// eslint-disable-next-line no-new
|
|
new Vue({
|
|
el,
|
|
store,
|
|
mounted() {
|
|
this.fetchDrafts();
|
|
},
|
|
methods: {
|
|
...mapActions('batchComments', ['fetchDrafts']),
|
|
},
|
|
render(createElement) {
|
|
return createElement(ReviewBar);
|
|
},
|
|
});
|
|
};
|