mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Fixed the sort issue on the user Management page.
Also added sorting to the Movie Requests page
This commit is contained in:
parent
c2ca4824b7
commit
3e2cdb9823
9 changed files with 83 additions and 26 deletions
|
@ -13,15 +13,15 @@
|
|||
<span [hidden]="reverse"><i class="fa fa-arrow-down" aria-hidden="true"></i></span><span [hidden]="!reverse"><i class="fa fa-arrow-up" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="setOrder('issue.status')">
|
||||
<th (click)="setOrder('status')">
|
||||
<a [translate]="'Issues.Status'"></a>
|
||||
<span *ngIf="order === 'issue.status'">
|
||||
<span *ngIf="order === 'status'">
|
||||
<span [hidden]="reverse"><i class="fa fa-arrow-down" aria-hidden="true"></i></span><span [hidden]="!reverse"><i class="fa fa-arrow-up" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="setOrder('issue.reportedUser')">
|
||||
<th (click)="setOrder('reportedUser')">
|
||||
<a [translate]="'Issues.ReportedBy'"></a>
|
||||
<span *ngIf="order === 'issue.reportedUser'">
|
||||
<span *ngIf="order === 'reportedUser'">
|
||||
<span [hidden]="reverse"><i class="fa fa-arrow-down" aria-hidden="true"></i></span><span [hidden]="!reverse"><i class="fa fa-arrow-up" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</th>
|
||||
|
|
|
@ -4,9 +4,49 @@
|
|||
<input type="text" id="search" class="form-control form-control-custom searchwidth" placeholder="Search" (keyup)="search($event)">
|
||||
<span class="input-group-btn">
|
||||
<button id="filterBtn" class="btn btn-sm btn-info-outline" (click)="filterDisplay = !filterDisplay" >
|
||||
<i class="fa fa-filter"></i> {{ 'Requests.Filter' | translate }}</button>
|
||||
<!-- <button id="filterBtn" class="btn btn-sm btn-warning-outline" (click)="sortDisplay = !sortDisplay" >
|
||||
<i class="fa fa-sort"></i> {{ 'Requests.Sort' | translate }}</button> -->
|
||||
<i class="fa fa-filter"></i> {{ 'Requests.Filter' | translate }}
|
||||
</button>
|
||||
|
||||
|
||||
<button class="btn btn-sm btn-primary-outline dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<i class="fa fa-sort"></i> {{ 'Requests.Sort' | translate }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
|
||||
<li>
|
||||
<a (click)="setOrder('requestedDate')">{{ 'Requests.SortRequestDate' | translate }}
|
||||
<span *ngIf="order === 'requestedDate'">
|
||||
<span [hidden]="reverse"><small><i class="fa fa-arrow-down" aria-hidden="true"></i></small></span>
|
||||
<span [hidden]="!reverse"><small><i class="fa fa-arrow-up" aria-hidden="true"></i></small></span>
|
||||
</span>
|
||||
</a>
|
||||
<a (click)="setOrder('title')">{{ 'Requests.SortTitle' | translate}}
|
||||
<span *ngIf="order === 'title'">
|
||||
<span [hidden]="reverse"><small><i class="fa fa-arrow-down" aria-hidden="true"></i></small></span>
|
||||
<span [hidden]="!reverse"><small><i class="fa fa-arrow-up" aria-hidden="true"></i></small></span>
|
||||
</span>
|
||||
</a>
|
||||
<a (click)="setOrder('releaseDate')">{{ 'Requests.TheatricalReleaseSort' | translate }}
|
||||
<span *ngIf="order === 'releaseDate'">
|
||||
<span [hidden]="reverse"><small><i class="fa fa-arrow-down" aria-hidden="true"></i></small></span>
|
||||
<span [hidden]="!reverse"><small><i class="fa fa-arrow-up" aria-hidden="true"></i></small></span>
|
||||
</span>
|
||||
</a>
|
||||
<a (click)="setOrder('requestedUser.userAlias')">{{ 'Requests.SortRequestedBy' | translate }}
|
||||
<span *ngIf="order === 'requestedUser.userAlias'">
|
||||
<span [hidden]="reverse"><small><i class="fa fa-arrow-down" aria-hidden="true"></i></small></span>
|
||||
<span [hidden]="!reverse"><small><i class="fa fa-arrow-up" aria-hidden="true"></i></small></span>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a (click)="setOrder('status')">{{ 'Requests.SortStatus' | translate }}
|
||||
<span *ngIf="order === 'status'">
|
||||
<span [hidden]="reverse"><small><i class="fa fa-arrow-down" aria-hidden="true"></i></small></span>
|
||||
<span [hidden]="!reverse"><small><i class="fa fa-arrow-up" aria-hidden="true"></i></small></span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
@ -19,7 +59,7 @@
|
|||
<div infinite-scroll [infiniteScrollDistance]="1" [infiniteScrollThrottle]="100" (scrolled)="loadMore()">
|
||||
|
||||
|
||||
<div *ngFor="let request of movieRequests">
|
||||
<div *ngFor="let request of movieRequests | orderBy: order : reverse : 'case-insensitive'">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
|
|
@ -36,7 +36,8 @@ export class MovieRequestsComponent implements OnInit {
|
|||
public filter: IFilter;
|
||||
public filterType = FilterType;
|
||||
|
||||
public sortDisplay: boolean;
|
||||
public order: string = "requestedDate";
|
||||
public reverse = false;
|
||||
|
||||
private currentlyLoaded: number;
|
||||
private amountToLoad: number;
|
||||
|
@ -174,6 +175,14 @@ export class MovieRequestsComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
public setOrder(value: string) {
|
||||
if (this.order === value) {
|
||||
this.reverse = !this.reverse;
|
||||
}
|
||||
|
||||
this.order = value;
|
||||
}
|
||||
|
||||
private loadRequests(amountToLoad: number, currentlyLoaded: number) {
|
||||
this.requestService.getMovieRequests(amountToLoad, currentlyLoaded + 1)
|
||||
.subscribe(x => {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { RouterModule, Routes } from "@angular/router";
|
||||
|
||||
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
||||
import { OrderModule } from "ngx-order-pipe";
|
||||
|
||||
import { InfiniteScrollModule } from "ngx-infinite-scroll";
|
||||
|
||||
|
@ -34,6 +35,7 @@ const routes: Routes = [
|
|||
TreeTableModule,
|
||||
SharedModule,
|
||||
SidebarModule,
|
||||
OrderModule,
|
||||
],
|
||||
declarations: [
|
||||
RequestComponent,
|
||||
|
|
|
@ -16,44 +16,45 @@
|
|||
</td>
|
||||
</a>
|
||||
</th>
|
||||
<th (click)="setOrder('u.userName')">
|
||||
<th (click)="setOrder('userName')">
|
||||
<a>
|
||||
Username
|
||||
</a>
|
||||
<span *ngIf="order === 'u.userName'">
|
||||
<span *ngIf="order === 'userName'">
|
||||
<span [hidden]="reverse"><i class="fa fa-arrow-down" aria-hidden="true"></i></span><span [hidden]="!reverse"><i class="fa fa-arrow-up" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="setOrder('u.alias')">
|
||||
<th (click)="setOrder('alias')">
|
||||
<a>
|
||||
Alias
|
||||
</a>
|
||||
<span *ngIf="order === 'u.alias'">
|
||||
<span *ngIf="order === 'alias'">
|
||||
<span [hidden]="reverse"><i class="fa fa-arrow-down" aria-hidden="true"></i></span><span [hidden]="!reverse"><i class="fa fa-arrow-up" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="setOrder('u.emailAddress')">
|
||||
<th (click)="setOrder('emailAddress')">
|
||||
<a>
|
||||
Email
|
||||
</a>
|
||||
<span *ngIf="order === 'u.emailAddress'">
|
||||
<span [hidden]="reverse"><i class="fa fa-arrow-down" aria-hidden="true"></i></span><span [hidden]="!reverse"><i class="fa fa-arrow-up" aria-hidden="true"></i></span>
|
||||
<span *ngIf="order === 'emailAddress'">
|
||||
<span [hidden]="reverse"><i class="fa fa-arrow-down" aria-hidden="true"></i></span>
|
||||
<span [hidden]="!reverse"><i class="fa fa-arrow-up" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</th>
|
||||
<th>
|
||||
Roles
|
||||
</th>
|
||||
<th (click)="setOrder('u.lastLoggedIn')">
|
||||
<th (click)="setOrder('lastLoggedIn')">
|
||||
<a> Last Logged In</a>
|
||||
<span *ngIf="order === 'u.lastLoggedIn'">
|
||||
<span *ngIf="order === 'lastLoggedIn'">
|
||||
<span [hidden]="reverse"><i class="fa fa-arrow-down" aria-hidden="true"></i></span><span [hidden]="!reverse"><i class="fa fa-arrow-up" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="setOrder('u.userType')">
|
||||
<th (click)="setOrder('userType')">
|
||||
<a>
|
||||
User Type
|
||||
</a>
|
||||
<span *ngIf="order === 'u.userType'">
|
||||
<span *ngIf="order === 'userType'">
|
||||
<span [hidden]="reverse"><i class="fa fa-arrow-down" aria-hidden="true"></i></span><span [hidden]="!reverse"><i class="fa fa-arrow-up" aria-hidden="true"></i></span>
|
||||
</span>
|
||||
</th>
|
||||
|
|
|
@ -13,7 +13,7 @@ export class UserManagementComponent implements OnInit {
|
|||
public emailSettings: IEmailNotificationSettings;
|
||||
public customizationSettings: ICustomizationSettings;
|
||||
|
||||
public order: string = "u.userName";
|
||||
public order: string = "userName";
|
||||
public reverse = false;
|
||||
|
||||
public showBulkEdit = false;
|
||||
|
|
6
src/Ombi/package-lock.json
generated
6
src/Ombi/package-lock.json
generated
|
@ -4972,9 +4972,9 @@
|
|||
"integrity": "sha512-7lASze8zHSDdAAFO3VNop1TY60rs8A7sm8DzQfU33VNcJI27F6mtxwjILIH339s7m6HVC08AS7I64HBjBMw/QQ=="
|
||||
},
|
||||
"ngx-order-pipe": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ngx-order-pipe/-/ngx-order-pipe-1.1.1.tgz",
|
||||
"integrity": "sha512-hIfdUONbKG14/S5zEyGjr1ukAd2XdUUnUsvA80ct3pyoBCh5aQ7XhBz7N9jCsVzMGTGUPK6R59KYkEPB3n5hbQ=="
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ngx-order-pipe/-/ngx-order-pipe-2.0.1.tgz",
|
||||
"integrity": "sha512-t0IUqoNs3705yZQeohmhUQvpiRTj5RX7AhFXkx3PMfq7G6h7GNNrR3x27XbXEsjKgBo5hPgfEfW5OljRYa1VVw=="
|
||||
},
|
||||
"ngx-window-token": {
|
||||
"version": "0.0.4",
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
"ng2-cookies": "^1.0.12",
|
||||
"ngx-clipboard": "8.1.1",
|
||||
"ngx-infinite-scroll": "^0.6.1",
|
||||
"ngx-order-pipe": "^1.1.1",
|
||||
"ngx-order-pipe": "^2.0.1",
|
||||
"node-sass": "^4.7.2",
|
||||
"npm": "^5.6.0",
|
||||
"pace-progress": "^1.0.2",
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
"RequestStatus": "Request status:",
|
||||
"Denied": " Denied:",
|
||||
"TheatricalRelease": "Theatrical Release: {{date}}",
|
||||
"TheatricalReleaseSort": "Theatrical Release",
|
||||
"DigitalRelease": "Digital Release: {{date}}",
|
||||
"RequestDate": "Request Date:",
|
||||
"QualityOverride": "Quality Override:",
|
||||
|
@ -134,7 +135,11 @@
|
|||
"ReportIssue":"Report Issue",
|
||||
"Filter":"Filter",
|
||||
"Sort":"Sort",
|
||||
"SeasonNumberHeading":"Season: {seasonNumber}"
|
||||
"SeasonNumberHeading":"Season: {seasonNumber}",
|
||||
"SortTitle":"Title",
|
||||
"SortRequestDate": "Request Date",
|
||||
"SortRequestedBy":"Requested By",
|
||||
"SortStatus":"Status"
|
||||
},
|
||||
"Issues":{
|
||||
"Title":"Issues",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue