From c23915306c3af2226bb094d8233f1625fb73c28e Mon Sep 17 00:00:00 2001 From: Matthew Griffin Date: Tue, 18 Jun 2024 15:32:49 +0100 Subject: [PATCH 1/4] Add disclaimer component to main view --- src/app/disclaimer/disclaimer.component.html | 15 +++++++++++++ .../disclaimer/disclaimer.component.spec.ts | 22 +++++++++++++++++++ src/app/disclaimer/disclaimer.component.ts | 10 +++++++++ .../tech-carbon-estimator.component.html | 1 + .../tech-carbon-estimator.component.ts | 2 ++ 5 files changed, 50 insertions(+) create mode 100644 src/app/disclaimer/disclaimer.component.html create mode 100644 src/app/disclaimer/disclaimer.component.spec.ts create mode 100644 src/app/disclaimer/disclaimer.component.ts diff --git a/src/app/disclaimer/disclaimer.component.html b/src/app/disclaimer/disclaimer.component.html new file mode 100644 index 00000000..b52c2dd6 --- /dev/null +++ b/src/app/disclaimer/disclaimer.component.html @@ -0,0 +1,15 @@ + +
+

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..81e670b8 100644 --- a/src/app/tech-carbon-estimator/tech-carbon-estimator.component.html +++ b/src/app/tech-carbon-estimator/tech-carbon-estimator.component.html @@ -19,6 +19,7 @@

Technology Carbon Estimator

#estimations class="tce-w-full md:tce-w-1/2 tce-flex tce-flex-col tce-h-dvh md:tce-h-fit tce-py-4 md:tce-py-0 md:tce-pl-4 md:tce-sticky md:tce-top-0"> + @if (!showAssumptionsAndLimitationView) {