import { Component, OnInit } from '@angular/core';
import {TableModule} from 'primeng/table';
import {PageableResource, Resource} from "../../model/resource";
import {ResourceService} from "../../service/resource.service";

@Component({
  selector: 'app-approve-resource',
  templateUrl: './approve-resource.component.html',
  styleUrls: ['./approve-resource.component.css']
})
export class ApproveResourceComponent implements OnInit {
  resources: Resource[] = [];

  constructor(private resourceService:ResourceService) { }

  ngOnInit(): void {
    this.resourceService.getResourcesForApproval().subscribe((resources: Resource[]) => {
      // @ts-ignore
      this.resources = resources});
  }

}
