martinmicunda/employee-scheduling-ui

View on GitHub

Showing 438 of 458 total issues

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

@Component({
    selector: 'alert-success'
})
@View({
    template: `
Severity: Major
Found in src/app/components/alert-success/alert-success.js and 1 other location - About 1 hr to fix
src/app/components/alert-danger/alert-danger.js on lines 11..31

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 61.

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

    it('should cancel modal', () => {
        spyOn(fakeModal, 'dismiss');
        mmModalReallyClickController = new MmModalReallyClickController(fakeModal);

        mmModalReallyClickController.cancel();
src/app/routes/layout-app/employees/schedule/schedule.spec.js on lines 67..74

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 61.

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

@Component({
    selector: 'alert-danger'
})
@View({
    template: `
Severity: Major
Found in src/app/components/alert-danger/alert-danger.js and 1 other location - About 1 hr to fix
src/app/components/alert-success/alert-success.js on lines 11..31

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 61.

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

        it('should cancel modal', () => {
            spyOn(fakeModal, 'dismiss');
            employeeSchedule = new EmployeeSchedule(fakeModal);

            employeeSchedule.cancel();
src/app/directives/modal-really-click/modal-really-click.spec.js on lines 118..125

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 61.

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 9 locations. Consider refactoring.
Open

        it('should have `Contact Details` title defined', () => {
            element = render();
            const title = element.find('legend');

            expect(title.text()).toEqual('Contact Details');
src/app/components/employee-account-details/employee-account-details.spec.js on lines 58..63
src/app/components/employee-bank-details/employee-bank-details.spec.js on lines 43..48
src/app/components/employee-hourly-rate/employee-hourly-rate.spec.js on lines 44..49
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 65..70
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 62..67
src/app/routes/layout-app/account/password/password.spec.js on lines 61..66
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 67..72
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 74..79

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 60.

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 9 locations. Consider refactoring.
Open

        it('should have `Hourly Rate` title defined', () => {
            element = render();
            const title = element.find('legend');

            expect(title.text()).toEqual('Hourly Rate');
src/app/components/employee-account-details/employee-account-details.spec.js on lines 58..63
src/app/components/employee-bank-details/employee-bank-details.spec.js on lines 43..48
src/app/components/employee-contact-details/employee-contact-details.spec.js on lines 43..48
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 65..70
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 62..67
src/app/routes/layout-app/account/password/password.spec.js on lines 61..66
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 67..72
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 74..79

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 60.

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 4 locations. Consider refactoring.
Open

    save(form) {
        if(!form.$valid) {return;}
        this.isSubmitting = true;
        this.FormService.save(this.PositionModel, this.position, this, form);
    }
Severity: Major
Found in src/app/components/modal-position/modal-position.js and 3 other locations - About 1 hr to fix
src/app/components/modal-message/modal-message.js on lines 38..42
src/app/components/modal-partner/modal-partner.js on lines 38..42
src/app/routes/layout-app/settings/language/language.js on lines 38..42

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 60.

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 4 locations. Consider refactoring.
Open

    save(form) {
        if(!form.$valid) {return;}
        this.isSubmitting = true;
        this.FormService.save(this.MessageModel, this.message, this, form);
    }
Severity: Major
Found in src/app/components/modal-message/modal-message.js and 3 other locations - About 1 hr to fix
src/app/components/modal-partner/modal-partner.js on lines 38..42
src/app/components/modal-position/modal-position.js on lines 35..39
src/app/routes/layout-app/settings/language/language.js on lines 38..42

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 60.

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 9 locations. Consider refactoring.
Open

        it('should have `Contact Details` title defined', () => {
            element = render();
            const title = element.find('h4');

            expect(title.text()).toEqual('Contact Details');
src/app/components/employee-account-details/employee-account-details.spec.js on lines 58..63
src/app/components/employee-bank-details/employee-bank-details.spec.js on lines 43..48
src/app/components/employee-contact-details/employee-contact-details.spec.js on lines 43..48
src/app/components/employee-hourly-rate/employee-hourly-rate.spec.js on lines 44..49
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 65..70
src/app/routes/layout-app/account/password/password.spec.js on lines 61..66
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 67..72
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 74..79

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 60.

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 4 locations. Consider refactoring.
Open

    save(form) {
        if(!form.$valid) {return;}
        this.isSubmitting = true;
        this.FormService.save(this.PartnerModel, this.partner, this, form);
    }
Severity: Major
Found in src/app/components/modal-partner/modal-partner.js and 3 other locations - About 1 hr to fix
src/app/components/modal-message/modal-message.js on lines 38..42
src/app/components/modal-position/modal-position.js on lines 35..39
src/app/routes/layout-app/settings/language/language.js on lines 38..42

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 60.

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 9 locations. Consider refactoring.
Open

        it('should have `Password` label defined', () => {
            element = render();
            const title = element.find('label');

            expect(title.text()).toEqual('Password');
src/app/components/employee-account-details/employee-account-details.spec.js on lines 58..63
src/app/components/employee-bank-details/employee-bank-details.spec.js on lines 43..48
src/app/components/employee-contact-details/employee-contact-details.spec.js on lines 43..48
src/app/components/employee-hourly-rate/employee-hourly-rate.spec.js on lines 44..49
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 65..70
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 62..67
src/app/routes/layout-app/account/password/password.spec.js on lines 61..66
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 67..72

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 60.

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 9 locations. Consider refactoring.
Open

        it('should have `Account Details` title defined', () => {
            element = render();
            const title = element.find('h4');

            expect(title.text()).toEqual('Account Details');
src/app/components/employee-account-details/employee-account-details.spec.js on lines 58..63
src/app/components/employee-bank-details/employee-bank-details.spec.js on lines 43..48
src/app/components/employee-contact-details/employee-contact-details.spec.js on lines 43..48
src/app/components/employee-hourly-rate/employee-hourly-rate.spec.js on lines 44..49
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 62..67
src/app/routes/layout-app/account/password/password.spec.js on lines 61..66
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 67..72
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 74..79

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 60.

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 9 locations. Consider refactoring.
Open

        it('should have `Bank Details` title defined', () => {
            element = render();
            const title = element.find('legend');

            expect(title.text()).toEqual('Bank Details');
src/app/components/employee-account-details/employee-account-details.spec.js on lines 58..63
src/app/components/employee-contact-details/employee-contact-details.spec.js on lines 43..48
src/app/components/employee-hourly-rate/employee-hourly-rate.spec.js on lines 44..49
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 65..70
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 62..67
src/app/routes/layout-app/account/password/password.spec.js on lines 61..66
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 67..72
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 74..79

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 60.

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 9 locations. Consider refactoring.
Open

        it('should have `Account Details` title defined', () => {
            element = render();
            const title = element.find('legend');

            expect(title.text()).toEqual('Account Details');
src/app/components/employee-bank-details/employee-bank-details.spec.js on lines 43..48
src/app/components/employee-contact-details/employee-contact-details.spec.js on lines 43..48
src/app/components/employee-hourly-rate/employee-hourly-rate.spec.js on lines 44..49
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 65..70
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 62..67
src/app/routes/layout-app/account/password/password.spec.js on lines 61..66
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 67..72
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 74..79

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 60.

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

@RouteConfig('app.employees.add.authorizations', {
    url: '/authorizations',
    views: {
        'modal@': {
            template: '<employee-authorizations></employee-authorizations>'
src/app/routes/layout-app/employees/edit/authorizations/authorizations.js on lines 12..24

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 60.

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 4 locations. Consider refactoring.
Open

    save(form) {
        if(!form.$valid) {return;}
        this.isSubmitting = true;
        this.FormService.save(this.SettingModel, this.setting, this, form);
    }
Severity: Major
Found in src/app/routes/layout-app/settings/language/language.js and 3 other locations - About 1 hr to fix
src/app/components/modal-message/modal-message.js on lines 38..42
src/app/components/modal-partner/modal-partner.js on lines 38..42
src/app/components/modal-position/modal-position.js on lines 35..39

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 60.

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 9 locations. Consider refactoring.
Open

        it('should have `Password` title defined', () => {
            element = render();
            const title = element.find('h4');

            expect(title.text()).toEqual('Password');
src/app/components/employee-account-details/employee-account-details.spec.js on lines 58..63
src/app/components/employee-bank-details/employee-bank-details.spec.js on lines 43..48
src/app/components/employee-contact-details/employee-contact-details.spec.js on lines 43..48
src/app/components/employee-hourly-rate/employee-hourly-rate.spec.js on lines 44..49
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 65..70
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 62..67
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 67..72
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 74..79

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 60.

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 9 locations. Consider refactoring.
Open

        it('should have `Password` title defined', () => {
            element = render();
            const title = element.find('legend');

            expect(title.text()).toEqual('Password');
src/app/components/employee-account-details/employee-account-details.spec.js on lines 58..63
src/app/components/employee-bank-details/employee-bank-details.spec.js on lines 43..48
src/app/components/employee-contact-details/employee-contact-details.spec.js on lines 43..48
src/app/components/employee-hourly-rate/employee-hourly-rate.spec.js on lines 44..49
src/app/routes/layout-app/account/account-details/account-details.spec.js on lines 65..70
src/app/routes/layout-app/account/contact-details/contact-details.spec.js on lines 62..67
src/app/routes/layout-app/account/password/password.spec.js on lines 61..66
src/app/routes/layout-app/employees/edit/password/password.spec.js on lines 74..79

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 60.

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

@RouteConfig('app.employees.edit.authorizations', {
    url: '/authorizations',
    views: {
        'modal@': {
            template: '<employee-authorizations></employee-authorizations>'
src/app/routes/layout-app/employees/add/authorizations/authorizations.js on lines 12..24

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 60.

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

    removeAccess() {
        const employeesWithoutAccess = this.DocumentService.grantAccess(this.selectedEmployeeWithAccess, this.employeesWithAccess, this.employeesWithoutAccess);
        if(employeesWithoutAccess) {this.employeesWithoutAccess = employeesWithoutAccess;}
    }
Severity: Major
Found in src/app/components/modal-document/modal-document.js and 1 other location - About 1 hr to fix
src/app/components/modal-document/modal-document.js on lines 64..67

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 59.

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