Commit ef92eb6b authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'refactor/move-time-tracking-comparison-pane-vue-component' into 'master'

Move TimeTrackingComparisonPane vue component

See merge request gitlab-org/gitlab-ce!17931
parents 3515be7b 5823a191
<script>
import { parseSeconds, stringifyTime } from '../../../lib/utils/pretty_time'; import { parseSeconds, stringifyTime } from '../../../lib/utils/pretty_time';
export default { export default {
name: 'time-tracking-comparison-pane', name: 'TimeTrackingComparisonPane',
props: { props: {
timeSpent: { timeSpent: {
type: Number, type: Number,
...@@ -43,47 +44,50 @@ export default { ...@@ -43,47 +44,50 @@ export default {
return this.timeEstimate >= this.timeSpent ? 'within_estimate' : 'over_estimate'; return this.timeEstimate >= this.timeSpent ? 'within_estimate' : 'over_estimate';
}, },
}, },
template: ` };
<div class="time-tracking-comparison-pane"> </script>
<template>
<div class="time-tracking-comparison-pane">
<div
class="compare-meter"
data-toggle="tooltip"
data-placement="top"
role="timeRemainingDisplay"
:aria-valuenow="timeRemainingTooltip"
:title="timeRemainingTooltip"
:data-original-title="timeRemainingTooltip"
:class="timeRemainingStatusClass"
>
<div <div
class="compare-meter" class="meter-container"
data-toggle="tooltip" role="timeSpentPercent"
data-placement="top" :aria-valuenow="timeRemainingPercent"
role="timeRemainingDisplay"
:aria-valuenow="timeRemainingTooltip"
:title="timeRemainingTooltip"
:data-original-title="timeRemainingTooltip"
:class="timeRemainingStatusClass"
> >
<div <div
class="meter-container" :style="{ width: timeRemainingPercent }"
role="timeSpentPercent" class="meter-fill"
:aria-valuenow="timeRemainingPercent"
> >
<div
:style="{ width: timeRemainingPercent }"
class="meter-fill"
/>
</div> </div>
<div class="compare-display-container"> </div>
<div class="compare-display pull-left"> <div class="compare-display-container">
<span class="compare-label"> <div class="compare-display pull-left">
<span class="compare-label">
{{ s__('TimeTracking|Spent') }} {{ s__('TimeTracking|Spent') }}
</span> </span>
<span class="compare-value spent"> <span class="compare-value spent">
{{ timeSpentHumanReadable }} {{ timeSpentHumanReadable }}
</span> </span>
</div> </div>
<div class="compare-display estimated pull-right"> <div class="compare-display estimated pull-right">
<span class="compare-label"> <span class="compare-label">
{{ s__('TimeTrackingEstimated|Est') }} {{ s__('TimeTrackingEstimated|Est') }}
</span> </span>
<span class="compare-value"> <span class="compare-value">
{{ timeEstimateHumanReadable }} {{ timeEstimateHumanReadable }}
</span> </span>
</div>
</div> </div>
</div> </div>
</div> </div>
`, </div>
}; </template>
...@@ -4,7 +4,7 @@ import TimeTrackingCollapsedState from './collapsed_state.vue'; ...@@ -4,7 +4,7 @@ import TimeTrackingCollapsedState from './collapsed_state.vue';
import timeTrackingSpentOnlyPane from './spent_only_pane'; import timeTrackingSpentOnlyPane from './spent_only_pane';
import timeTrackingNoTrackingPane from './no_tracking_pane'; import timeTrackingNoTrackingPane from './no_tracking_pane';
import timeTrackingEstimateOnlyPane from './estimate_only_pane'; import timeTrackingEstimateOnlyPane from './estimate_only_pane';
import timeTrackingComparisonPane from './comparison_pane'; import TimeTrackingComparisonPane from './comparison_pane.vue';
import eventHub from '../../event_hub'; import eventHub from '../../event_hub';
...@@ -15,7 +15,7 @@ export default { ...@@ -15,7 +15,7 @@ export default {
'time-tracking-estimate-only-pane': timeTrackingEstimateOnlyPane, 'time-tracking-estimate-only-pane': timeTrackingEstimateOnlyPane,
'time-tracking-spent-only-pane': timeTrackingSpentOnlyPane, 'time-tracking-spent-only-pane': timeTrackingSpentOnlyPane,
'time-tracking-no-tracking-pane': timeTrackingNoTrackingPane, 'time-tracking-no-tracking-pane': timeTrackingNoTrackingPane,
'time-tracking-comparison-pane': timeTrackingComparisonPane, TimeTrackingComparisonPane,
'time-tracking-help-state': timeTrackingHelpState, 'time-tracking-help-state': timeTrackingHelpState,
}, },
props: { props: {
......
---
title: Move TimeTrackingComparisonPane vue component
merge_request: 17931
author: George Tsiolis
type: performance
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment