// Mock CMMS Data
export interface MaintenanceTask {
id: string;
taskNumber: string;
assetId: string;
assetName: string;
taskType: "preventive" | "corrective" | "inspection" | "calibration";
priority: "low" | "medium" | "high" | "critical";
status: "scheduled" | "in-progress" | "completed" | "cancelled" | "overdue";
scheduledDate: string;
dueDate: string;
assignedTo: string;
description: string;
estimatedDuration: number; // in minutes
actualDuration?: number;
completionDate?: string;
}
export interface Asset {
id: string;
name: string;
type: string;
location: string;
status: "operational" | "maintenance" | "out-of-service" | "retired";
manufacturer: string;
model: string;
serialNumber: string;
installationDate: string;
lastMaintenanceDate?: string;
nextMaintenanceDate?: string;
maintenanceInterval: number; // in days
}
export interface MaintenanceHistory {
id: string;
taskId: string;
assetId: string;
completedDate: string;
technician: string;
workPerformed: string;
partsReplaced: string[];
cost: number;
downtime: number; // in minutes
}
export const mockMaintenanceTasks: MaintenanceTask[] = [
{
id: "mt-001",
taskNumber: "MT-2024-001",
assetId: "asset-001",
assetName: "Assembly Line 1",
taskType: "preventive",
priority: "high",
status: "scheduled",
scheduledDate: "2024-02-01T08:00:00Z",
dueDate: "2024-02-01T17:00:00Z",
assignedTo: "tech-001",
description: "Monthly preventive maintenance - lubrication and inspection",
estimatedDuration: 480,
},
{
id: "mt-002",
taskNumber: "MT-2024-002",
assetId: "asset-003",
assetName: "Packaging Station 1",
taskType: "corrective",
priority: "critical",
status: "in-progress",
scheduledDate: "2024-01-20T08:00:00Z",
dueDate: "2024-01-20T12:00:00Z",
assignedTo: "tech-002",
description: "Repair conveyor belt motor",
estimatedDuration: 240,
actualDuration: 180,
},
{
id: "mt-003",
taskNumber: "MT-2024-003",
assetId: "asset-002",
assetName: "CNC Machine 1",
taskType: "calibration",
priority: "medium",
status: "completed",
scheduledDate: "2024-01-15T08:00:00Z",
dueDate: "2024-01-15T12:00:00Z",
assignedTo: "tech-001",
description: "Quarterly calibration check",
estimatedDuration: 240,
actualDuration: 210,
completionDate: "2024-01-15T11:30:00Z",
},
{
id: "mt-004",
taskNumber: "MT-2024-004",
assetId: "asset-004",
assetName: "Quality Control Station 1",
taskType: "inspection",
priority: "low",
status: "overdue",
scheduledDate: "2024-01-18T08:00:00Z",
dueDate: "2024-01-18T10:00:00Z",
assignedTo: "tech-003",
description: "Weekly visual inspection",
estimatedDuration: 120,
},
];
export const mockAssets: Asset[] = [
{
id: "asset-001",
name: "Assembly Line 1",
type: "Assembly Line",
location: "Building A - Floor 1",
status: "operational",
manufacturer: "Manufacturing Corp",
model: "AL-5000",
serialNumber: "AL5000-2023-001",
installationDate: "2023-06-01",
lastMaintenanceDate: "2024-01-01",
nextMaintenanceDate: "2024-02-01",
maintenanceInterval: 30,
},
{
id: "asset-002",
name: "CNC Machine 1",
type: "CNC Machine",
location: "Building A - Floor 2",
status: "operational",
manufacturer: "Precision Tools Inc",
model: "CNC-3000",
serialNumber: "CNC3000-2023-045",
installationDate: "2023-05-15",
lastMaintenanceDate: "2024-01-15",
nextMaintenanceDate: "2024-02-15",
maintenanceInterval: 30,
},
{
id: "asset-003",
name: "Packaging Station 1",
type: "Packaging",
location: "Building B - Floor 1",
status: "maintenance",
manufacturer: "PackTech Systems",
model: "PS-2000",
serialNumber: "PS2000-2023-012",
installationDate: "2023-07-10",
lastMaintenanceDate: "2024-01-10",
nextMaintenanceDate: "2024-02-10",
maintenanceInterval: 30,
},
{
id: "asset-004",
name: "Quality Control Station 1",
type: "Quality Control",
location: "Building A - Floor 1",
status: "operational",
manufacturer: "Quality Systems Ltd",
model: "QC-1000",
serialNumber: "QC1000-2023-078",
installationDate: "2023-08-20",
lastMaintenanceDate: "2024-01-08",
nextMaintenanceDate: "2024-02-08",
maintenanceInterval: 30,
},
];
export const mockMaintenanceHistory: MaintenanceHistory[] = [
{
id: "mh-001",
taskId: "mt-003",
assetId: "asset-002",
completedDate: "2024-01-15T11:30:00Z",
technician: "tech-001",
workPerformed:
"Calibrated all axes, checked spindle alignment, verified tool changer",
partsReplaced: [],
cost: 450.0,
downtime: 210,
},
{
id: "mh-002",
taskId: "mt-005",
assetId: "asset-001",
completedDate: "2024-01-01T14:00:00Z",
technician: "tech-002",
workPerformed:
"Lubricated all moving parts, replaced worn belts, inspected safety systems",
partsReplaced: ["Belt-AL-001", "Belt-AL-002"],
cost: 1250.0,
downtime: 480,
},
];