Commit d49e2960 authored by Kev's avatar Kev

Replace "magic number" with constant

parent 7431f101
......@@ -5,6 +5,7 @@ import { __, s__ } from '~/locale';
import Tracking from '~/tracking';
import eventHub from '~/sidebar/event_hub';
import tooltip from '~/vue_shared/directives/tooltip';
import { MAX_DISPLAY_WEIGHT } from '../../constants';
export default {
components: {
......@@ -52,6 +53,7 @@ export default {
hasValidInput: true,
shouldShowEditField: false,
collapsedAfterUpdate: false,
maxDisplayWeight: MAX_DISPLAY_WEIGHT,
};
},
computed: {
......@@ -151,7 +153,7 @@ export default {
<gl-loading-icon v-if="fetching" class="js-weight-collapsed-loading-icon" />
<span v-else class="js-weight-collapsed-weight-label">
{{ collapsedWeightLabel
}}<template v-if="weight > 99999"
}}<template v-if="weight > maxDisplayWeight"
>&hellip;</template
>
</span>
......
......@@ -25,3 +25,5 @@ export const healthStatusForRestApi = {
[healthStatus.NEEDS_ATTENTION]: 'needs_attention',
[healthStatus.AT_RISK]: 'at_risk',
};
export const MAX_DISPLAY_WEIGHT = 99999;
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