RomainMarecat/slate

View on GitHub
src/shared/admin/app-recipe/recipe/recipe-edit/recipe-edit.component.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 2 of 2 total issues

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

@Component({
selector: 'app-admin-recipe-edit',
templateUrl: './recipe-edit.component.html',
styleUrls: ['./recipe-edit.component.scss']
})

    Function saveDocument has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    saveDocument() {
    const slug = StringService.slugify(this.form.get('name').value);
    this.form.patchValue({slug});
     
    if (this.form.valid) {
    Severity: Minor
    Found in src/shared/admin/app-recipe/recipe/recipe-edit/recipe-edit.component.ts - About 25 mins to fix
    Category
    Status