3bcc145571753a3fe4b6320909f607e2693c66c6
[usecase-ui.git] /
1 import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2 import { KnowledgeBase } from '../knowledge-base.type';
3 import { KnowledgeBaseService } from '../knowledge-base.service';
4 @Component({
5   selector: 'app-knowledge-base-detail',
6   templateUrl: './knowledge-base-detail.component.html',
7   styleUrls: ['./knowledge-base-detail.component.less']
8 })
9 export class KnowledgeBaseDetailComponent implements OnInit {
10
11   constructor(
12     public knowledgeBaseService: KnowledgeBaseService
13   ) { }
14   @Input() showModal: boolean;
15   @Input() knowledgeBaseDetail: KnowledgeBase;
16   @Output() modalOpreation = new EventEmitter();
17
18   ngOnInit() {
19   }
20
21   handleCancel(): void {
22     this.showModal = false;
23     this.modalOpreation.emit({ "cancel": true });
24   }
25
26   handleOk(): void {
27     this.showModal = false;
28     this.modalOpreation.emit({ "cancel": true });
29   }
30 }