sorting not yet working
This commit is contained in:
@ -52,7 +52,7 @@ Saldo: {{saldo?.saldo | number:'1.2-2'}} €
|
|||||||
<th mat-header-cell *matHeaderCellDef>Betrag</th>
|
<th mat-header-cell *matHeaderCellDef>Betrag</th>
|
||||||
<td mat-cell *matCellDef="let element" class="rightaligned">{{element.rawAccountEntry.amount | number:'1.2-2'}} €</td>
|
<td mat-cell *matCellDef="let element" class="rightaligned">{{element.rawAccountEntry.amount | number:'1.2-2'}} €</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="category">
|
<ng-container matColumnDef="accountEntryCategory">
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Kategorie</th>
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>Kategorie</th>
|
||||||
<td mat-cell *matCellDef="let element">{{element.accountEntryCategory}}</td>
|
<td mat-cell *matCellDef="let element">{{element.accountEntryCategory}}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -3,6 +3,7 @@ import { Component, Input, OnInit, OnChanges, ViewChild } from '@angular/core';
|
|||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import { MatButton } from '@angular/material/button';
|
import { MatButton } from '@angular/material/button';
|
||||||
import { MatExpansionPanel } from '@angular/material/expansion';
|
import { MatExpansionPanel } from '@angular/material/expansion';
|
||||||
|
import { MatSort } from '@angular/material/sort';
|
||||||
import { MatTableDataSource } from '@angular/material/table';
|
import { MatTableDataSource } from '@angular/material/table';
|
||||||
import { AccountEntryCategoryService, AccountEntryService, AccountService } from '../data-object-service';
|
import { AccountEntryCategoryService, AccountEntryService, AccountService } from '../data-object-service';
|
||||||
import { Account, AccountEntry, AccountEntryCategory, NULL_AccountEntry } from '../data-objects';
|
import { Account, AccountEntry, AccountEntryCategory, NULL_AccountEntry } from '../data-objects';
|
||||||
@ -31,10 +32,12 @@ export class AccountComponent implements OnInit {
|
|||||||
@Input() shallBeRentPayment: boolean
|
@Input() shallBeRentPayment: boolean
|
||||||
@ViewChild('addAccountEntryButton') addAccountEntryButton: MatButton
|
@ViewChild('addAccountEntryButton') addAccountEntryButton: MatButton
|
||||||
|
|
||||||
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
account: Account
|
account: Account
|
||||||
accountEntries: DN_AccountEntry[]
|
accountEntries: DN_AccountEntry[]
|
||||||
accountEntriesDataSource: MatTableDataSource<DN_AccountEntry>
|
accountEntriesDataSource: MatTableDataSource<DN_AccountEntry>
|
||||||
accountEntriesDisplayedColumns: string[] = [ "description", "document_no", "amount", "createdAt", "fiscalYear", "category", "overhead_relevant" ]
|
accountEntriesDisplayedColumns: string[] = [ "description", "document_no", "amount", "createdAt", "fiscalYear", "accountEntryCategory", "overhead_relevant" ]
|
||||||
saldo: Saldo
|
saldo: Saldo
|
||||||
|
|
||||||
accountEntryCategories: AccountEntryCategory[]
|
accountEntryCategories: AccountEntryCategory[]
|
||||||
@ -163,5 +166,8 @@ export class AccountComponent implements OnInit {
|
|||||||
this.init()
|
this.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngAfterViewInit(): void {
|
||||||
|
this.accountEntriesDataSource.sort = this.sort;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,7 @@ import { EnterPaymentComponent } from './enter-payment/enter-payment.component';
|
|||||||
import { HomeComponent } from './home/home.component';
|
import { HomeComponent } from './home/home.component';
|
||||||
import { LedgerComponent } from './ledger/ledger.component';
|
import { LedgerComponent } from './ledger/ledger.component';
|
||||||
import { ErrorDialogComponent } from './error-dialog/error-dialog.component'
|
import { ErrorDialogComponent } from './error-dialog/error-dialog.component'
|
||||||
|
import { MatSortModule } from '@angular/material/sort';
|
||||||
|
|
||||||
registerLocaleData(localeDe)
|
registerLocaleData(localeDe)
|
||||||
|
|
||||||
@ -102,7 +103,8 @@ registerLocaleData(localeDe)
|
|||||||
MatSelectModule,
|
MatSelectModule,
|
||||||
MatDatepickerModule,
|
MatDatepickerModule,
|
||||||
MatNativeDateModule,
|
MatNativeDateModule,
|
||||||
MatExpansionModule
|
MatExpansionModule,
|
||||||
|
MatSortModule
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
MatMomentDateModule
|
MatMomentDateModule
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
export const serviceBaseUrl = "https://api.hv.nober.de";
|
// export const serviceBaseUrl = "https://api.hv.nober.de";
|
||||||
// export const serviceBaseUrl = "http://172.16.3.96:8080";
|
export const serviceBaseUrl = "http://172.16.3.96:8080";
|
||||||
// export const serviceBaseUrl = "http://localhost:8080"
|
// export const serviceBaseUrl = "http://localhost:8080"
|
||||||
export const authserviceBaseUrl = "https://authservice.hottis.de"
|
export const authserviceBaseUrl = "https://authservice.hottis.de"
|
||||||
export const applicationId = "hv2"
|
export const applicationId = "hv2"
|
||||||
|
Reference in New Issue
Block a user