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">
</p-button>
}
@if (entityType === EntityType.LIBRARY || entityType === EntityType.ALL_BOOKS || entityType === EntityType.UNSHELVED) {
<p-button
icon="pi pi-bookmark-fill"
outlined="true"
severity="info"
(onClick)="openShelfAssigner()"
pTooltip="Assign to shelf"
tooltipPosition="top">
</p-button>
}
<p-button
icon="pi pi-bookmark-fill"
outlined="true"
severity="info"
(onClick)="openShelfAssigner()"
pTooltip="Assign to shelf"
tooltipPosition="top">
</p-button>
@if (entityType === EntityType.SHELF) {
<p-button
icon="pi pi-bookmark"
outlined="true"
severity="info"
(click)="unshelfBooks()"
pTooltip="Remove from shelf"
pTooltip="Remove from this shelf"
tooltipPosition="top">
</p-button>
}
@@ -554,9 +554,6 @@ export class BookBrowserComponent implements OnInit {
openShelfAssigner(): void {
this.dynamicDialogRef = this.dialogHelperService.openShelfAssigner(this.selectedBooks);
this.dynamicDialogRef?.onClose.subscribe(() => {
this.selectedBooks = new Set<number>();
});
}
lockUnlockMetadata(): void {