Fix: include missing fields for saved view widgets (#8905)

This commit is contained in:
shamoon
2025-01-25 07:49:14 -08:00
committed by GitHub
parent 702de0cac3
commit 8f9a294529
5 changed files with 80 additions and 20 deletions

View File

@@ -68,6 +68,29 @@
<a class="btn-link text-dark text-decoration-none" type="button" (click)="clickStoragePath(doc.storage_path, $event)" title="Filter by storage path" i18n-title>{{(doc.storage_path$ | async)?.name}}</a>
}
}
@case (DisplayField.OWNER) {
@if (doc.owner) {
<a class="btn-link text-dark text-decoration-none" type="button" (click)="clickOwner(doc.owner, $event)" title="Filter by owner" i18n-title>{{doc.owner | username}}</a>
}
}
@case (DisplayField.ASN) {
{{doc.archive_serial_number}}
}
@case (DisplayField.PAGE_COUNT) {
{{ doc.page_count }}
}
@case (DisplayField.SHARED) {
@if (doc.is_shared_by_requester) { <ng-container i18n>Yes</ng-container> } @else { <ng-container i18n>No</ng-container> }
}
@case (DisplayField.NOTES) {
@if (doc.notes.length) {
<a routerLink="/documents/{{doc.id}}/notes" class="btn btn-sm p-0">
<span class="badge rounded-pill bg-light border text-primary">
<i-bs width="1.2em" height="1.2em" class="ms-1 me-1" name="chat-left-text"></i-bs>
{{doc.notes.length}}</span>
</a>
}
}
}
@if (field.startsWith(DisplayField.CUSTOM_FIELD)) {
<pngx-custom-field-display [document]="doc" [fieldDisplayKey]="field"></pngx-custom-field-display>