2020-11-22 14:43:59 +01:00

34 lines
843 B
TypeScript

import { Component, EventEmitter, OnInit, Output } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'app-save-view-config-dialog',
templateUrl: './save-view-config-dialog.component.html',
styleUrls: ['./save-view-config-dialog.component.scss']
})
export class SaveViewConfigDialogComponent implements OnInit {
constructor(private modal: NgbActiveModal) { }
@Output()
public saveClicked = new EventEmitter()
saveViewConfigForm = new FormGroup({
title: new FormControl(''),
showInSideBar: new FormControl(false),
showInDashboard: new FormControl(false),
})
ngOnInit(): void {
}
save() {
this.saveClicked.emit(this.saveViewConfigForm.value)
}
cancel() {
this.modal.close()
}
}