debian-mirror-gitlab/app/assets/javascripts/sidebar/mount_milestone_sidebar.js

31 lines
758 B
JavaScript
Raw Normal View History

2018-03-27 19:54:05 +05:30
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;
2018-12-05 23:21:45 +05:30
const { timeEstimate, timeSpent, humanTimeEstimate, humanTimeSpent } = el.dataset;
2018-03-27 19:54:05 +05:30
// eslint-disable-next-line no-new
new Vue({
el,
components: {
timeTracker,
},
2018-12-13 13:39:08 +05:30
render: createElement =>
createElement('timeTracker', {
props: {
timeEstimate: parseInt(timeEstimate, 10),
timeSpent: parseInt(timeSpent, 10),
humanTimeEstimate,
humanTimeSpent,
rootPath: '/',
},
}),
2018-03-27 19:54:05 +05:30
});
}
}