Browse Source

Various improvements

pull/7091/head
Thomas Kaul 1 month ago
parent
commit
f428664874
  1. 6
      apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts
  2. 10
      apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html

6
apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts

@ -106,7 +106,11 @@ export class GfUserDetailDialogComponent implements OnInit {
public getSum() {
return getSum(
this.subscriptionsDataSource.data.map(({ price }) => {
this.subscriptionsDataSource.data
.filter(({ price }) => {
return price !== null;
})
.map(({ price }) => {
return new Big(price);
})
).toNumber();

10
apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html

@ -128,7 +128,7 @@
@if (subscriptionsDataSource.data.length > 0) {
<div class="row">
<div class="col">
<h2 class="h6" i18n>Subscriptions</h2>
<h2 class="h6" i18n>Subscription History</h2>
<div class="overflow-x-auto">
<table
class="gf-table w-100"
@ -137,7 +137,7 @@
>
<ng-container matColumnDef="createdAt">
<th *matHeaderCellDef class="px-1" mat-header-cell>
<ng-container i18n>Created</ng-container>
<ng-container i18n>Creation</ng-container>
</th>
<td *matCellDef="let element" class="px-1" mat-cell>
<gf-value
@ -170,6 +170,9 @@
class="px-1 text-right"
mat-cell
>
@if (element.price === null) {
<span class="text-muted">-</span>
} @else {
<gf-value
class="d-inline-block justify-content-end"
[isCurrency]="true"
@ -177,6 +180,7 @@
[unit]="baseCurrency"
[value]="element.price"
/>
}
</td>
<td *matFooterCellDef class="px-1 text-right" mat-footer-cell>
<gf-value
@ -191,7 +195,7 @@
<ng-container matColumnDef="expiresAt">
<th *matHeaderCellDef class="px-1" mat-header-cell>
<ng-container i18n>Expires</ng-container>
<ng-container i18n>Expiration</ng-container>
</th>
<td *matCellDef="let element" class="px-1" mat-cell>
<gf-value

Loading…
Cancel
Save