From 19452a208d1c3e9018cc23ead02ec1c652616a76 Mon Sep 17 00:00:00 2001 From: Gulfaraz Rahman Date: Wed, 14 Aug 2024 16:13:49 +0200 Subject: [PATCH] feat: add disclaimer to indicate approximate numbers --- .../disclaimer-approximate.component.html | 8 +++++++ .../disclaimer-approximate.component.scss | 8 +++++++ .../disclaimer-approximate.component.spec.ts | 22 +++++++++++++++++++ .../disclaimer-approximate.component.ts | 8 +++++++ .../app/pages/dashboard/dashboard.page.html | 7 +++++- .../IBF-dashboard/src/app/shared.module.ts | 3 +++ .../IBF-dashboard/src/assets/i18n/en.json | 3 +++ .../src/assets/icons/source-info-grey.svg | 8 +++++++ interfaces/IBF-dashboard/src/global.scss | 4 ++++ 9 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.html create mode 100644 interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.scss create mode 100644 interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.spec.ts create mode 100644 interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.ts create mode 100644 interfaces/IBF-dashboard/src/assets/icons/source-info-grey.svg diff --git a/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.html b/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.html new file mode 100644 index 000000000..23ce5ceaf --- /dev/null +++ b/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.html @@ -0,0 +1,8 @@ + + + + + + {{ 'disclaimer-approximate-component.message' | translate }} + + diff --git a/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.scss b/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.scss new file mode 100644 index 000000000..158fe4455 --- /dev/null +++ b/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.scss @@ -0,0 +1,8 @@ +ion-item { + ion-thumbnail { + --size: 1rem; + } + ion-label { + font-size: 0.75rem; + } +} diff --git a/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.spec.ts new file mode 100644 index 000000000..9592968ad --- /dev/null +++ b/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.spec.ts @@ -0,0 +1,22 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DisclaimerApproximateComponent } from './disclaimer-approximate.component'; + +describe('DisclaimerApproximateComponent', () => { + let component: DisclaimerApproximateComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [DisclaimerApproximateComponent], + }).compileComponents(); + + fixture = TestBed.createComponent(DisclaimerApproximateComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.ts b/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.ts new file mode 100644 index 000000000..ff8fc4eae --- /dev/null +++ b/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.ts @@ -0,0 +1,8 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-disclaimer-approximate', + templateUrl: './disclaimer-approximate.component.html', + styleUrls: ['./disclaimer-approximate.component.scss'], +}) +export class DisclaimerApproximateComponent {} diff --git a/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.page.html b/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.page.html index b6543d4fb..af3b64f77 100644 --- a/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.page.html +++ b/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.page.html @@ -139,7 +139,7 @@ > @@ -150,6 +150,11 @@ + + + + + diff --git a/interfaces/IBF-dashboard/src/app/shared.module.ts b/interfaces/IBF-dashboard/src/app/shared.module.ts index c6d1a984e..3f3913495 100644 --- a/interfaces/IBF-dashboard/src/app/shared.module.ts +++ b/interfaces/IBF-dashboard/src/app/shared.module.ts @@ -49,6 +49,7 @@ import { TooltipComponent } from './components/tooltip/tooltip.component'; import { UserStateComponent } from './components/user-state/user-state.component'; import { BackendMockScenarioComponent } from './mocks/backend-mock-scenario-component/backend-mock-scenario.component'; import { CompactPipe } from './pipes/compact.pipe'; +import { DisclaimerApproximateComponent } from './components/disclaimer-approximate/disclaimer-approximate.component'; @NgModule({ imports: [ @@ -104,6 +105,7 @@ import { CompactPipe } from './pipes/compact.pipe'; DynamicPointPopupComponent, TyphoonTrackpointPopupContentComponent, GlofasStationPopupContentComponent, + DisclaimerApproximateComponent, ], exports: [ AboutBtnComponent, @@ -149,6 +151,7 @@ import { CompactPipe } from './pipes/compact.pipe'; DynamicPointPopupComponent, TyphoonTrackpointPopupContentComponent, GlofasStationPopupContentComponent, + DisclaimerApproximateComponent, ], }) export class SharedModule {} diff --git a/interfaces/IBF-dashboard/src/assets/i18n/en.json b/interfaces/IBF-dashboard/src/assets/i18n/en.json index d5515f686..f6e035ca1 100644 --- a/interfaces/IBF-dashboard/src/assets/i18n/en.json +++ b/interfaces/IBF-dashboard/src/assets/i18n/en.json @@ -71,6 +71,9 @@ "plural-suffix": "(s)", "not-applicable": "N/A" }, + "disclaimer-approximate-component": { + "message": "All numbers are approximate and meant to be used as guidance." + }, "areas-of-focus-summary-component": { "title": "Actions Summary", "aof-subtitle": "Sector", diff --git a/interfaces/IBF-dashboard/src/assets/icons/source-info-grey.svg b/interfaces/IBF-dashboard/src/assets/icons/source-info-grey.svg new file mode 100644 index 000000000..1472a2717 --- /dev/null +++ b/interfaces/IBF-dashboard/src/assets/icons/source-info-grey.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/interfaces/IBF-dashboard/src/global.scss b/interfaces/IBF-dashboard/src/global.scss index e32a5bbe1..a56a26643 100644 --- a/interfaces/IBF-dashboard/src/global.scss +++ b/interfaces/IBF-dashboard/src/global.scss @@ -310,3 +310,7 @@ app-tooltip { } } } + +.margin-top-auto { + margin-top: auto; +}