WIP: Move metadata arrow picker
This commit is contained in:
@@ -11,6 +11,7 @@ import {CheckboxModule} from 'primeng/checkbox';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {NgIf} from '@angular/common';
|
||||
import {Observable} from 'rxjs';
|
||||
import {BookInfoTabsComponent} from '../../../book-info-tabs/book-info-tabs.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-book-card',
|
||||
@@ -74,13 +75,36 @@ export class BookCardComponent implements OnInit {
|
||||
{
|
||||
label: 'View metadata',
|
||||
icon: 'pi pi-info-circle',
|
||||
command: () => this.openBookInfo(this.book),
|
||||
command: () => this.openBookDetailsDialog(this.book.id),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
openBookDetailsDialog(bookId: number): void {
|
||||
this.bookService.getBookByIdFromAPI(bookId, true).subscribe(({
|
||||
next: (book) => {
|
||||
console.log(book)
|
||||
this.dialogService.open(BookInfoTabsComponent, {
|
||||
header: 'Open book details',
|
||||
modal: true,
|
||||
closable: true,
|
||||
width: '1200px',
|
||||
height: '835px',
|
||||
showHeader: false,
|
||||
closeOnEscape: true,
|
||||
data: {
|
||||
book: book
|
||||
}
|
||||
});
|
||||
},
|
||||
error: (error) => {
|
||||
console.error('Error fetching book:', error);
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
private openShelfDialog(book: Book): void {
|
||||
this.dialogService.open(ShelfAssignerComponent, {
|
||||
header: `Update Shelves: ${book.metadata?.title}`,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {forkJoin, Subscription} from 'rxjs';
|
||||
import {TagModule} from 'primeng/tag';
|
||||
import {BookService} from '../../service/book.service';
|
||||
import {LibraryService} from '../../service/library.service';
|
||||
import {MetadataSearcherComponent} from '../../../metadata-searcher/metadata-searcher.component';
|
||||
import {MetadataSearcherComponent} from '../../../book-info-tabs/metadata-searcher/metadata-searcher.component';
|
||||
import {LoadingService} from '../../../loading.service';
|
||||
|
||||
@Component({
|
||||
|
||||
Reference in New Issue
Block a user