Mietzahlung eintragen
This commit is contained in:
37
ui/hv2-ui/src/app/enter-payment/enter-payment.component.ts
Normal file
37
ui/hv2-ui/src/app/enter-payment/enter-payment.component.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { TenantService } from '../data-object-service';
|
||||
import { Tenant } from '../data-objects';
|
||||
import { MessageService } from '../message.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-enter-payment',
|
||||
templateUrl: './enter-payment.component.html',
|
||||
styleUrls: ['./enter-payment.component.css']
|
||||
})
|
||||
export class EnterPaymentComponent implements OnInit {
|
||||
|
||||
tenants: Tenant[]
|
||||
accountId: number
|
||||
|
||||
constructor(
|
||||
private tenantService: TenantService,
|
||||
private messageService: MessageService
|
||||
) { }
|
||||
|
||||
|
||||
|
||||
async getTenants(): Promise<void> {
|
||||
try {
|
||||
this.messageService.add("Trying to load tenants")
|
||||
this.tenants = await this.tenantService.getTenants()
|
||||
this.messageService.add("Tenants loaded")
|
||||
} catch (err) {
|
||||
this.messageService.add(JSON.stringify(err, undefined, 4))
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.getTenants()
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user