Fix unrated chapters displaying 0
This commit is contained in:
parent
f85703eca2
commit
a9e2937651
4 changed files with 4 additions and 2 deletions
|
|
@ -39,6 +39,7 @@ public class UserReviewDto
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
public int TotalVotes { get; set; }
|
public int TotalVotes { get; set; }
|
||||||
public float Rating { get; set; }
|
public float Rating { get; set; }
|
||||||
|
public bool HasBeenRated { get; set; }
|
||||||
public string? RawBody { get; set; }
|
public string? RawBody { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// How many upvotes this review has gotten
|
/// How many upvotes this review has gotten
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ export interface UserReview {
|
||||||
volumeId?: number;
|
volumeId?: number;
|
||||||
chapterId?: number;
|
chapterId?: number;
|
||||||
rating: number;
|
rating: number;
|
||||||
|
hasBeenRated: boolean;
|
||||||
score: number;
|
score: number;
|
||||||
username: string;
|
username: string;
|
||||||
body: string;
|
body: string;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
<app-external-rating [seriesId]="series.id"
|
<app-external-rating [seriesId]="series.id"
|
||||||
[ratings]="[]"
|
[ratings]="[]"
|
||||||
[userRating]="rating?.rating || 0"
|
[userRating]="rating?.rating || 0"
|
||||||
[hasUserRated]="rating !== undefined"
|
[hasUserRated]="rating !== undefined && rating.hasBeenRated"
|
||||||
[libraryType]="libraryType!"
|
[libraryType]="libraryType!"
|
||||||
[chapterId]="chapterId"
|
[chapterId]="chapterId"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<app-external-rating [seriesId]="series.id"
|
<app-external-rating [seriesId]="series.id"
|
||||||
[ratings]="[]"
|
[ratings]="[]"
|
||||||
[userRating]="rating?.rating || 0"
|
[userRating]="rating?.rating || 0"
|
||||||
[hasUserRated]="rating !== undefined"
|
[hasUserRated]="rating !== undefined && rating.hasBeenRated"
|
||||||
[libraryType]="libraryType"
|
[libraryType]="libraryType"
|
||||||
[chapterId]="volume.chapters[0].id"
|
[chapterId]="volume.chapters[0].id"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue