diff --git a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/content/content.component.html b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/content/content.component.html index a6bc4a015c7426fa1426fea2a9d1340e67c4a94d..0f7580af18aa5a5243dd4cba70a5b9d4508b0d63 100644 --- a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/content/content.component.html +++ b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/content/content.component.html @@ -5,4 +5,11 @@ <app-plots /> </ng-template> </mat-tab> + + <!-- Data tab --> + <mat-tab label="Data" [disabled]="noData()"> + <ng-template matTabContent> + <app-data /> + </ng-template> + </mat-tab> </mat-tab-group> diff --git a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/content/content.component.ts b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/content/content.component.ts index 4f73685ba1c4a710e012061a0e6e389a2e172694..dc185dcf809e6dbc23683e2f26941c32eb13e8b9 100644 --- a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/content/content.component.ts @@ -1,13 +1,19 @@ -import {Component} from '@angular/core'; +import {Component, computed} from '@angular/core'; import {MatTabsModule} from '@angular/material/tabs'; +import {AppService} from '../../services/app.service'; +import {DataComponent} from '../data/data.component'; import {PlotsComponent} from '../plots/plots.component'; @Component({ - imports: [MatTabsModule, PlotsComponent], + imports: [MatTabsModule, PlotsComponent, DataComponent], selector: 'app-content', standalone: true, styleUrl: './content.component.scss', templateUrl: './content.component.html', }) -export class ContentComponent {} +export class ContentComponent { + noData = computed(() => this.service.serviceResponse() === null); + + constructor(private service: AppService) {} +}