import { Component, OnInit, OnDestroy, Input } from '@angular/core';
import { MDBModalRef } from 'angular-bootstrap-md';
import { ProvisionsService } from '../services/provisions.service';

@Component({
  selector: 'qmi-modalinfo',
  templateUrl: './modalinfo.component.html',
  styleUrls: ['./modalinfo.component.scss']
})
export class ModalInfoComponent implements OnInit, OnDestroy {
  
  info;

  events;

  constructor( public modalRef: MDBModalRef, private _provisionsService: ProvisionsService ) {}

  ngOnInit() {
    this._provisionsService.getEvents(this.info.user._id, this.info._id).subscribe(res=> {
      this.events = res.results;
    });
  }

  ngOnDestroy() { 
    
  }

}
