accordion
This commit is contained in:
@ -40,6 +40,7 @@ import { MatDatepickerModule } from '@angular/material/datepicker'
|
|||||||
import { MatNativeDateModule } from '@angular/material/core';
|
import { MatNativeDateModule } from '@angular/material/core';
|
||||||
import { FeeListComponent } from './fee-list/fee-list.component';
|
import { FeeListComponent } from './fee-list/fee-list.component';
|
||||||
import { FeeDetailsComponent } from './fee-details/fee-details.component';
|
import { FeeDetailsComponent } from './fee-details/fee-details.component';
|
||||||
|
import { MatExpansionModule } from '@angular/material/expansion'
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@ -84,6 +85,7 @@ import { FeeDetailsComponent } from './fee-details/fee-details.component';
|
|||||||
MatSelectModule,
|
MatSelectModule,
|
||||||
MatDatepickerModule,
|
MatDatepickerModule,
|
||||||
MatNativeDateModule,
|
MatNativeDateModule,
|
||||||
|
MatExpansionModule
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: HTTP_INTERCEPTORS, useClass: ErrorHandlerInterceptor, multi: true },
|
{ provide: HTTP_INTERCEPTORS, useClass: ErrorHandlerInterceptor, multi: true },
|
||||||
|
@ -2,16 +2,21 @@
|
|||||||
<mat-card class="defaultCard">
|
<mat-card class="defaultCard">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
{{tenant?.firstname}} {{tenant?.lastname}}
|
{{tenant?.firstname}} {{tenant?.lastname}}
|
||||||
<button mat-button *ngIf="!collapseTenantDetails" (click)="collapseTenantDetails=true">Collapse</button>
|
|
||||||
<button mat-button *ngIf="collapseTenantDetails" (click)="collapseTenantDetails=false">Expand</button>
|
|
||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
<mat-card-subtitle>
|
|
||||||
ID: {{tenant?.id}}
|
|
||||||
</mat-card-subtitle>
|
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content *ngIf="!collapseTenantDetails">
|
<mat-card-content>
|
||||||
<div>
|
<mat-accordion>
|
||||||
|
<mat-expansion-panel (opened)="collapseTenantDetails = true"
|
||||||
|
(closed)="collapseTenantDetails = false">
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title *ngIf="!collapseTenantDetails">
|
||||||
|
Details
|
||||||
|
</mat-panel-title>
|
||||||
|
<mat-panel-description>
|
||||||
|
</mat-panel-description>
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<div>
|
||||||
<form (ngSubmit)="saveTenant()">
|
<form (ngSubmit)="saveTenant()">
|
||||||
<div>
|
<div>
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field appearance="outline">
|
||||||
@ -75,8 +80,11 @@
|
|||||||
<button #submitButton type="submit" mat-raised-button color="primary">Speichern</button>
|
<button #submitButton type="submit" mat-raised-button color="primary">Speichern</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</mat-expansion-panel>
|
||||||
|
</mat-accordion>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
<mat-card class="defaultCard">
|
<mat-card class="defaultCard">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
@ -84,7 +92,17 @@
|
|||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div>
|
<mat-accordion>
|
||||||
|
<mat-expansion-panel (opened)="collapseTenancies = true"
|
||||||
|
(closed)="collapseTenancies = false">
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title *ngIf="!collapseTenancies">
|
||||||
|
Übersicht
|
||||||
|
</mat-panel-title>
|
||||||
|
<mat-panel-description>
|
||||||
|
</mat-panel-description>
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<div>
|
||||||
<table mat-table [dataSource]="tenancyDataSource" #zftable>
|
<table mat-table [dataSource]="tenancyDataSource" #zftable>
|
||||||
<ng-container matColumnDef="description">
|
<ng-container matColumnDef="description">
|
||||||
<th mat-header-cell *matHeaderCellDef>Beschreibung</th>
|
<th mat-header-cell *matHeaderCellDef>Beschreibung</th>
|
||||||
@ -114,7 +132,9 @@
|
|||||||
<tr mat-row *matRowDef="let row; columns: tenancyDisplayColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: tenancyDisplayColumns;"></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-expansion-panel>
|
||||||
|
</mat-accordion>
|
||||||
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -31,7 +31,6 @@ export class TenantDetailsComponent implements OnInit {
|
|||||||
|
|
||||||
collapseTenantDetails: boolean = false
|
collapseTenantDetails: boolean = false
|
||||||
collapseTenancies: boolean = false
|
collapseTenancies: boolean = false
|
||||||
|
|
||||||
|
|
||||||
@ViewChild('submitButton') submitButton: MatButton
|
@ViewChild('submitButton') submitButton: MatButton
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user