import { Badge } from '@/components/ui/badge'; import { Card, CardDescription, CardFooter, CardHeader, CardTitle, } from '@/components/ui/card'; import { cn } from '@/lib/utils'; import type { Payroll } from '@/types'; export interface PayrollCardProps { payroll: Payroll; onClick?: () => void; className?: string; } export function PayrollCard({ payroll, onClick, className }: PayrollCardProps) { return (
{payroll.user?.name} {payroll.is_paid ? 'Lunas' : 'Pending'}
{payroll.total_salary_formatted}
Gaji Pokok {payroll.base_salary_formatted}
{payroll.adjustments?.map((adj, idx) => (
{adj.description} {adj.type === 'bonus' ? '+' : '-'} {adj.amount_formatted}
))}
Periode {payroll.period_month_formatted}
); }