import { Link } from "@tanstack/react-router"; import type { Employee, SearchFilters } from "../types/employee"; interface EmployeeTableProps { employees: Employee[]; filters: SearchFilters; onFiltersChange: (filters: SearchFilters) => void; } export function EmployeeTable({ employees, filters, onFiltersChange }: EmployeeTableProps) { const filtered = employees.filter(e => { if (filters.activeOnly && !e.isActive) return false; if (filters.department && e.department !== filters.department) return false; if (filters.query && !e.name.toLowerCase().includes(filters.query.toLowerCase())) return false; return true; }); return (
| Name | Department | Salary |
|---|---|---|
| {emp.name} | {emp.department} | ${emp.salary.toLocaleString()} |