From df9b320e142042f49c1ed31758ea76db7e77ca34 Mon Sep 17 00:00:00 2001
From: Brandon Clayton <bclayton@usgs.gov>
Date: Tue, 26 Nov 2024 12:17:15 -0700
Subject: [PATCH] add hazard dashboard

---
 .../app/hazard/dashboard/app.component.html   | 19 ++++++++
 .../app/hazard/dashboard/app.component.scss   |  0
 .../hazard/dashboard/app.component.spec.ts    | 22 +++++++++
 .../src/app/hazard/dashboard/app.component.ts | 46 +++++++++++++++++++
 4 files changed, 87 insertions(+)
 create mode 100644 projects/nshmp-apps/src/app/hazard/dashboard/app.component.html
 create mode 100644 projects/nshmp-apps/src/app/hazard/dashboard/app.component.scss
 create mode 100644 projects/nshmp-apps/src/app/hazard/dashboard/app.component.spec.ts
 create mode 100644 projects/nshmp-apps/src/app/hazard/dashboard/app.component.ts

diff --git a/projects/nshmp-apps/src/app/hazard/dashboard/app.component.html b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.html
new file mode 100644
index 000000000..b20dfdbe0
--- /dev/null
+++ b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.html
@@ -0,0 +1,19 @@
+<nshmp-lib-ng-template #template [navigationList]="navigationList" [title]="">
+  <!-- Dashboard -->
+  <nshmp-lib-ng-dashboard [sections]="sections">
+    <nshmp-lib-ng-dashboard-title>
+      USGS Earthquake Hazard Toolbox:
+      <br />
+      Hazard Applications
+    </nshmp-lib-ng-dashboard-title>
+    <nshmp-lib-ng-dashboard-description />
+  </nshmp-lib-ng-dashboard>
+
+  <!-- About page -->
+  <nshmp-lib-ng-about-page>
+    <nshmp-lib-ng-about-content
+      [showSavingSettingPanel]="false"
+      [showUsingApplicationPanel]="false"
+    />
+  </nshmp-lib-ng-about-page>
+</nshmp-lib-ng-template>
diff --git a/projects/nshmp-apps/src/app/hazard/dashboard/app.component.scss b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/projects/nshmp-apps/src/app/hazard/dashboard/app.component.spec.ts b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.spec.ts
new file mode 100644
index 000000000..39ededed7
--- /dev/null
+++ b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.spec.ts
@@ -0,0 +1,22 @@
+import {ComponentFixture, TestBed} from '@angular/core/testing';
+
+import {AppComponent} from './app.component';
+
+describe('AppComponent', () => {
+  let component: AppComponent;
+  let fixture: ComponentFixture<AppComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      imports: [AppComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(AppComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/projects/nshmp-apps/src/app/hazard/dashboard/app.component.ts b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.ts
new file mode 100644
index 000000000..858a8e2a9
--- /dev/null
+++ b/projects/nshmp-apps/src/app/hazard/dashboard/app.component.ts
@@ -0,0 +1,46 @@
+import {Component} from '@angular/core';
+import {
+  NshmpLibNgAboutContentComponent,
+  NshmpLibNgAboutPageComponent,
+} from '@ghsc/nshmp-lib-ng/about';
+import {
+  ApplicationSections,
+  NshmpLibNgDashboardComponent,
+  NshmpLibNgDashboardDescriptionComponent,
+  NshmpLibNgDashboardTitleComponent,
+  NshmpLibNgTemplateComponent,
+} from '@ghsc/nshmp-lib-ng/nshmp';
+import {
+  hazardApps,
+  navigation,
+} from 'projects/nshmp-apps/src/shared/utils/navigation.utils';
+
+@Component({
+  imports: [
+    NshmpLibNgTemplateComponent,
+    NshmpLibNgAboutPageComponent,
+    NshmpLibNgDashboardComponent,
+    NshmpLibNgDashboardTitleComponent,
+    NshmpLibNgDashboardDescriptionComponent,
+    NshmpLibNgAboutContentComponent,
+  ],
+  selector: 'app-app',
+  standalone: true,
+  styleUrl: './app.component.scss',
+  templateUrl: './app.component.html',
+})
+export class AppComponent {
+  /** Navigation list for menu */
+  navigationList = navigation();
+
+  sections: ApplicationSections[] = [
+    {
+      gridClass: 'grid-col-12',
+      sections: [
+        {
+          applications: hazardApps().map(navigation => ({navigation})),
+        },
+      ],
+    },
+  ];
+}
-- 
GitLab