mirror of https://github.com/Ombi-app/Ombi
parent
833544694a
commit
b68e9fc080
@ -1,9 +1,9 @@
|
||||
import { Component, ViewEncapsulation, Input, OnInit } from "@angular/core";
|
||||
import { ISearchTvResultV2 } from "../../../../interfaces/ISearchTvResultV2";
|
||||
import { ISearchTvResultV2 } from "../../../../../interfaces/ISearchTvResultV2";
|
||||
|
||||
@Component({
|
||||
templateUrl: "./tv-information-panel.component.html",
|
||||
styleUrls: ["../../../media-details.component.scss"],
|
||||
styleUrls: ["../../../../media-details.component.scss"],
|
||||
selector: "tv-information-panel",
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
@ -0,0 +1,78 @@
|
||||
<mat-accordion class="mat-elevation-z8">
|
||||
|
||||
<mat-expansion-panel *ngFor="let request of tvRequest">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
<div *ngIf="request.approved && !request.available">{{'Common.ProcessingRequest' | translate}}</div>
|
||||
<div *ngIf="request.requested && !request.approved && !request.available">
|
||||
{{'Common.PendingApproval' | translate}}
|
||||
</div>
|
||||
<div *ngIf="!request.requested && !request.available && !request.approved">
|
||||
{{'Common.NotRequested' | translate}}
|
||||
</div>
|
||||
<div *ngIf="request.available">{{'Common.Available' | translate}}
|
||||
</div>
|
||||
</mat-panel-title>
|
||||
<mat-panel-description>
|
||||
Requested By '{{request.requestedUser.userAlias}}' on
|
||||
{{request.requestedDate | amLocal | amDateFormat: 'LL' }}
|
||||
</mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
|
||||
<mat-tab-group *ngFor="let season of request.seasonRequests">
|
||||
<mat-tab label="{{ 'Requests.Season' | translate }} {{season.seasonNumber}}">
|
||||
|
||||
<table mat-table [dataSource]="season.episodes" class="mat-elevation-z8">
|
||||
|
||||
|
||||
<ng-container matColumnDef="number">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ 'Requests.Number' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.episodeNumber}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ 'Requests.GridTitle' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.title}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="airDate">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ 'Requests.AirDate' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.airDate | amLocal | amDateFormat: 'L' }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ 'Requests.GridStatus' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let ep">
|
||||
|
||||
<span *ngIf="request.denied" class="label label-danger" id="deniedLabel"
|
||||
[translate]="'Common.Denied'">
|
||||
<i class="fa fa-check" matTooltip="{{request.deniedReason}}"></i>
|
||||
</span>
|
||||
<span *ngIf="!request.denied && ep.available" class="label label-success"
|
||||
id="availableLabel" [translate]="'Common.Available'"></span>
|
||||
<span *ngIf="!request.denied &&ep.approved && !ep.available" class="label label-info"
|
||||
id="processingRequestLabel" [translate]="'Common.ProcessingRequest'"></span>
|
||||
<div *ngIf="!request.denied && !ep.approved">
|
||||
<div *ngIf="!ep.available"><span class="label label-warning" id="pendingApprovalLabel"
|
||||
[translate]="'Common.PendingApproval'"></span></div>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
|
||||
<button mat-raised-button color="accent">Approve</button>
|
||||
|
||||
|
||||
|
||||
|
||||
</mat-expansion-panel>
|
||||
|
||||
</mat-accordion>
|
@ -0,0 +1,16 @@
|
||||
import { Component, ViewEncapsulation, Input, OnInit } from "@angular/core";
|
||||
import { IChildRequests } from "../../../../../interfaces";
|
||||
|
||||
@Component({
|
||||
templateUrl: "./tv-requests-panel.component.html",
|
||||
styleUrls: ["./tv-requests-panel.component.scss"],
|
||||
selector: "tv-requests-panel"
|
||||
})
|
||||
export class TvRequestsPanelComponent implements OnInit {
|
||||
@Input() public tvRequest: IChildRequests[];
|
||||
|
||||
public displayedColumns: string[] = ['number', 'title', 'airDate', 'status'];
|
||||
public ngOnInit(): void {
|
||||
//
|
||||
}
|
||||
}
|
Loading…
Reference in new issue