import { Component, OnInit, Injectable, Inject } from '@angular/core';
import { LocalStorageService } from 'angular-2-local-storage';
import { FormControl, Validators, FormGroup } from '@angular/forms';
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material';
import { EmployeeHttpService } from 'app/services/employee/employee-http.service';

@Injectable()
@Component({
  selector: 'app-employee-project-invite',
  templateUrl: './employee-project-invite.component.html',
  styleUrls: ['./employee-project-invite.component.scss']
})
export class EmployeeProjectInviteComponent implements OnInit {
  memberList;
  empList;
  constructor(private employeeService: EmployeeHttpService, public dialogRef: MatDialogRef<EmployeeProjectInviteComponent>,
    @Inject(MAT_DIALOG_DATA) public prjDetails: any, protected localStorageService: LocalStorageService) {
      console.log('prjDetails in dialog', prjDetails);
     }

  ngOnInit() {
    this.employeeService.getAllEmployees().subscribe(resp => {
      this.empList = resp;
      console.log('resp', this.empList);
  }, err => {
      console.log('Error on loading emplyees list');
  });
  }
  onCancel() {
    this.dialogRef.close();
  }

}
