Fix codefactor issues

This commit is contained in:
simon987 2019-05-13 17:32:28 -04:00
parent 39dd89b001
commit 0e387d32c1
6 changed files with 677 additions and 737 deletions

File diff suppressed because it is too large Load Diff

View File

@ -32,7 +32,7 @@
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.12.0",
"@angular-devkit/build-angular": "^0.13.9",
"@angular/cli": "^7.2.4",
"@angular/compiler-cli": "^7.2.6",
"@angular/language-service": "~7.2.0",

View File

@ -32,7 +32,7 @@ export class LoginComponent implements OnInit {
}
canCreate(): boolean {
return this.credentials.username && this.credentials.username != '' &&
return this.credentials.username && this.credentials.username !== '' &&
this.credentials.password === this.credentials.repeatPassword;
}
}

View File

@ -404,7 +404,7 @@ export class ProjectDashboardComponent implements OnInit {
private calculateEta() {
if (this.snapshots.length > 0) {
let new_tasks = this.snapshots[this.snapshots.length - 1].new_task_count;
const new_tasks = this.snapshots[this.snapshots.length - 1].new_task_count;
if (new_tasks === 0) {
this.eta = 'N/A';
}

View File

@ -9,7 +9,7 @@ import {AuthService} from '../auth.service';
import {Manager, ManagerRoleOnProject} from '../models/manager';
import {MessengerService} from '../messenger.service';
import {TranslateService} from '@ngx-translate/core';
import {Worker} from "../models/worker";
import {Worker} from '../models/worker';
@Component({
selector: 'app-project-perms',

View File

@ -2,10 +2,10 @@ import {Component, OnInit} from '@angular/core';
import {ApiService} from '../api.service';
import {Chart} from 'chart.js';
import {AuthService} from "../auth.service";
import {Worker} from "../models/worker";
import {TranslateService} from "@ngx-translate/core";
import {MessengerService} from "../messenger.service";
import {AuthService} from '../auth.service';
import {Worker} from '../models/worker';
import {TranslateService} from '@ngx-translate/core';
import {MessengerService} from '../messenger.service';
@Component({
selector: 'app-worker-dashboard',
@ -42,9 +42,9 @@ export class WorkerDashboardComponent implements OnInit {
public getInfo(w: Worker) {
if (this.workerInfo && this.workerInfo.id == w.id) {
if (this.workerInfo && this.workerInfo.id === w.id) {
this.workerInfo = undefined;
return
return;
}
this.apiService.getWorker(w.id)
@ -92,7 +92,7 @@ export class WorkerDashboardComponent implements OnInit {
private updateChart(data) {
data = data
.filter(w => !w.alias.startsWith("$"))
.filter(w => !w.alias.startsWith('$'))
.sort((a, b) => b.closed_task_count - a.closed_task_count);
this.chart.data.labels = data.map(w => w.alias);