Compare commits
2 Commits
859df0359d
...
2c996a14e2
Author | SHA1 | Date |
---|---|---|
HardiReady | 2c996a14e2 | |
HardiReady | ac83629824 |
|
@ -9,6 +9,7 @@ const codes = require('./http-codes');
|
|||
|
||||
const apiAuthenticationMiddleware = require('../middleware/auth-middleware');
|
||||
const checkHl = require('../middleware/permission-check').checkHl;
|
||||
const checkMT = require('../middleware/permission-check').checkMT;
|
||||
|
||||
const offsetlimitMiddleware = require('../middleware/limitoffset-middleware-mongo');
|
||||
const filterHandlerCreator = require('../middleware/filter-handler-mongo');
|
||||
|
@ -180,7 +181,7 @@ users.route('/:id')
|
|||
});
|
||||
})
|
||||
|
||||
.delete(apiAuthenticationMiddleware, checkHl, (req, res, next) => {
|
||||
.delete(apiAuthenticationMiddleware, checkMT, (req, res, next) => {
|
||||
UserModel.findByIdAndRemove(req.params.id, (err, item) => {
|
||||
if (err) {
|
||||
err.status = codes.wrongrequest;
|
||||
|
|
|
@ -3,7 +3,7 @@ import {Rank} from '../../../models/model-interfaces';
|
|||
import {Fraction} from '../../../utils/fraction.enum';
|
||||
|
||||
@Component({
|
||||
selector: 'pjm-rank-item',
|
||||
selector: 'cc-rank-item',
|
||||
templateUrl: './rank-item.component.html',
|
||||
styleUrls: ['./rank-item.component.css', '../../../style/list-entry.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
(executeSearch)="filterRanks()">
|
||||
</cc-list-search>
|
||||
|
||||
<pjm-rank-item *ngFor="let rank of ranks$ | async"
|
||||
<cc-rank-item *ngFor="let rank of ranks$ | async"
|
||||
[rank]="rank"
|
||||
(rankDelete)="deleteRank(rank)"
|
||||
(rankSelected)="selectRank($event)"
|
||||
[selected]="rank._id == selectedRankId">
|
||||
</pjm-rank-item>
|
||||
</cc-rank-item>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@ import {Squad} from '../../../models/model-interfaces';
|
|||
import {Fraction} from '../../../utils/fraction.enum';
|
||||
|
||||
@Component({
|
||||
selector: 'pjm-squad-item',
|
||||
selector: 'cc-squad-item',
|
||||
templateUrl: './squad-item.component.html',
|
||||
styleUrls: ['./squad-item.component.css', '../../../style/list-entry.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
(executeSearch)="filterSquads()">
|
||||
</cc-list-search>
|
||||
|
||||
<pjm-squad-item *ngFor="let squad of squads$ | async"
|
||||
<cc-squad-item *ngFor="let squad of squads$ | async"
|
||||
[squad]="squad"
|
||||
(squadDelete)="deleteSquad(squad)"
|
||||
(squadSelected)="selectSquad($event)"
|
||||
[selected]="squad._id == selectedSquadId">
|
||||
</pjm-squad-item>
|
||||
</cc-squad-item>
|
||||
</div>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
<div class="col-sm-4">
|
||||
<mat-icon (click)="delete(); $event.stopPropagation()" matTooltip="{{'users.list.tooltip.delete' | translate}}"
|
||||
*ngIf="loginService.hasPermission(3)"
|
||||
class="pull-right" style="margin-top: 8px;" svgIcon="delete"></mat-icon>
|
||||
<mat-icon (click)="award(); $event.stopPropagation()" matTooltip="{{'users.list.tooltip.awards' | translate}}"
|
||||
class="icon-award pull-right" svgIcon="award"></mat-icon>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import {ChangeDetectionStrategy, Component, EventEmitter, Input, Output} from '@angular/core';
|
||||
import {User} from '../../../models/model-interfaces';
|
||||
import {Fraction} from '../../../utils/fraction.enum';
|
||||
import {LoginService} from '../../../services/app-user-service/login-service';
|
||||
|
||||
@Component({
|
||||
selector: 'pjm-user-item',
|
||||
selector: 'cc-user-item',
|
||||
templateUrl: './user-item.component.html',
|
||||
styleUrls: ['./user-item.component.css', '../../../style/list-entry.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
|
@ -20,7 +21,7 @@ export class UserItemComponent {
|
|||
|
||||
readonly fraction = Fraction;
|
||||
|
||||
constructor() {
|
||||
constructor(public loginService: LoginService) {
|
||||
}
|
||||
|
||||
select() {
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
[infiniteScrollDistance]="scrollDistance"
|
||||
[infiniteScrollThrottle]="throttle"
|
||||
(scrolled)="onScrollDown()">
|
||||
<pjm-user-item *ngFor="let user of users$ | async"
|
||||
<cc-user-item *ngFor="let user of users$ | async"
|
||||
[user]="user"
|
||||
(userDelete)="deleteUser(user)"
|
||||
(userSelected)="selectUser($event)"
|
||||
(userAward)="awardUser($event)"
|
||||
[selected]="user._id == selectedUserId">
|
||||
</pjm-user-item>
|
||||
</cc-user-item>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue