Show transaction description in list

This commit is contained in:
William Brawner 2021-02-28 16:44:48 -07:00
parent fd112cc096
commit e836d306b8
3 changed files with 17 additions and 12 deletions

View file

@ -1,5 +1,9 @@
.transactions .list-row-one {
display: flex;
justify-content: space-between;
padding-bottom: 0.2em;
.transaction-details p {
padding: 2px 0;
}
.transaction-description {
font-style: italic;
text-overflow: ellipsis;
overflow: hidden;
}

View file

@ -1,12 +1,13 @@
<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 }}">
<div matLine class="list-row-one">
<p>{{transaction.title}}</p>
<div matLine class="transaction-list-details">
<p class="transaction-title">{{transaction.title}}</p>
<p class="transaction-description text-small" *ngIf="transaction.description">{{transaction.description }}</p>
<p matLine class="transaction-date text-small">{{ transaction.date | date }}</p>
</div>
<p class="amount" [class.expense]="transaction.expense" [class.income]="!transaction.expense">
{{ transaction.amount / 100 | currency }}
</p>
</div>
<p matLine class="text-small">{{ transaction.date | date }}</p>
</a>
</mat-nav-list>

View file

@ -20,7 +20,7 @@ a.mat-fab {
}
.text-small {
font-size: 1em;
font-size: 90%;
color: #333333;
}