debian-mirror-gitlab/app/assets/javascripts/sidebar/mount_milestone_sidebar.js
2018-03-27 19:54:05 +05:30

27 lines
731 B
JavaScript

import Vue from 'vue';
import timeTracker from './components/time_tracking/time_tracker.vue';
export default class SidebarMilestone {
constructor() {
const el = document.getElementById('issuable-time-tracker');
if (!el) return;
// eslint-disable-next-line no-new
new Vue({
el,
components: {
timeTracker,
},
render: createElement => createElement('timeTracker', {
props: {
time_estimate: parseInt(el.dataset.timeEstimate, 10),
time_spent: parseInt(el.dataset.timeSpent, 10),
human_time_estimate: el.dataset.humanTimeEstimate,
human_time_spent: el.dataset.humanTimeSpent,
rootPath: '/',
},
}),
});
}
}