diff --git a/app/assets/stylesheets/dashboard.scss b/app/assets/stylesheets/dashboard.scss index ad967f21..ca1d2739 100644 --- a/app/assets/stylesheets/dashboard.scss +++ b/app/assets/stylesheets/dashboard.scss @@ -72,26 +72,14 @@ stroke: $black; } -.harvey-ball--ideal { +.harvey-ball--approval, .harvey-ball--ideal { fill: $purple; } -.harvey-ball--approval { - fill: $purple; -} - -.harvey-ball--growth { - fill: $gold; -} - -.harvey-ball--watch { +.harvey-ball--warning, .harvey-ball--watch, .harvey-ball--growth { fill: $gold; } -.harvey-ball--warning { - fill: $white; -} - .harvey-ball--insufficient_data { stroke: $gray-2; fill: $gray-3; diff --git a/app/presenters/subcategory_card_presenter.rb b/app/presenters/subcategory_card_presenter.rb index b97f39bb..bc7458ba 100644 --- a/app/presenters/subcategory_card_presenter.rb +++ b/app/presenters/subcategory_card_presenter.rb @@ -8,15 +8,7 @@ class SubcategoryCardPresenter end def harvey_ball_icon - icons_by_zone_type = { - ideal: "full-circle", - approval: "three-quarter-circle", - growth: "half-circle", - watch: "one-quarter-circle", - warning: "full-circle", - insufficient_data: "full-circle" - } - icons_by_zone_type[zone.type] + "#{zone.type}-harvey-ball" end def color diff --git a/app/views/dashboard/_quality_framework_indicators.erb b/app/views/dashboard/_quality_framework_indicators.erb index 8d592470..7ddfebb1 100644 --- a/app/views/dashboard/_quality_framework_indicators.erb +++ b/app/views/dashboard/_quality_framework_indicators.erb @@ -1,7 +1,7 @@
<% category_presenters.each do |category_presenter| %>
- +

diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index ed30d2d4..2b8eb21a 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -3,7 +3,8 @@ <% end %> - + + - - + - + - + + + + + + + + + + + @@ -51,19 +63,19 @@
Warning
- + - + - + - + - +
Ideal
diff --git a/spec/presenters/subcategory_card_presenter_spec.rb b/spec/presenters/subcategory_card_presenter_spec.rb index 98867e95..7b27ac42 100644 --- a/spec/presenters/subcategory_card_presenter_spec.rb +++ b/spec/presenters/subcategory_card_presenter_spec.rb @@ -16,7 +16,7 @@ describe SubcategoryCardPresenter do let(:score) { 1 } it 'returns the icon that represents the zone' do - expect(subcategory_card_presenter.harvey_ball_icon).to eq "full-circle" + expect(subcategory_card_presenter.harvey_ball_icon).to eq "warning-harvey-ball" end it 'returns the color class of the zone' do @@ -28,7 +28,7 @@ describe SubcategoryCardPresenter do let(:score) { 2 } it 'returns the icon that represents the zone' do - expect(subcategory_card_presenter.harvey_ball_icon).to eq "one-quarter-circle" + expect(subcategory_card_presenter.harvey_ball_icon).to eq "watch-harvey-ball" end it 'returns the color class of the zone' do @@ -40,7 +40,7 @@ describe SubcategoryCardPresenter do let(:score) { 3 } it 'returns the icon that represents the zone' do - expect(subcategory_card_presenter.harvey_ball_icon).to eq "half-circle" + expect(subcategory_card_presenter.harvey_ball_icon).to eq "growth-harvey-ball" end it 'returns the color class of the zone' do @@ -52,7 +52,7 @@ describe SubcategoryCardPresenter do let(:score) { 4 } it 'returns the icon that represents the zone' do - expect(subcategory_card_presenter.harvey_ball_icon).to eq "three-quarter-circle" + expect(subcategory_card_presenter.harvey_ball_icon).to eq "approval-harvey-ball" end it 'returns the color class of the zone' do @@ -64,7 +64,7 @@ describe SubcategoryCardPresenter do let(:score) { 5 } it 'returns the icon that represents the zone' do - expect(subcategory_card_presenter.harvey_ball_icon).to eq "full-circle" + expect(subcategory_card_presenter.harvey_ball_icon).to eq "ideal-harvey-ball" end it 'returns the color class of the zone' do @@ -76,7 +76,7 @@ describe SubcategoryCardPresenter do let(:score) { 0 } it 'returns the icon that represents the zone' do - expect(subcategory_card_presenter.harvey_ball_icon).to eq "full-circle" + expect(subcategory_card_presenter.harvey_ball_icon).to eq "insufficient_data-harvey-ball" end it 'reports that there is insufficient data' do