summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/modals/comment-modal/comment-modal.component.ts
blob: c66f60b5e7e3dd6d459b81f15b31b9c724b57d78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
 * Created by rc2122 on 5/31/2018.
 */
import { Component, Input } from "@angular/core";
import { ValidationConfiguration } from "app/models";
import { Subject } from "rxjs/Subject";

@Component({
    selector: 'comment-modal',
    templateUrl: './comment-modal.component.html',
    styleUrls: ['./comment-modal.less']
})

export class CommentModalComponent {

    @Input() message:string;
    onValidationChange: Subject<boolean> = new Subject();
    //@Input() showComment:boolean;
    private comment = {"text": ''};
    private commentValidationPattern = ValidationConfiguration.validation.validationPatterns.comment;

    private onValidityChange = (isValid: boolean):void => {
        this.onValidationChange.next(isValid);
    }
}