dsd-meetme/frontend

View on GitHub

Showing 132 of 132 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                dataPublisher.publish(apiDomain + '/employee/password/reset', {
                    company: c.company,
                    email: c.email,
                    password: c.password,
                    password_confirmation: c.password,
Severity: Major
Found in app/components/user/recovery/urstController.js and 1 other location - About 4 hrs to fix
app/components/user/recovery/urecController.js on lines 28..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 133.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                dataPublisher.publish(apiDomain + '/employees/password/email', {
                    company: c.name,
                    email: c.email
                })
                    .then(function () {
Severity: Major
Found in app/components/user/recovery/urecController.js and 1 other location - About 4 hrs to fix
app/components/user/recovery/urstController.js on lines 31..51

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 133.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        c.delete = function () {
            //restful delete
            c.confirmPopup.message = "Deleting group";
            c.confirmPopup.show();
            orgResources.orgGroup.remove({groupId: id}).$promise
Severity: Major
Found in app/components/organization/group/groupController.js and 1 other location - About 4 hrs to fix
app/components/organization/user/userController.js on lines 34..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 132.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        c.delete = function () {
            //restful delete
            c.confirmPopup.message = 'Deleting user';
            c.confirmPopup.show();
            orgResources.orgUser.remove({userId: id}).$promise
Severity: Major
Found in app/components/organization/user/userController.js and 1 other location - About 4 hrs to fix
app/components/organization/group/groupController.js on lines 102..113

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 132.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            userResources.userGroups.query({current : 1})
                .$promise.then(function (response) {
                    c.meetings.toBePlanned = processMeetings(response);
                    pages = Math.ceil(c.meetings.toBePlanned.length / 10);
                    c.pagination.meetingsToBePlanned.pages = pages;
Severity: Major
Found in app/components/user/dashboard/udashController.js and 1 other location - About 4 hrs to fix
app/components/user/dashboard/udashController.js on lines 112..119

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 131.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            plannerResources.plannerManagedMeetings.query({current: 1})
                .$promise.then(function (response) {
                    c.meetings.managed = processMeetings(response);

                    pages = Math.ceil(c.meetings.managed.length / 10);
Severity: Major
Found in app/components/user/dashboard/udashController.js and 1 other location - About 4 hrs to fix
app/components/user/dashboard/udashController.js on lines 97..103

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 131.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function saveSchedule has 110 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        c.saveSchedule = function () {
            var newEvents, modifiedEvents = [];
            var alsoEditEvents = false;
            var events = calendar.fullCalendar('clientEvents');
            var processedEvents = [];
Severity: Major
Found in app/components/user/composeSchedule/cschedController.js - About 4 hrs to fix

    Function controller has 107 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var controller = function ($scope, $routeParams, $location, mixedContentToArray, orgResources) {
            var c = this;
            //user id
            var id = $routeParams.id;
            var emptyInvalidFields = function (invalidFields) {
    Severity: Major
    Found in app/components/organization/user/userController.js - About 4 hrs to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                              dataPublisher.publish(apiDomain + '/employees/calendars/caldav', {
                                  name: selectedCalendars[i],
                                  url: this.credentials.url,
                                  username: this.credentials.username,
                                  password: this.credentials.password,
      Severity: Major
      Found in app/components/user/dashboard/udashController.js and 1 other location - About 4 hrs to fix
      app/components/organization/dashboard/odashController.js on lines 241..258

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 120.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                          orgResources.orgUser.save({userId: ''}, jQuery.param({
                              name: this.name,
                              email: this.email,
                              password: this.password,
                              password_confirmation: this.confirmation_password
      Severity: Major
      Found in app/components/organization/dashboard/odashController.js and 1 other location - About 4 hrs to fix
      app/components/user/dashboard/udashController.js on lines 302..319

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 120.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                      orgResources.orgGroup.update({groupId: id}, jQuery.param(
                          {
                              name: c.data.groupCopy.name,
                              description: c.data.groupCopy.description,
                              planner_id: c.data.group.planner_id
      Severity: Major
      Found in app/components/organization/group/groupController.js and 1 other location - About 4 hrs to fix
      app/components/organization/user/userController.js on lines 77..88

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 116.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                          orgResources.orgUser.update({userId: id}, jQuery.param(toSend)).$promise
                              .then(function () {
                                  getInfo();
                                  c.editMode.exit();
                                  c.confirmPopup.hide();
      Severity: Major
      Found in app/components/organization/user/userController.js and 1 other location - About 4 hrs to fix
      app/components/organization/group/groupController.js on lines 147..163

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 116.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function $get has 97 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          this.$get = ['$injector', '$document', '$timeout', '$rootScope', function ($injector, $document, $timeout, $rootScope) {
            var $animate;
            var $parentSelector = this.parentSelector,
              loadingBarContainer = angular.element(this.loadingBarTemplate),
              loadingBar = loadingBarContainer.find('div').eq(0),
      Severity: Major
      Found in assets/js/loading-bar.js - About 3 hrs to fix

        Function controller has 87 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var controller = function ($scope, userResources, mixedContentToArray) {
        
                var c = this;
        
                c.data = {
        Severity: Major
        Found in app/components/user/profile/upController.js - About 3 hrs to fix

          File groupController.js has 311 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          (function () {
          
              var controller = function ($routeParams, $location, mixedContentToArray, orgResources, arrayToUrlParams) {
          
                  var c = this;
          Severity: Minor
          Found in app/components/organization/group/groupController.js - About 3 hrs to fix

            Function controller has 86 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var controller = function ($scope, orgResources, mixedContentToArray) {
            
                    var c = this;
            
                    c.data = {
            Severity: Major
            Found in app/components/organization/profile/opController.js - About 3 hrs to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                        if (!response.config.ignoreLoadingBar && !isCached(response.config)) {
                          reqsCompleted++;
                          $rootScope.$broadcast('cfpLoadingBar:loaded', {url: response.config.url, result: response});
                          if (reqsCompleted >= reqsTotal) {
                            setComplete();
              Severity: Major
              Found in assets/js/loading-bar.js and 1 other location - About 3 hrs to fix
              assets/js/loading-bar.js on lines 139..147

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 103.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                        if (!rejection.config.ignoreLoadingBar && !isCached(rejection.config)) {
                          reqsCompleted++;
                          $rootScope.$broadcast('cfpLoadingBar:loaded', {url: rejection.config.url, result: rejection});
                          if (reqsCompleted >= reqsTotal) {
                            setComplete();
              Severity: Major
              Found in assets/js/loading-bar.js and 1 other location - About 3 hrs to fix
              assets/js/loading-bar.js on lines 121..129

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 103.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 3 locations. Consider refactoring.
              Open

                                      function (response) {
                                          //Puts relevant errors in array 
                                          if (response.status === 422) {
                                              mixedContentToArray.process(response.data, c.addGroup.errors, true);
                                              c.confirmPopup.hide();
              Severity: Major
              Found in app/components/organization/dashboard/odashController.js and 2 other locations - About 3 hrs to fix
              app/components/organization/dashboard/odashController.js on lines 170..178
              app/components/organization/group/groupController.js on lines 303..311

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 95.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 3 locations. Consider refactoring.
              Open

                                      }, function (response) {
                                          //Puts relevant errors in array
                                          if (response.status === 422) {
                                              mixedContentToArray.process(response.data, c.errors.planner, true);
                                              c.confirmPopup.hide();
              Severity: Major
              Found in app/components/organization/group/groupController.js and 2 other locations - About 3 hrs to fix
              app/components/organization/dashboard/odashController.js on lines 170..178
              app/components/organization/dashboard/odashController.js on lines 180..188

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 95.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language