Showing 44 of 281 total issues
File teams-view.component.ts
has 505 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component, OnInit, OnDestroy, ViewChild, AfterViewChecked, ViewEncapsulation } from '@angular/core';
import { CouchService } from '../shared/couchdb.service';
import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { MatTab } from '@angular/material/tabs';
File courses.component.ts
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component, OnInit, AfterViewInit, ViewChild, OnDestroy, HostListener, Input, OnChanges } from '@angular/core';
import { CouchService } from '../shared/couchdb.service';
import { DialogsPromptComponent } from '../shared/dialogs/dialogs-prompt.component';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { MatPaginator, PageEvent } from '@angular/material/paginator';
CoursesComponent
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
selector: 'planet-courses',
templateUrl: './courses.component.html',
styleUrls: [ './courses.scss' ]
})
TeamsViewComponent
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
templateUrl: './teams-view.component.html',
styleUrls: [ './teams-view.scss' ],
encapsulation: ViewEncapsulation.None
})
ResourcesComponent
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
selector: 'planet-resources',
templateUrl: './resources.component.html',
styleUrls: [ './resources.scss' ],
encapsulation: ViewEncapsulation.None
File community.component.ts
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component, OnInit, OnDestroy, ViewEncapsulation, HostListener } from '@angular/core';
import { Subject, forkJoin, of, throwError } from 'rxjs';
import { takeUntil, finalize, switchMap, map, catchError, tap } from 'rxjs/operators';
import { StateService } from '../shared/state.service';
import { NewsService } from '../news/news.service';
UserService
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Injectable({
providedIn: 'root'
})
export class UserService {
private user: any = { name: '' };
File exams-view.component.ts
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component, OnInit, OnDestroy, Input } from '@angular/core';
import { CoursesService } from '../courses/courses.service';
import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Subject, forkJoin, of } from 'rxjs';
import { takeUntil, switchMap, catchError } from 'rxjs/operators';
File manager-dashboard.component.ts
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component, OnInit, isDevMode, OnDestroy } from '@angular/core';
import { UserService } from '../shared/user.service';
import { CouchService } from '../shared/couchdb.service';
import { findDocuments } from '../shared/mangoQueries';
import { switchMap, takeUntil } from 'rxjs/operators';
File resources-add.component.ts
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { UserService } from '../shared/user.service';
import {
FormBuilder,
ReportsService
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Injectable({
providedIn: 'root'
})
export class ReportsService {
TeamsService
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Injectable({
providedIn: 'root'
})
export class TeamsService {
File surveys.component.ts
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component, OnInit, ViewChild, AfterViewInit, OnDestroy } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { FormGroup } from '@angular/forms';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { MatPaginator, PageEvent } from '@angular/material/paginator';
PlanetTagInputComponent
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
'selector': 'planet-tag-input',
'templateUrl': './planet-tag-input.component.html',
'styleUrls': [ 'planet-tag-input.scss' ],
'providers': [
Function generatePDF
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
generatePDF() {
const formattedBirthDate = format(new Date(this.user.birthDate), 'MMM d, y, h:mm:ss a');
let contentArray = [
{
text: `${`${this.user.firstName}'s achievements`}`,
PlanetTagInputDialogComponent
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
'templateUrl': 'planet-tag-input-dialog.component.html',
'styles': [ `
:host .mat-list-option span {
font-weight: inherit;
ChatSidebarComponent
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
selector: 'planet-chat-sidebar',
templateUrl: './chat-sidebar.component.html',
styleUrls: [ './chat-sidebar.scss' ],
})
CoursesProgressLeaderComponent
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
templateUrl: 'courses-progress-leader.component.html',
styleUrls: [ 'courses-progress.scss' ]
})
export class CoursesProgressLeaderComponent implements OnInit, OnDestroy {
Function ngOnInit
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ngOnInit() {
if (this.route.snapshot.data.update) {
this.initUpdate();
}
this.loginForm = this.formBuilder.group({
File teams.component.ts
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component, OnInit, ViewChild, AfterViewInit, Input, EventEmitter, Output, HostListener } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';