Skip to content

Commit f59b457

Browse files
authored
Merge pull request #712 from citizensadvice/CP-1050-add-bill-accuracy-and-metering-rating
chore/Add bill accuracy and metering rating [CP-1050]
2 parents c89882a + 298b65c commit f59b457

28 files changed

Lines changed: 554 additions & 450 deletions

app/assets/stylesheets/components/_score-summary.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
@include cads-media-breakpoint-up(md) {
3131
display: inline-block;
32-
margin-right: $cads-spacing-7;
32+
margin-right: $cads-spacing-5;
3333
vertical-align: top;
3434
}
3535
}

app/components/csr_table/score_summary_component.html.haml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
%p.score-summary__text
1717
Contact waiting time
1818
= render CsrTable::ScoreComponent.new(score: supplier.contact_rating)
19+
- if Feature.enabled? "FF_NEW_CSR_DATA"
20+
%li.score-summary__item
21+
%p.score-summary__text
22+
Billing and metering
23+
= render CsrTable::ScoreComponent.new(score: supplier.bill_accuracy_and_metering_rating)
1924
%li.score-summary__item
2025
%p.score-summary__text
2126
Customer commitments

app/components/csr_table/supplier_table_component.html.haml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
%th.supplier-table__response{ scope: "col" }
1919
.cads-table__content
2020
Contact waiting time
21+
-if Feature.enabled?("FF_NEW_CSR_DATA")
22+
%th.supplier-table__billing{ scope: "col" }
23+
.cads-table__content
24+
Billing and metering
2125
%th.supplier-table__guarantee{ scope: "col" }
2226
.cads-table__content
2327
Customer commitments

app/components/csr_table/supplier_table_row_component.html.haml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
%td.supplier-table__response
1515
.cads-table__content
1616
= render CsrTable::ScoreComponent.new(score: supplier.contact_rating)
17+
- if Feature.enabled? "FF_NEW_CSR_DATA"
18+
%td.supplier-table__billing
19+
.cads-table__content
20+
= render CsrTable::ScoreComponent.new(score: supplier.bill_accuracy_and_metering_rating)
1721
%td.supplier-table__guarantee
1822
.cads-table__content
1923
= render CsrTable::ScoreComponent.new(score: supplier.guarantee_rating)

app/components/csr_table/unranked_suppliers/stars_summary_component.html.haml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
%p.stars-summary__text
1515
Contact waiting time
1616
= render CsrTable::ScoreComponent.new(score: supplier.contact_rating)
17+
-if Feature.enabled?("FF_NEW_CSR_DATA")
18+
%li.stars-summary__item
19+
%p.stars-summary__text
20+
Billing and metering
21+
= render CsrTable::ScoreComponent.new(score: supplier.bill_accuracy_and_metering_rating)
1722
%li.stars-summary__item
1823
%p.stars-summary__text
1924
Customer commitments

app/controllers/queries/supplier_detail.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ module Queries
3131
guaranteeRating,
3232
overallRating,
3333
dataAvailable,
34+
billAccuracyAndMeteringRating,
3435
guaranteeList {
3536
json
3637
},

app/controllers/queries/suppliers.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module Queries
2727
guaranteeRating,
2828
overallRating,
2929
dataAvailable,
30+
billAccuracyAndMeteringRating,
3031
guaranteeList {
3132
json
3233
},

app/models/supplier.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class Supplier
99
:complaints_number, :contact_email, :contact_rating,
1010
:contact_social_media, :contact_time, :contact_info,
1111
:other_contact_info, :billing_info, :guarantee_rating,
12-
:guarantee_list, :overall_rating, :data_available,
13-
:fuel_mix, :opening_hours, to: :data
12+
:guarantee_list, :overall_rating, :data_available, :fuel_mix,
13+
:opening_hours, :bill_accuracy_and_metering_rating, to: :data
1414

1515
def self.fetch_all
1616
response = Contentful::Graphql::Client.query(Queries::Suppliers)

spec/cassettes/supplier/big-energy-inc-details-page-scotland.yml

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)