feat(platform): filter vehicles from missing source tags
This commit is contained in:
@@ -131,7 +131,17 @@ export function Vehicles({
|
||||
render: (_: unknown, row: VehicleCoverageRow) => (
|
||||
<Space spacing={4} wrap>
|
||||
{(row.missingProtocols ?? []).length > 0
|
||||
? row.missingProtocols.map((protocol) => <Tag key={protocol} color="orange">缺 {protocol}</Tag>)
|
||||
? row.missingProtocols.map((protocol) => (
|
||||
<Button
|
||||
key={protocol}
|
||||
size="small"
|
||||
theme="light"
|
||||
type="warning"
|
||||
onClick={() => applyFilters({ ...filters, missingProtocol: protocol })}
|
||||
>
|
||||
缺 {protocol}
|
||||
</Button>
|
||||
))
|
||||
: <Tag color="green">完整</Tag>}
|
||||
</Space>
|
||||
)
|
||||
@@ -142,7 +152,7 @@ export function Vehicles({
|
||||
{ title: '绑定', width: 90, render: (_: unknown, row: VehicleCoverageRow) => <Tag color={row.bindingStatus === 'bound' ? 'green' : 'orange'}>{row.bindingStatus === 'bound' ? '已绑定' : '未绑定'}</Tag> },
|
||||
{ title: '操作', width: 110, render: (_: unknown, row: VehicleCoverageRow) => <Button onClick={() => onOpenVehicle(row.vin)}>车辆服务</Button> }
|
||||
],
|
||||
[onOpenVehicle]
|
||||
[filters, onOpenVehicle]
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user