import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-studymaterialstock',
  templateUrl: './studymaterialstock.component.html',
  styleUrls: ['./studymaterialstock.component.scss']
})
export class StudymaterialstockComponent implements OnInit {
  show = false;
  closed = false;
  public myModal;
  public myModalData;
  studymaterialDetails: any;
  stockdetails:any;
  constructor() { }

  ngOnInit() {
     this.studymaterialDetails = [
      {
        universityname: 'Anna University',
        coursename: 'MCA',
        semyear: '1st sem/2018',
        registration: '30',
        stock: '100'
      },
      {
       universityname: 'Bharathi University',
        coursename: 'MBA',
        semyear: '2nd sem/2018',
        registration: '10',
        stock: '50'
      },
      {
         universityname: 'Kamaraj University',
        coursename: 'ME',
        semyear: '3rd sem/2019',
        registration: '20',
        stock: '80'
      }
    ]

     this.stockdetails = [
      {
       date: '10/08/2018',
        details: 'MCA',
        incoming: '100',
        outgoing: '30',
        balanceonhand: '70'
      },
      {
      date: '12/08/2018',
        details: 'MCA',
        incoming: '60',
        outgoing: '30',
        balanceonhand: '30'
      },
      {
        date: '14/08/2018',
        details: 'MCA',
        incoming: '50',
        outgoing: '0',
        balanceonhand: '50'
      }
    ]
  }
  viewId: any;
    viewstock(i){
      this.viewId = i;
     this.show = !this.show;

}
}