Show transaction description in list
This commit is contained in:
parent
fd112cc096
commit
e836d306b8
3 changed files with 17 additions and 12 deletions
|
@ -1,5 +1,9 @@
|
||||||
.transactions .list-row-one {
|
.transaction-details p {
|
||||||
display: flex;
|
padding: 2px 0;
|
||||||
justify-content: space-between;
|
|
||||||
padding-bottom: 0.2em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.transaction-description {
|
||||||
|
font-style: italic;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
|
@ -1,12 +1,13 @@
|
||||||
<mat-nav-list *ngIf="transactions" class="transactions">
|
<mat-nav-list *ngIf="transactions" class="transactions">
|
||||||
<a mat-list-item *ngFor="let transaction of transactions"
|
<a mat-list-item class="transaction-list-item" *ngFor="let transaction of transactions"
|
||||||
routerLink="/transactions/{{ transaction.id }}">
|
routerLink="/transactions/{{ transaction.id }}">
|
||||||
<div matLine class="list-row-one">
|
<div matLine class="transaction-list-details">
|
||||||
<p>{{transaction.title}}</p>
|
<p class="transaction-title">{{transaction.title}}</p>
|
||||||
<p class="amount" [class.expense]="transaction.expense" [class.income]="!transaction.expense">
|
<p class="transaction-description text-small" *ngIf="transaction.description">{{transaction.description }}</p>
|
||||||
{{ transaction.amount / 100 | currency }}
|
<p matLine class="transaction-date text-small">{{ transaction.date | date }}</p>
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<p matLine class="text-small">{{ transaction.date | date }}</p>
|
<p class="amount" [class.expense]="transaction.expense" [class.income]="!transaction.expense">
|
||||||
|
{{ transaction.amount / 100 | currency }}
|
||||||
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</mat-nav-list>
|
</mat-nav-list>
|
|
@ -20,7 +20,7 @@ a.mat-fab {
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-small {
|
.text-small {
|
||||||
font-size: 1em;
|
font-size: 90%;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue