import { Card, Table, Tag, Typography } from '@douyinfe/semi-ui';
import type { DashboardData } from '../types';
interface MovementRow {
id: string;
time: string;
dir: string;
material: string;
qty: string;
operator: string;
}
export function WarehouseBoard({ data }: { data: DashboardData }) {
const { warehouse: w } = data;
const rows: MovementRow[] = w.movements.map((m) => ({
id: m.id,
time: m.time,
dir: m.type === 'in' ? '入库' : '出库',
material: m.material,
qty: `${m.qty}`,
operator: m.operator,
}));
const columns = [
{ title: '时间', dataIndex: 'time' },
{
title: '方向',
dataIndex: 'dir',
render: (dir: string) => (