diff --git a/docs/components.md b/docs/components.md index 20cf781b..1b0b9244 100644 --- a/docs/components.md +++ b/docs/components.md @@ -15,6 +15,8 @@ flowchart TB assumptions-and-limitation`"] Note["`NoteComponent note`"] + Disclaimer["`DisclaimerComponent + disclaimer`"] ExpansionPanel["`ExpansionPanelComponent expansion-panel`"] end @@ -26,11 +28,11 @@ flowchart TB FormatCostRangePipe end - CarbonEstimator --> CarbonEstimatorForm & CarbonEstimation & Assumptions + CarbonEstimator --> CarbonEstimatorForm & CarbonEstimation & Assumptions & Disclaimer CarbonEstimatorForm ---> FormatCostRangePipe CarbonEstimatorForm --> Note CarbonEstimator & CarbonEstimatorForm ---> CarbonEstimationService - CarbonEstimatorForm & CarbonEstimation --> ExpansionPanel + CarbonEstimatorForm & CarbonEstimation & Disclaimer --> ExpansionPanel CarbonEstimationService & Assumptions --> CarbonIntensityService ``` @@ -59,6 +61,10 @@ Uses the [CarbonIntensityService](services.md#carbonintensityservice) to get the Highlights assumptions that will be made when certain options are selected. +## DisclaimerComponent + +Displays disclaimer about how the tool should be used. + ## ExpansionPanelComponent Displays explanatory text that can be hidden if desired. diff --git a/src/app/disclaimer/disclaimer.component.html b/src/app/disclaimer/disclaimer.component.html new file mode 100644 index 00000000..638ade9e --- /dev/null +++ b/src/app/disclaimer/disclaimer.component.html @@ -0,0 +1,18 @@ + +
+

Disclaimer

+
+
+

+ This tool is provided free of charge to assist you in identifying and measuring your carbon footprint, for + information and guidance only. The scores and information provided should not be used for carbon reporting and are + made available on an “as is” basis. Scott Logic Limited accepts no liability or responsibility for any use made by + any person or organisation of the information or calculations available on this website. Any reliance placed on + this website is taken at your own risk. You should read our full website + terms and conditions + before using this site. +

+
+
diff --git a/src/app/disclaimer/disclaimer.component.spec.ts b/src/app/disclaimer/disclaimer.component.spec.ts new file mode 100644 index 00000000..2bcf93ff --- /dev/null +++ b/src/app/disclaimer/disclaimer.component.spec.ts @@ -0,0 +1,22 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DisclaimerComponent } from './disclaimer.component'; + +describe('DisclaimerComponent', () => { + let component: DisclaimerComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [DisclaimerComponent], + }).compileComponents(); + + fixture = TestBed.createComponent(DisclaimerComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/disclaimer/disclaimer.component.ts b/src/app/disclaimer/disclaimer.component.ts new file mode 100644 index 00000000..a41bd658 --- /dev/null +++ b/src/app/disclaimer/disclaimer.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; +import { ExpansionPanelComponent } from '../expansion-panel/expansion-panel.component'; + +@Component({ + selector: 'disclaimer', + standalone: true, + imports: [ExpansionPanelComponent], + templateUrl: './disclaimer.component.html', +}) +export class DisclaimerComponent {} diff --git a/src/app/tech-carbon-estimator/tech-carbon-estimator.component.html b/src/app/tech-carbon-estimator/tech-carbon-estimator.component.html index d800762a..6da03542 100644 --- a/src/app/tech-carbon-estimator/tech-carbon-estimator.component.html +++ b/src/app/tech-carbon-estimator/tech-carbon-estimator.component.html @@ -1,19 +1,20 @@

Technology Carbon Estimator

- @if (showAssumptionsAndLimitationView) { - - } @else { - - } +
+ + @if (showAssumptionsAndLimitationView) { + + } @else { + + } +
@if (showEstimation) {