From 5f5c24564f80bf674672b43dd66bbcca48fbfa6b Mon Sep 17 00:00:00 2001 From: Joseph Milazzo Date: Fri, 21 Jan 2022 08:08:38 -0800 Subject: [PATCH] Misc Cleanup (#977) * Fixed Day not getting set when reading from epubs. * Fixed typo for "On Going" to "Ongoing" * Removed filtering on Reading List page since it doesn't make sense --- API/Entities/Enums/PublicationStatus.cs | 2 +- API/Services/BookService.cs | 1 + .../card-detail-layout/card-detail-layout.component.html | 5 +++-- .../cards/card-detail-layout/card-detail-layout.component.ts | 4 ++++ UI/Web/src/app/publication-status.pipe.ts | 2 +- .../reading-list/reading-lists/reading-lists.component.html | 1 + 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/API/Entities/Enums/PublicationStatus.cs b/API/Entities/Enums/PublicationStatus.cs index 4d8124391..69f700fc6 100644 --- a/API/Entities/Enums/PublicationStatus.cs +++ b/API/Entities/Enums/PublicationStatus.cs @@ -7,7 +7,7 @@ public enum PublicationStatus /// /// Default Status. Publication is currently in progress /// - [Description("On Going")] + [Description("Ongoing")] OnGoing = 0, /// /// Series is on temp or indefinite Hiatus diff --git a/API/Services/BookService.cs b/API/Services/BookService.cs index 871b7dd32..d4fb303f0 100644 --- a/API/Services/BookService.cs +++ b/API/Services/BookService.cs @@ -384,6 +384,7 @@ namespace API.Services Writer = string.Join(",", epubBook.Schema.Package.Metadata.Creators.Select(c => Parser.Parser.CleanAuthor(c.Creator))), Publisher = string.Join(",", epubBook.Schema.Package.Metadata.Publishers), Month = !string.IsNullOrEmpty(publicationDate) ? DateTime.Parse(publicationDate).Month : 0, + Day = !string.IsNullOrEmpty(publicationDate) ? DateTime.Parse(publicationDate).Day : 0, Year = !string.IsNullOrEmpty(publicationDate) ? DateTime.Parse(publicationDate).Year : 0, Title = epubBook.Title, Genre = string.Join(",", epubBook.Schema.Package.Metadata.Subjects.Select(s => s.ToLower().Trim())), diff --git a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.html b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.html index 7ecb8d71a..ae5d6c414 100644 --- a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.html +++ b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.html @@ -9,12 +9,13 @@ {{pagination.totalItems}} - - +
diff --git a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts index 1bece3ff6..43ccc8378 100644 --- a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts +++ b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts @@ -57,6 +57,10 @@ export class CardDetailLayoutComponent implements OnInit, OnDestroy { @Input() isLoading: boolean = false; @Input() items: any[] = []; @Input() pagination!: Pagination; + /** + * Should filtering be shown on the page + */ + @Input() filteringDisabled: boolean = false; /** * Any actions to exist on the header for the parent collection (library, collection) */ diff --git a/UI/Web/src/app/publication-status.pipe.ts b/UI/Web/src/app/publication-status.pipe.ts index 6aa7516ca..d3beecacd 100644 --- a/UI/Web/src/app/publication-status.pipe.ts +++ b/UI/Web/src/app/publication-status.pipe.ts @@ -8,7 +8,7 @@ export class PublicationStatusPipe implements PipeTransform { transform(value: PublicationStatus): string { switch (value) { - case PublicationStatus.OnGoing: return 'On Going'; + case PublicationStatus.OnGoing: return 'Ongoing'; case PublicationStatus.Hiatus: return 'Hiatus'; case PublicationStatus.Completed: return 'Completed'; diff --git a/UI/Web/src/app/reading-list/reading-lists/reading-lists.component.html b/UI/Web/src/app/reading-list/reading-lists/reading-lists.component.html index 96837060c..70ec078ae 100644 --- a/UI/Web/src/app/reading-list/reading-lists/reading-lists.component.html +++ b/UI/Web/src/app/reading-list/reading-lists/reading-lists.component.html @@ -3,6 +3,7 @@ [items]="lists" [actions]="actions" [pagination]="pagination" + [filteringDisabled]="true" (pageChange)="onPageChange($event)" >