open-learning-exchange/planet

View on GitHub

Showing 44 of 281 total issues

File teams-view.component.ts has 505 lines of code (exceeds 250 allowed). Consider refactoring.
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';
Severity: Major
Found in src/app/teams/teams-view.component.ts - About 1 day to fix

    File courses.component.ts has 424 lines of code (exceeds 250 allowed). Consider refactoring.
    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';
    Severity: Minor
    Found in src/app/courses/courses.component.ts - About 6 hrs to fix

      CoursesComponent has 42 functions (exceeds 20 allowed). Consider refactoring.
      Open

      @Component({
        selector: 'planet-courses',
        templateUrl: './courses.component.html',
        styleUrls: [ './courses.scss' ]
      })
      Severity: Minor
      Found in src/app/courses/courses.component.ts - About 5 hrs to fix

        TeamsViewComponent has 38 functions (exceeds 20 allowed). Consider refactoring.
        Open

        @Component({
          templateUrl: './teams-view.component.html',
          styleUrls: [ './teams-view.scss' ],
          encapsulation: ViewEncapsulation.None
        })
        Severity: Minor
        Found in src/app/teams/teams-view.component.ts - About 5 hrs to fix

          ResourcesComponent has 32 functions (exceeds 20 allowed). Consider refactoring.
          Open

          @Component({
            selector: 'planet-resources',
            templateUrl: './resources.component.html',
            styleUrls: [ './resources.scss' ],
            encapsulation: ViewEncapsulation.None
          Severity: Minor
          Found in src/app/resources/resources.component.ts - About 4 hrs to fix

            File community.component.ts has 301 lines of code (exceeds 250 allowed). Consider refactoring.
            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';
            Severity: Minor
            Found in src/app/community/community.component.ts - About 3 hrs to fix

              UserService has 27 functions (exceeds 20 allowed). Consider refactoring.
              Open

              @Injectable({
                providedIn: 'root'
              })
              export class UserService {
                private user: any = { name: '' };
              Severity: Minor
              Found in src/app/shared/user.service.ts - About 3 hrs to fix

                File exams-view.component.ts has 295 lines of code (exceeds 250 allowed). Consider refactoring.
                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';
                Severity: Minor
                Found in src/app/exams/exams-view.component.ts - About 3 hrs to fix

                  File manager-dashboard.component.ts has 294 lines of code (exceeds 250 allowed). Consider refactoring.
                  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';
                  Severity: Minor
                  Found in src/app/manager-dashboard/manager-dashboard.component.ts - About 3 hrs to fix

                    File resources-add.component.ts has 292 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
                    import { Router, ActivatedRoute } from '@angular/router';
                    import { UserService } from '../shared/user.service';
                    import {
                      FormBuilder,
                    Severity: Minor
                    Found in src/app/resources/resources-add.component.ts - About 3 hrs to fix

                      ReportsService has 26 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      @Injectable({
                        providedIn: 'root'
                      })
                      export class ReportsService {
                      
                      
                      Severity: Minor
                      Found in src/app/manager-dashboard/reports/reports.service.ts - About 3 hrs to fix

                        TeamsService has 26 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        @Injectable({
                          providedIn: 'root'
                        })
                        export class TeamsService {
                        
                        
                        Severity: Minor
                        Found in src/app/teams/teams.service.ts - About 3 hrs to fix

                          File surveys.component.ts has 285 lines of code (exceeds 250 allowed). Consider refactoring.
                          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';
                          Severity: Minor
                          Found in src/app/surveys/surveys.component.ts - About 2 hrs to fix

                            PlanetTagInputComponent has 25 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            @Component({
                              'selector': 'planet-tag-input',
                              'templateUrl': './planet-tag-input.component.html',
                              'styleUrls': [ 'planet-tag-input.scss' ],
                              'providers': [
                            Severity: Minor
                            Found in src/app/shared/forms/planet-tag-input.component.ts - About 2 hrs to fix

                              Function generatePDF has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                              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`}`,
                              Severity: Major
                              Found in src/app/users/users-achievements/users-achievements.component.ts - About 2 hrs to fix

                                PlanetTagInputDialogComponent has 24 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                @Component({
                                  'templateUrl': 'planet-tag-input-dialog.component.html',
                                  'styles': [ `
                                    :host .mat-list-option span {
                                      font-weight: inherit;
                                Severity: Minor
                                Found in src/app/shared/forms/planet-tag-input-dialog.component.ts - About 2 hrs to fix

                                  ChatSidebarComponent has 24 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  @Component({
                                    selector: 'planet-chat-sidebar',
                                    templateUrl: './chat-sidebar.component.html',
                                    styleUrls: [ './chat-sidebar.scss' ],
                                  })
                                  Severity: Minor
                                  Found in src/app/chat/chat-sidebar/chat-sidebar.component.ts - About 2 hrs to fix

                                    CoursesProgressLeaderComponent has 23 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    @Component({
                                      templateUrl: 'courses-progress-leader.component.html',
                                      styleUrls: [ 'courses-progress.scss' ]
                                    })
                                    export class CoursesProgressLeaderComponent implements OnInit, OnDestroy {
                                    Severity: Minor
                                    Found in src/app/courses/progress-courses/courses-progress-leader.component.ts - About 2 hrs to fix

                                      Function ngOnInit has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        ngOnInit() {
                                          if (this.route.snapshot.data.update) {
                                            this.initUpdate();
                                          }
                                          this.loginForm = this.formBuilder.group({
                                      Severity: Major
                                      Found in src/app/configuration/configuration.component.ts - About 2 hrs to fix

                                        File teams.component.ts has 265 lines of code (exceeds 250 allowed). Consider refactoring.
                                        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';
                                        Severity: Minor
                                        Found in src/app/teams/teams.component.ts - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language