diff --git a/src/app/features/home/components/footer/footer.component.html b/src/app/features/home/components/footer/footer.component.html index 47bf453b..a43cc49f 100644 --- a/src/app/features/home/components/footer/footer.component.html +++ b/src/app/features/home/components/footer/footer.component.html @@ -80,7 +80,7 @@
  • -
  • diff --git a/src/app/features/home/components/navigation/navigation.component.html b/src/app/features/home/components/navigation/navigation.component.html index 0ca6b20c..72c33468 100644 --- a/src/app/features/home/components/navigation/navigation.component.html +++ b/src/app/features/home/components/navigation/navigation.component.html @@ -28,10 +28,8 @@ routerLink="/" >
    - -
    - Nationwide Operational Assessment of Hazards -
    + +
    @@ -193,21 +191,7 @@ routerLink="/" >
    - - +
    @@ -315,7 +299,7 @@ >
    diff --git a/src/app/features/know-your-hazards/pages/base/base.component.html b/src/app/features/know-your-hazards/pages/base/base.component.html index 34fd34d1..d49a3f2d 100644 --- a/src/app/features/know-your-hazards/pages/base/base.component.html +++ b/src/app/features/know-your-hazards/pages/base/base.component.html @@ -11,21 +11,8 @@ routerLink="/" >
    - - + +
    diff --git a/src/app/features/noah-playground/components/qc-sensors-group/qc-sensors-group.component.html b/src/app/features/noah-playground/components/qc-sensors-group/qc-sensors-group.component.html index a43879bd..8b338ca4 100644 --- a/src/app/features/noah-playground/components/qc-sensors-group/qc-sensors-group.component.html +++ b/src/app/features/noah-playground/components/qc-sensors-group/qc-sensors-group.component.html @@ -115,10 +115,39 @@
    IoT (Internet of Things)
    [qcCriticalFacilities]="qcCriticalFacilities" > - + +
    + +
    - diff --git a/src/app/features/noah-playground/components/qc-sensors-group/qc-sensors-group.component.ts b/src/app/features/noah-playground/components/qc-sensors-group/qc-sensors-group.component.ts index 60fa6215..e1d1f4dc 100644 --- a/src/app/features/noah-playground/components/qc-sensors-group/qc-sensors-group.component.ts +++ b/src/app/features/noah-playground/components/qc-sensors-group/qc-sensors-group.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { ModalServicesService } from '@features/noah-playground/services/modal-services.service'; import { NoahPlaygroundService } from '@features/noah-playground/services/noah-playground.service'; import { QCSENSORS } from '@features/noah-playground/services/qc-sensor.service'; import { @@ -10,7 +11,9 @@ import { QuezonCityMunicipalBoundaryState, QuezonCitySensorType, } from '@features/noah-playground/store/noah-playground.store'; -import { Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; + +import { BehaviorSubject } from 'rxjs'; @Component({ selector: 'noah-qc-sensors-group', templateUrl: './qc-sensors-group.component.html', @@ -34,8 +37,12 @@ export class QcSensorsGroupComponent implements OnInit { qcbShown: QuezonCityMunicipalBoundaryState; brgyShown: BarangayBoundaryState; disclaimerModal = false; + isChecked: boolean = false; - constructor(private pgService: NoahPlaygroundService) {} + constructor( + private pgService: NoahPlaygroundService, + private modalService: ModalServicesService + ) {} ngOnInit(): void { this.expanded$ = this.pgService.qcSensorsGroupExpanded$; @@ -46,6 +53,7 @@ export class QcSensorsGroupComponent implements OnInit { this.qcbexpanded$ = this.pgService.qcMunicipalBoundaryExpanded$; this.brgyShown$ = this.pgService.barangayBoundaryShown$; this.brgyExpanded$ = this.pgService.barangayExpanded$; + this.disclaimerLoginModal(); } toggleExpansion() { @@ -57,12 +65,29 @@ export class QcSensorsGroupComponent implements OnInit { event.stopImmediatePropagation(); this.pgService.toggleQuezonCityIOTGroupShown(); - const discStatus = localStorage.getItem('disclaimerStatus'); - if (discStatus == 'true') { - this.disclaimerModal = true; + if (event.target instanceof HTMLInputElement) { + const checked = event.target.checked; + if (checked) { + this.modalService.disclaimerModalOpen(); + } else { + this.modalService.disclaimerModalClose(); + } + } + } + + iotModalOpen() { + this.modalService.iotSummaryModalOpen(); + } + + disclaimerLoginModal() { + const adminLogin = localStorage.getItem('loginStatus'); + if (adminLogin == '1') { + this.modalService.disclaimerModalOpen(); } - if (discStatus == 'false') { - this.disclaimerModal = false; + if (adminLogin == '2') { + localStorage.setItem('disclaimerStatus', 'false'); + } else { + this.modalService.disclaimerModalClose(); } } } diff --git a/src/app/features/noah-playground/pages/noah-playground/noah-playground.component.html b/src/app/features/noah-playground/pages/noah-playground/noah-playground.component.html index bd9cc065..890b1537 100644 --- a/src/app/features/noah-playground/pages/noah-playground/noah-playground.component.html +++ b/src/app/features/noah-playground/pages/noah-playground/noah-playground.component.html @@ -213,7 +213,7 @@
    -
    - -
    + @@ -766,3 +762,4 @@
    + diff --git a/src/app/features/noah-playground/pages/noah-playground/noah-playground.component.ts b/src/app/features/noah-playground/pages/noah-playground/noah-playground.component.ts index 3d34516e..d412e642 100644 --- a/src/app/features/noah-playground/pages/noah-playground/noah-playground.component.ts +++ b/src/app/features/noah-playground/pages/noah-playground/noah-playground.component.ts @@ -25,10 +25,12 @@ export class NoahPlaygroundComponent implements OnInit { UserName$: Observable; showAlert: boolean; modalAlert: boolean; - DisclaimerStatus$: Observable; qcAdmin: boolean; lagunaAdmin: boolean; isWarningAlert = false; + disclaimerModalOpen = false; + iotModalOpen = false; + constructor( private pgService: NoahPlaygroundService, private title: Title, @@ -41,12 +43,19 @@ export class NoahPlaygroundComponent implements OnInit { this.title.setTitle('NOAH Studio'); this.LoginStatus$ = this.qcLoginService.isLoggesIn; this.UserName$ = this.qcLoginService.currentUserName; - this.DisclaimerStatus$ = this.qcLoginService.isDisclaimerStatus; this.modalService.accountWarning$.subscribe((isWarningAlert) => { this.isWarningAlert = isWarningAlert; }); + this.modalService.disclaimerModal$.subscribe((disclaimerModal) => { + this.disclaimerModalOpen = disclaimerModal; + }); + + this.modalService.iotSummaryModal$.subscribe((iotModalOpen) => { + this.iotModalOpen = iotModalOpen; + }); + const disableAlert = localStorage.getItem('loginStatus'); if (disableAlert == '1') { this.showAlert = false; diff --git a/src/app/features/noah-playground/services/modal-services.service.ts b/src/app/features/noah-playground/services/modal-services.service.ts index 5810d5e9..c88252e1 100644 --- a/src/app/features/noah-playground/services/modal-services.service.ts +++ b/src/app/features/noah-playground/services/modal-services.service.ts @@ -20,8 +20,30 @@ export class ModalServicesService { private lagunaLogin = new Subject(); lagunaLogin$ = this.lagunaLogin.asObservable(); + private disclaimerModal = new Subject(); + disclaimerModal$ = this.disclaimerModal.asObservable(); + + private iotSummaryModal = new Subject(); + iotSummaryModal$ = this.iotSummaryModal.asObservable(); + constructor() {} + disclaimerModalOpen() { + this.disclaimerModal.next(true); + } + + disclaimerModalClose() { + this.disclaimerModal.next(false); + } + + iotSummaryModalOpen() { + this.iotSummaryModal.next(true); + } + + iotSummaryModalClose() { + this.iotSummaryModal.next(false); + } + lagunaLoginPopup() { this.lagunaLogin.next(true); } diff --git a/src/app/shared/components/disclaimer/disclaimer.component.html b/src/app/shared/components/disclaimer/disclaimer.component.html index 1bb03cc1..51a238e7 100644 --- a/src/app/shared/components/disclaimer/disclaimer.component.html +++ b/src/app/shared/components/disclaimer/disclaimer.component.html @@ -107,7 +107,7 @@ " > up logo @@ -124,7 +124,7 @@ " > upri logo @@ -140,8 +140,8 @@ " > noah logo diff --git a/src/app/shared/components/login/login.component.html b/src/app/shared/components/login/login.component.html index a168b1c4..19fa9fc4 100644 --- a/src/app/shared/components/login/login.component.html +++ b/src/app/shared/components/login/login.component.html @@ -129,9 +129,9 @@
    - - - + + +
    @@ -353,8 +353,8 @@

    Login Your Account

    " >
    @@ -418,16 +418,14 @@

    Login Your Account

    - - + + - +
    @@ -649,8 +647,8 @@

    " >

    diff --git a/src/app/shared/components/qc-login/qc-login.component.html b/src/app/shared/components/qc-login/qc-login.component.html index 06b1615c..10d2fca6 100644 --- a/src/app/shared/components/qc-login/qc-login.component.html +++ b/src/app/shared/components/qc-login/qc-login.component.html @@ -23,8 +23,8 @@ " > @@ -84,16 +84,14 @@
    - - + + - +
    @@ -320,16 +318,14 @@

    - - + + - +
    diff --git a/src/app/shared/components/summary/summary.component.html b/src/app/shared/components/summary/summary.component.html index 0c87dc18..688cb5e9 100644 --- a/src/app/shared/components/summary/summary.component.html +++ b/src/app/shared/components/summary/summary.component.html @@ -1,46 +1,22 @@ -
    - -
    - -