mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
45 lines
1.4 KiB
JavaScript
45 lines
1.4 KiB
JavaScript
import TurbolinksAdapter from 'vue-turbolinks';
|
|
import Vue from 'vue/dist/vue.esm';
|
|
import AssignItemsToTaskModalContainer from '../../vue/assign_items_to_tasks_modal/container.vue';
|
|
import PerfectScrollbar from 'vue2-perfect-scrollbar';
|
|
import 'vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css';
|
|
|
|
Vue.use(TurbolinksAdapter);
|
|
Vue.use(PerfectScrollbar);
|
|
Vue.prototype.i18n = window.I18n;
|
|
|
|
function initAssignItemsToTaskModalComponent() {
|
|
const container = $('.assign-items-to-task-modal-container');
|
|
if (container.length) {
|
|
window.AssignItemsToTaskModalComponentContainer = new Vue({
|
|
el: '.assign-items-to-task-modal-container',
|
|
name: 'AssignItemsToTaskModalComponent',
|
|
components: {
|
|
'assign-items-to-task-modal-container': AssignItemsToTaskModalContainer
|
|
},
|
|
data() {
|
|
return {
|
|
visibility: false,
|
|
rowsToAssign: [],
|
|
urls: {
|
|
assign: container.data('assign-url'),
|
|
projects: container.data('projects-url'),
|
|
experiments: container.data('experiments-url'),
|
|
tasks: container.data('tasks-url')
|
|
}
|
|
};
|
|
},
|
|
methods: {
|
|
showModal(repositoryRows) {
|
|
this.rowsToAssign = repositoryRows;
|
|
this.visibility = true;
|
|
},
|
|
closeModal() {
|
|
this.visibility = false;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
initAssignItemsToTaskModalComponent();
|