Skip to content

Commit

Permalink
items: display items notes
Browse files Browse the repository at this point in the history
Adapts the item detail view to display notes related to an item.
Adds manual translations for note type.

Co-authored-by: Renaud Michotte <renaud.michotte@gmail.com>
  • Loading branch information
zannkukai committed Jun 20, 2020
1 parent 021abc9 commit ba81cb7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<a [routerLink]="['/records', 'items', 'detail', item.metadata.pid]">
{{ item.metadata.barcode }}
</a>
<span class="float-right text-warning small pt-1" *ngIf="item.metadata.notes && item.metadata.notes.length > 0">
<i class="fa fa-sticky-note-o pr-1"></i>{{ item.metadata.notes.length }}
</span>
</div>
<div class="col-sm-2">
{{ item.metadata.status | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ <h1>{{ 'Barcode' | translate }} {{ record.metadata.barcode }}</h1>
</dl>
</section>

<section *ngIf="record.metadata.notes">
<div class="card item-notes">
<div class="card-header" translate>Notes</div>
<div class="card-body">
<div class="row mb-3" *ngFor="let note of record.metadata.notes">
<div class="col-12">
<strong translate>{{ note.type }}</strong>
</div>
<div class="offset-1 col-11 text-justify">{{ note.content }}</div>
</div>
</div>
</div>
</section>

<!-- TRANSACTIONS -->
<admin-item-transactions [item]="record"></admin-item-transactions>
</ng-container>

0 comments on commit ba81cb7

Please sign in to comment.