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

@Component({
  selector: 'app-return-product-emp',
  templateUrl: './return-product-emp.component.html',
  styleUrls: ['./return-product-emp.component.scss']
})
export class ReturnProductEmpComponent {
  activeTab: string = 'borrow'; // กำหนดแท็บเริ่มต้น
  itemtype: any = [];

  transactions = [
    { id: '#52225', name: 'John Brown', project: 'Project1', status: 'Pending', type: 'borrow' },
    { id: '#52400', name: 'Jim Green', project: 'Project2', status: 'Approved', type: 'return' },
    { id: '#52100', name: 'Joe Black', project: 'Project3', status: 'Not Approved', type: 'history' }
  ];

  setActiveTab(tab: string) {
    this.activeTab = tab;
  }

  getStatusClass(status: string) {
    return {
      'bg-yellow-100 text-yellow-800': status === 'Pending',
      'bg-green-100 text-green-800': status === 'Approved',
      'bg-red-100 text-red-800': status === 'Not Approved'
    };
  }

}
