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:
adityachandelgit
2025-03-28 12:18:54 -06:00
parent dba3bc1c8e
commit fa71e43065
4 changed files with 7 additions and 7 deletions
@@ -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',