Commit 1e754d14 authored by Ryan Diehl's avatar Ryan Diehl

Merge branch 'develop' into feature/angular9

parents 38b6c26e ab21d3d9
Pipeline #106163 passed with stages
in 4 minutes and 20 seconds
import { Directive, Input } from '@angular/core';
import { Directive, Input, OnChanges, Self, SimpleChanges } from '@angular/core';
import { NgControl } from '@angular/forms';
@Directive({
selector: '[utDisableControl]'
})
export class DisableControlDirective {
constructor(private ngControl: NgControl) {}
export class DisableControlDirective implements OnChanges {
constructor(@Self() private ngControl: NgControl) {}
@Input('utDisableControl')
public set disableControl(condition: boolean) {
const action = !!condition ? 'disable' : 'enable';
this.ngControl.control[action]();
public disableControl: boolean;
public ngOnChanges(changes: SimpleChanges): void {
if (changes && changes['disableControl']) {
const action = !!this.disableControl ? 'disable' : 'enable';
this.ngControl.control[action]();
}
}
}
  • SonarQube analysis indicates that quality gate is failed.

    • Bugs is failed: Actual value 1 > 0
    • high_severity_vulns is passed: Actual value 0
    • medium_severity_vulns is passed: Actual value 0

    SonarQube analysis reported 14 issues

    • 1 major
    • 🔽 7 minor
    • 6 info

    Top 10 extra issues

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. Unexpected empty source 📘
    2. 🔽 Add an "alt" attribute to this image. 📘
    3. 🔽 This assertion is unnecessary since it does not change the type of the expression. 📘
    4. 🔽 This assertion is unnecessary since it does not change the type of the expression. 📘
    5. 🔽 This assertion is unnecessary since it does not change the type of the expression. 📘
    6. 🔽 This assertion is unnecessary since it does not change the type of the expression. 📘
    7. 🔽 This assertion is unnecessary since it does not change the type of the expression. 📘
    8. 🔽 This assertion is unnecessary since it does not change the type of the expression. 📘
    9. Make sure that executing this OS command is safe here. 📘
    10. Make sure that cookie is written safely here. 📘
    • ... 4 more
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment