Enable assign to shelf on shelves and magic shelves (#1628)

This commit is contained in:
Muppetteer
2025-11-25 04:43:33 -07:00
committed by GitHub
parent bcee8db6c4
commit e2bdb6cea7
2 changed files with 9 additions and 14 deletions
@@ -298,23 +298,21 @@
icon="pi pi-database"> icon="pi pi-database">
</p-button> </p-button>
} }
@if (entityType === EntityType.LIBRARY || entityType === EntityType.ALL_BOOKS || entityType === EntityType.UNSHELVED) { <p-button
<p-button icon="pi pi-bookmark-fill"
icon="pi pi-bookmark-fill" outlined="true"
outlined="true" severity="info"
severity="info" (onClick)="openShelfAssigner()"
(onClick)="openShelfAssigner()" pTooltip="Assign to shelf"
pTooltip="Assign to shelf" tooltipPosition="top">
tooltipPosition="top"> </p-button>
</p-button>
}
@if (entityType === EntityType.SHELF) { @if (entityType === EntityType.SHELF) {
<p-button <p-button
icon="pi pi-bookmark" icon="pi pi-bookmark"
outlined="true" outlined="true"
severity="info" severity="info"
(click)="unshelfBooks()" (click)="unshelfBooks()"
pTooltip="Remove from shelf" pTooltip="Remove from this shelf"
tooltipPosition="top"> tooltipPosition="top">
</p-button> </p-button>
} }
@@ -554,9 +554,6 @@ export class BookBrowserComponent implements OnInit {
openShelfAssigner(): void { openShelfAssigner(): void {
this.dynamicDialogRef = this.dialogHelperService.openShelfAssigner(this.selectedBooks); this.dynamicDialogRef = this.dialogHelperService.openShelfAssigner(this.selectedBooks);
this.dynamicDialogRef?.onClose.subscribe(() => {
this.selectedBooks = new Set<number>();
});
} }
lockUnlockMetadata(): void { lockUnlockMetadata(): void {