clean up code
parent
162453c894
commit
d1f53f78c9
|
@ -51,7 +51,6 @@ export class AwardUserComponent implements OnInit {
|
|||
.subscribe(id => this.userId = id);
|
||||
}
|
||||
|
||||
|
||||
toggleDecoPreview(descriptionField, decorationId, image) {
|
||||
if (decorationId !== '0') {
|
||||
this.decoPreviewDisplay = 'flex'; // visible & keep same height for all children
|
||||
|
@ -72,10 +71,10 @@ export class AwardUserComponent implements OnInit {
|
|||
const reason = reasonField.value;
|
||||
if (decorationId && reason.length > 0) {
|
||||
const award = {
|
||||
'userId': this.userId,
|
||||
'decorationId': decorationId,
|
||||
'reason': reason,
|
||||
'date': Date.now()
|
||||
userId: this.userId,
|
||||
decorationId: decorationId,
|
||||
reason: reason,
|
||||
date: Date.now()
|
||||
};
|
||||
this.awardingService.addAwarding(award).subscribe(() => {
|
||||
this.awardingService.getUserAwardings(this.userId)
|
||||
|
|
|
@ -53,7 +53,9 @@ export class EditUserComponent implements OnInit {
|
|||
user.squadId = '0';
|
||||
this.ranksDisplay = 'none';
|
||||
} else {
|
||||
this.rankService.findRanks('', user.squadId.fraction).subscribe(ranks => {
|
||||
this.rankService
|
||||
.findRanks('', user.squadId.fraction)
|
||||
.subscribe(ranks => {
|
||||
this.ranks = ranks;
|
||||
this.ranksDisplay = 'block';
|
||||
});
|
||||
|
@ -68,7 +70,9 @@ export class EditUserComponent implements OnInit {
|
|||
|
||||
toggleRanks() {
|
||||
if (this.user.squadId !== '0') {
|
||||
this.rankService.findRanks('', this.user.squadId.fraction).subscribe(
|
||||
this.rankService
|
||||
.findRanks('', this.user.squadId.fraction)
|
||||
.subscribe(
|
||||
ranks => {
|
||||
this.ranks = ranks;
|
||||
this.ranksDisplay = 'block';
|
||||
|
|
|
@ -34,6 +34,5 @@ export class UserItemComponent {
|
|||
delete() {
|
||||
this.userDelete.emit(this.user);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ export class UserListComponent implements OnInit {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.users$ = this.userService.users$;
|
||||
|
||||
const paramsStream = this.route.queryParams
|
||||
|
@ -106,5 +105,4 @@ export class UserListComponent implements OnInit {
|
|||
|
||||
this.location.replaceState(absoluteUrl, queryPart);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue