mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Merge branch 'feature/v4' of https://github.com/tidusjar/Ombi into feature/v4
This commit is contained in:
commit
723aa3fffc
3 changed files with 26 additions and 10 deletions
|
@ -33,5 +33,28 @@ namespace Ombi.Store.Entities.Requests
|
|||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
public string LanguageCode => LangCode.IsNullOrEmpty() ? "en" : LangCode;
|
||||
|
||||
[NotMapped]
|
||||
public string RequestStatus {
|
||||
get
|
||||
{
|
||||
if (Approved & Available)
|
||||
{
|
||||
return "Common.Available";
|
||||
}
|
||||
|
||||
if (Approved & !Available)
|
||||
{
|
||||
return "Common.ProcessingRequest";
|
||||
}
|
||||
|
||||
if (!Approved && !Available)
|
||||
{
|
||||
return "Common.PendingApproval";
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ export interface IMovieRequests extends IFullBaseRequest {
|
|||
digitalReleaseDate: Date;
|
||||
subscribed: boolean;
|
||||
showSubscribe: boolean;
|
||||
requestStatus: string;
|
||||
|
||||
// For the UI
|
||||
rootPathOverrideTitle: string;
|
||||
|
|
|
@ -37,16 +37,8 @@
|
|||
|
||||
|
||||
<ng-container matColumnDef="requestStatus">
|
||||
<th mat-header-cell *matHeaderCellDef > Request Status </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<div *ngIf="element.approved && !element.available">{{'Common.ProcessingRequest' | translate}}</div>
|
||||
<div *ngIf="element.requested && !element.approved && !element.available">{{'Common.PendingApproval' |
|
||||
translate}}
|
||||
</div>
|
||||
<div *ngIf="!element.requested && !element.available && !element.approved">{{'Common.NotRequested' |
|
||||
translate}}
|
||||
</div>
|
||||
</td>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> Request Status </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.requestStatus | translate}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue