blob: b5991a24afcba4d66cffe7f8723deaeecd1bc5d7 [file] [log] [blame]
<!-- /********************************************************************************
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/ -->
<app-card-layout>
<div header>
<span>{{ 'PersonTypes.Title' | translate }}</span>
<div class="pull-right" *visibleByRight>
<button class="btn btn-primary new-button" (click)="sandbox.setDisplayForm()">
{{ 'PersonTypes.New' | translate }}
</button>
</div>
</div>
<div class="person-types-grid-wrapper" body>
<ag-grid-angular
autoResizeColumns
class="ag-theme-balham"
[ngClass]="sandbox.displayForm ? 'ag-grid-height-edit' : 'ag-grid-height-list'"
[gridOptions]="gridOptions"
[columnDefs]="columnDefinition"
[rowSelection]="'single'"
[frameworkComponents]="frameworkComponents"
[rowData]="sandbox.personTypes$ | async"
[overlayNoRowsTemplate]="noRowsTemplate"
>
</ag-grid-angular>
<app-spinner [isRunning]="sandbox.personTypesLoading$ | async"></app-spinner>
<div *ngIf="sandbox.displayForm" class="person-types-details">
<app-person-types-details></app-person-types-details>
</div>
</div>
</app-card-layout>