From d855acd426297a57205e64a1c4f500bdb9cb5866 Mon Sep 17 00:00:00 2001 From: Aditya Chandel <8075870+adityachandelgit@users.noreply.github.com> Date: Fri, 25 Apr 2025 13:56:38 -0600 Subject: [PATCH] Implement sorting and display of file size in the table view * Display the file size in the Book Metadata details section * Implement sorting and display of file size in the table view * Implement AppMigration feature * Populate missing file sizes for books with null file size in 'populateFileSizes' migration * Implement sorting and display of file size in the table view --------- Co-authored-by: adityachandelgit --- .../book/components/book-browser/book-browser.component.ts | 1 + .../book-browser/book-table/book-table.component.html | 5 +++++ .../book-browser/book-table/book-table.component.ts | 6 ++++++ booklore-ui/src/app/book/service/sort.service.ts | 3 ++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts b/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts index 559e20cd0..937854760 100644 --- a/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts +++ b/booklore-ui/src/app/book/components/book-browser/book-browser.component.ts @@ -117,6 +117,7 @@ export class BookBrowserComponent implements OnInit, AfterViewInit { {label: 'Author', icon: '', field: 'author', command: () => this.sortBooks('author')}, {label: 'Last Read', field: 'lastReadTime', command: () => this.sortBooks('lastReadTime')}, {label: 'Added On', field: 'addedOn', command: () => this.sortBooks('addedOn')}, + {label: 'File Size', icon: '', field: 'fileSizeKb', command: () => this.sortBooks('fileSizeKb')}, {label: 'Locked', icon: '', field: 'locked', command: () => this.sortBooks('locked')}, {label: 'Publisher', icon: '', field: 'publisher', command: () => this.sortBooks('publisher')}, {label: 'Published Date', icon: '', field: 'publishedDate', command: () => this.sortBooks('publishedDate')}, diff --git a/booklore-ui/src/app/book/components/book-browser/book-table/book-table.component.html b/booklore-ui/src/app/book/components/book-browser/book-table/book-table.component.html index 7665f458a..c4d0c9fea 100644 --- a/booklore-ui/src/app/book/components/book-browser/book-table/book-table.component.html +++ b/booklore-ui/src/app/book/components/book-browser/book-table/book-table.component.html @@ -25,6 +25,7 @@