import { Component, OnInit } from '@angular/core';
import {BsModalService} from 'ngx-bootstrap';
import {FramePageComponent} from '../../core/FramePageComponent';
import {FrameOptrModifyComponent} from '../frame-optr-modify/frame-optr-modify.component';
import {FrameOptrRoleComponent} from '../frame-optr-role/frame-optr-role.component';
import {FrameOptrCreateComponent} from '../frame-optr-create/frame-optr-create.component';

@Component({
  selector: 'app-frame-optr-page',
  templateUrl: './frame-optr-page.component.html',
  styleUrls: ['./frame-optr-page.component.scss']
})
export class FrameOptrPageComponent extends FramePageComponent implements OnInit {

  constructor(private modalService: BsModalService) {
    super(modalService);
    this.modalComponent = FrameOptrModifyComponent;
  }

  ngOnInit() {
  }


  showOptrRole (optr) {
    this.showComponentModal(FrameOptrRoleComponent,{entityUrl: 'frame/optr/find.htm', entityParam: {optr_id: optr.optr_id}});
  }

  showCreateModal() {
    this.showComponentModal(FrameOptrCreateComponent);
  }
}
