feat: remove FM feature from Vector
FMs move to a separate application. Drops Fm/FmPart tables + Repair.fmId column, deletes FM_OPENED/FM_CLOSED PartEvent rows, strips FM enums + webhook events + shared contracts, removes FM routes/services/pages/UI, and collapses dashboard admin ops to Repairs 7d/30d + trend + custody backlog. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -4,11 +4,9 @@ import { useQuery } from '@tanstack/react-query';
|
||||
import {
|
||||
ArrowRight,
|
||||
ArrowRightLeft,
|
||||
CheckCircle2,
|
||||
LogIn,
|
||||
LogOut,
|
||||
Pencil,
|
||||
Wrench,
|
||||
type LucideIcon,
|
||||
} from 'lucide-react';
|
||||
import { Button, Skeleton } from '@vector/ui';
|
||||
@@ -18,8 +16,6 @@ import type { HostTimelineEntry } from '../../lib/api/types.js';
|
||||
|
||||
const ENTRY_ICON: Record<HostTimelineEntry['type'], LucideIcon> = {
|
||||
HOST_EVENT: Pencil,
|
||||
FM_OPENED: Wrench,
|
||||
FM_CLOSED: Wrench,
|
||||
REPAIR: ArrowRightLeft,
|
||||
PART_ARRIVED: LogIn,
|
||||
PART_DEPARTED: LogOut,
|
||||
@@ -70,22 +66,6 @@ function EntryRow({ entry }: { entry: HostTimelineEntry }) {
|
||||
</>
|
||||
);
|
||||
}
|
||||
case 'FM_OPENED':
|
||||
case 'FM_CLOSED': {
|
||||
const { fm } = entry;
|
||||
const label = entry.type === 'FM_OPENED' ? 'FM opened' : 'FM closed';
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-wrap items-center gap-x-2 text-sm">
|
||||
<span className="font-medium text-foreground">{label}</span>
|
||||
<Link to={`/fms/${fm.id}`} className="font-mono text-xs text-muted-foreground hover:underline">
|
||||
{fm.id}
|
||||
</Link>
|
||||
</div>
|
||||
<div className="mt-0.5 text-xs text-muted-foreground">{formatWhen(entry.at)}</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
case 'REPAIR': {
|
||||
const { repair } = entry;
|
||||
return (
|
||||
@@ -144,10 +124,6 @@ function entryKey(entry: HostTimelineEntry): string {
|
||||
switch (entry.type) {
|
||||
case 'HOST_EVENT':
|
||||
return `he-${entry.hostEvent.id}`;
|
||||
case 'FM_OPENED':
|
||||
return `fo-${entry.fm.id}`;
|
||||
case 'FM_CLOSED':
|
||||
return `fc-${entry.fm.id}`;
|
||||
case 'REPAIR':
|
||||
return `r-${entry.repair.id}`;
|
||||
case 'PART_ARRIVED':
|
||||
|
||||
Reference in New Issue
Block a user