mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-06 13:11:13 -07:00
fix(discover): Fix denied requests displayed as approved (#4901)
This commit is contained in:
parent
bdc0214e1f
commit
1e87f20104
4 changed files with 13 additions and 2 deletions
|
@ -16,6 +16,7 @@ namespace Ombi.Core.Models.Requests
|
|||
public string Overview { get; set; }
|
||||
public DateTime ReleaseDate { get; set; }
|
||||
public bool Approved { get; set; }
|
||||
public bool Denied { get; set; }
|
||||
public string MediaId { get; set; }
|
||||
|
||||
public string PosterPath { get; set; }
|
||||
|
|
|
@ -88,6 +88,7 @@ namespace Ombi.Core.Services
|
|||
Title = item.Title,
|
||||
Type = RequestType.Movie,
|
||||
Approved = item.Approved,
|
||||
Denied = item.Denied ?? false,
|
||||
UserId = item.RequestedUserId,
|
||||
Username = item.RequestedUser.UserAlias,
|
||||
MediaId = item.TheMovieDbId.ToString(),
|
||||
|
@ -108,6 +109,7 @@ namespace Ombi.Core.Services
|
|||
Available = item.Available,
|
||||
Overview = item.ArtistName,
|
||||
Approved = item.Approved,
|
||||
Denied = item.Denied ?? false,
|
||||
ReleaseDate = item.ReleaseDate,
|
||||
RequestDate = item.RequestedDate,
|
||||
Title = item.Title,
|
||||
|
@ -135,6 +137,7 @@ namespace Ombi.Core.Services
|
|||
Overview = item.ParentRequest.Overview,
|
||||
ReleaseDate = item.ParentRequest.ReleaseDate,
|
||||
Approved = item.Approved,
|
||||
Denied = item.Denied ?? false,
|
||||
RequestDate = item.RequestedDate,
|
||||
TvPartiallyAvailable = partialAvailability,
|
||||
Title = item.ParentRequest.Title,
|
||||
|
|
|
@ -41,6 +41,9 @@ export class DetailedCardComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
public getStatus(request: IRecentlyRequested) {
|
||||
if (request.denied) {
|
||||
return "Common.Denied";
|
||||
}
|
||||
if (request.available) {
|
||||
return "Common.Available";
|
||||
}
|
||||
|
@ -63,6 +66,9 @@ export class DetailedCardComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
public getClass(request: IRecentlyRequested) {
|
||||
if (request.denied) {
|
||||
return "danger";
|
||||
}
|
||||
if (request.available || request.tvPartiallyAvailable) {
|
||||
return "success";
|
||||
}
|
||||
|
@ -113,7 +119,7 @@ export class DetailedCardComponent implements OnInit, OnDestroy {
|
|||
this.setBackgroundStyle(this.request.background);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Set background style while image path is loading.
|
||||
this.setBackgroundStyle(null);
|
||||
switch (this.request.type) {
|
||||
|
|
|
@ -11,9 +11,10 @@ export interface IRecentlyRequested {
|
|||
overview: string;
|
||||
releaseDate: Date;
|
||||
approved: boolean;
|
||||
denied: boolean;
|
||||
mediaId: string;
|
||||
type: RequestType;
|
||||
|
||||
posterPath: string;
|
||||
background: string;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue