| <!-- /******************************************************************************** |
| * 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>{{ 'AddressTypes.Title' | translate }}</span> |
| <div class="pull-right" *visibleByRight> |
| <button class="btn btn-primary new-button" (click)="sandbox.setDisplayForm()"> |
| {{ 'AddressTypes.New' | translate }} |
| </button> |
| </div> |
| </div> |
| <div class="address-types-grid-wrapper" body> |
| <ag-grid-angular |
| autoResizeColumns |
| class="ag-theme-balham" |
| [ngClass]="sandbox.displayForm ? 'ag-grid-height-edit' : 'ag-grid-height-list'" |
| [class.ag-grid-height-list]="!sandbox.displayForm" |
| [gridOptions]="gridOptions" |
| [columnDefs]="columnDefinition" |
| [rowSelection]="'single'" |
| [frameworkComponents]="frameworkComponents" |
| [rowData]="sandbox.addressTypes$ | async" |
| [overlayNoRowsTemplate]="noRowsTemplate" |
| > |
| </ag-grid-angular> |
| |
| <app-spinner [isRunning]="sandbox.addressTypesloading$ | async"></app-spinner> |
| |
| <div *ngIf="sandbox.displayForm" class="address-types-details"> |
| <app-address-types-details></app-address-types-details> |
| </div> |
| </div> |
| </app-card-layout> |