mirror of
https://github.com/simon987/task_tracker.git
synced 2025-04-19 10:16:41 +00:00
Fix codefactor issues
This commit is contained in:
parent
39dd89b001
commit
0e387d32c1
1386
web/angular/package-lock.json
generated
1386
web/angular/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -32,7 +32,7 @@
|
|||||||
"zone.js": "~0.8.26"
|
"zone.js": "~0.8.26"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "~0.12.0",
|
"@angular-devkit/build-angular": "^0.13.9",
|
||||||
"@angular/cli": "^7.2.4",
|
"@angular/cli": "^7.2.4",
|
||||||
"@angular/compiler-cli": "^7.2.6",
|
"@angular/compiler-cli": "^7.2.6",
|
||||||
"@angular/language-service": "~7.2.0",
|
"@angular/language-service": "~7.2.0",
|
||||||
|
@ -32,7 +32,7 @@ export class LoginComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
canCreate(): boolean {
|
canCreate(): boolean {
|
||||||
return this.credentials.username && this.credentials.username != '' &&
|
return this.credentials.username && this.credentials.username !== '' &&
|
||||||
this.credentials.password === this.credentials.repeatPassword;
|
this.credentials.password === this.credentials.repeatPassword;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -404,7 +404,7 @@ export class ProjectDashboardComponent implements OnInit {
|
|||||||
|
|
||||||
private calculateEta() {
|
private calculateEta() {
|
||||||
if (this.snapshots.length > 0) {
|
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) {
|
if (new_tasks === 0) {
|
||||||
this.eta = 'N/A';
|
this.eta = 'N/A';
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import {AuthService} from '../auth.service';
|
|||||||
import {Manager, ManagerRoleOnProject} from '../models/manager';
|
import {Manager, ManagerRoleOnProject} from '../models/manager';
|
||||||
import {MessengerService} from '../messenger.service';
|
import {MessengerService} from '../messenger.service';
|
||||||
import {TranslateService} from '@ngx-translate/core';
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
import {Worker} from "../models/worker";
|
import {Worker} from '../models/worker';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-project-perms',
|
selector: 'app-project-perms',
|
||||||
|
@ -2,10 +2,10 @@ import {Component, OnInit} from '@angular/core';
|
|||||||
import {ApiService} from '../api.service';
|
import {ApiService} from '../api.service';
|
||||||
|
|
||||||
import {Chart} from 'chart.js';
|
import {Chart} from 'chart.js';
|
||||||
import {AuthService} from "../auth.service";
|
import {AuthService} from '../auth.service';
|
||||||
import {Worker} from "../models/worker";
|
import {Worker} from '../models/worker';
|
||||||
import {TranslateService} from "@ngx-translate/core";
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
import {MessengerService} from "../messenger.service";
|
import {MessengerService} from '../messenger.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-worker-dashboard',
|
selector: 'app-worker-dashboard',
|
||||||
@ -42,9 +42,9 @@ export class WorkerDashboardComponent implements OnInit {
|
|||||||
|
|
||||||
public getInfo(w: Worker) {
|
public getInfo(w: Worker) {
|
||||||
|
|
||||||
if (this.workerInfo && this.workerInfo.id == w.id) {
|
if (this.workerInfo && this.workerInfo.id === w.id) {
|
||||||
this.workerInfo = undefined;
|
this.workerInfo = undefined;
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.apiService.getWorker(w.id)
|
this.apiService.getWorker(w.id)
|
||||||
@ -92,7 +92,7 @@ export class WorkerDashboardComponent implements OnInit {
|
|||||||
private updateChart(data) {
|
private updateChart(data) {
|
||||||
|
|
||||||
data = data
|
data = data
|
||||||
.filter(w => !w.alias.startsWith("$"))
|
.filter(w => !w.alias.startsWith('$'))
|
||||||
.sort((a, b) => b.closed_task_count - a.closed_task_count);
|
.sort((a, b) => b.closed_task_count - a.closed_task_count);
|
||||||
|
|
||||||
this.chart.data.labels = data.map(w => w.alias);
|
this.chart.data.labels = data.map(w => w.alias);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user