Skip to content
Snippets Groups Projects
Commit 5bdfcaa1 authored by Brandon Labuschagne's avatar Brandon Labuschagne Committed by Aakriti Gupta
Browse files

Ensure that summary items remain aligned

Default number of items is 3. If this is not the case,
then increase the column width of the summary items
to cater for 2 items plus the date filter.
parent 9d3adee8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -63,10 +63,16 @@ export default () => {
service: this.createCycleAnalyticsService(cycleAnalyticsEl.dataset.requestPath),
};
},
defaultNumberOfSummaryItems: 3,
computed: {
currentStage() {
return this.store.currentActiveStage();
},
summaryTableColumnClass() {
return this.state.summary.length === this.$options.defaultNumberOfSummaryItems
? 'col-sm-3'
: 'col-sm-4';
},
},
created() {
// Conditional check placed here to prevent this method from being called on the
Loading
Loading
Loading
Loading
@@ -13,10 +13,10 @@
.content-block
.container-fluid
.row
.col-sm-3.col-12.column{ "v-for" => "item in state.summary" }
.col-12.column{ "v-for" => "item in state.summary", ":class" => "summaryTableColumnClass" }
%h3.header {{ item.value }}
%p.text {{ item.title }}
.col-sm-3.col-12.column
.col-12.column{ ":class" => "summaryTableColumnClass" }
.dropdown.inline.js-ca-dropdown
%button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" }
%span.dropdown-label {{ n__('Last %d day', 'Last %d days', 30) }}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment