Fix custom send button and adjust column gap layout
- Resolve issues with the custom send button functionality. - Adjust column gap to ensure proper alignment and spacing in the layout.
This commit is contained in:
@@ -181,7 +181,7 @@ export class BookCardComponent implements OnInit {
|
||||
top: '15%',
|
||||
},
|
||||
data: {
|
||||
book: this.book,
|
||||
bookId: this.book.id,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export class BookSenderComponent implements OnInit {
|
||||
private dynamicDialogRef = inject(DynamicDialogRef);
|
||||
private dynamicDialogConfig = inject(DynamicDialogConfig);
|
||||
|
||||
book: Book = this.dynamicDialogConfig.data.book;
|
||||
bookId: number = this.dynamicDialogConfig.data.bookId;
|
||||
|
||||
emailProviders: { label: string, value: EmailProvider }[] = [];
|
||||
emailRecipients: { label: string, value: EmailRecipient }[] = [];
|
||||
@@ -58,8 +58,8 @@ export class BookSenderComponent implements OnInit {
|
||||
}
|
||||
|
||||
sendBook() {
|
||||
if (this.selectedProvider && this.selectedRecipient && this.book) {
|
||||
const bookId = this.book.id;
|
||||
if (this.selectedProvider && this.selectedRecipient && this.bookId) {
|
||||
const bookId = this.bookId;
|
||||
const recipientId = this.selectedRecipient.value.id;
|
||||
const providerId = this.selectedProvider.value.id;
|
||||
|
||||
@@ -102,7 +102,7 @@ export class BookSenderComponent implements OnInit {
|
||||
detail: 'Please select a recipient to send the book.'
|
||||
});
|
||||
}
|
||||
if (!this.book) {
|
||||
if (!this.bookId) {
|
||||
this.messageService.add({
|
||||
severity: 'error',
|
||||
summary: 'Book Not Selected',
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
<p class="font-semibold">({{ metadata.reviewCount || 0 }} Reviews)</p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-3 gap-2">
|
||||
<div class="grid grid-cols-3 gap-x-48 gap-y-2">
|
||||
<p><span class="font-bold">Publisher:</span> {{ metadata.publisher || '-' }}</p>
|
||||
<p><span class="font-bold">Published:</span> {{ metadata.publishedDate || '-' }}</p>
|
||||
<p><span class="font-bold">Language:</span> {{ metadata.language || '-' }}</p>
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ export class MetadataViewerComponent implements OnInit {
|
||||
top: '15%',
|
||||
},
|
||||
data: {
|
||||
book: metadata.bookId,
|
||||
bookId: metadata.bookId,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user