import { Component, Inject, OnInit } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';

@Component({
  selector: 'app-codes-history',
  templateUrl: './codes-history.component.html',
  styleUrls: ['./codes-history.component.css']
})
export class CodesHistoryComponent implements OnInit {
  equipment: string;
  codesList: string[];

  constructor(
    @Inject(MAT_DIALOG_DATA) private _data: any
  ) {
    this.equipment = "";
    this.codesList = [];
  }

  ngOnInit(): void {
    this.equipment = this._data.equipment;
    this.codesList = this._data.history;
    console.log(this.codesList);
  }
}
