2023-05-03 19:39:10 +08:00
|
|
|
import TurbolinksAdapter from 'vue-turbolinks';
|
|
|
|
import Vue from 'vue/dist/vue.esm';
|
|
|
|
import AssignItemsToTaskModalContainer from '../../vue/assign_items_to_tasks_modal/container.vue';
|
2023-06-06 21:31:40 +08:00
|
|
|
import PerfectScrollbar from 'vue2-perfect-scrollbar';
|
|
|
|
import 'vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css';
|
2023-05-03 19:39:10 +08:00
|
|
|
|
|
|
|
Vue.use(TurbolinksAdapter);
|
2023-06-06 21:31:40 +08:00
|
|
|
Vue.use(PerfectScrollbar);
|
2023-05-03 19:39:10 +08:00
|
|
|
Vue.prototype.i18n = window.I18n;
|
|
|
|
|
|
|
|
function initAssignItemsToTaskModalComponent() {
|
|
|
|
const container = $('.assign-items-to-task-modal-container');
|
|
|
|
if (container.length) {
|
2023-05-05 16:31:35 +08:00
|
|
|
window.AssignItemsToTaskModalComponentContainer = new Vue({
|
2023-05-03 19:39:10 +08:00
|
|
|
el: '.assign-items-to-task-modal-container',
|
|
|
|
name: 'AssignItemsToTaskModalComponent',
|
|
|
|
components: {
|
|
|
|
'assign-items-to-task-modal-container': AssignItemsToTaskModalContainer
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
visibility: false,
|
|
|
|
urls: {
|
|
|
|
assign: container.data('assign-url'),
|
|
|
|
projects: container.data('projects-url'),
|
|
|
|
experiments: container.data('experiments-url'),
|
2023-05-08 15:57:31 +08:00
|
|
|
tasks: container.data('tasks-url')
|
2023-05-03 19:39:10 +08:00
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
2023-05-17 22:11:27 +08:00
|
|
|
showModal() {
|
|
|
|
this.visibility = true;
|
|
|
|
},
|
2023-05-03 19:39:10 +08:00
|
|
|
closeModal() {
|
|
|
|
this.visibility = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
initAssignItemsToTaskModalComponent();
|