Run n fix#75
Conversation
- **Asset Management (Sprint 1)**:
- Added recursive asset hierarchy API.
- Added tag management and advanced search (name, serial, tags).
- Implemented circular reference protection.
- **Work Order Backend (Sprint 2)**:
- Added parts, work_order_parts, work_order_labor tables.
- Implemented WorkOrderStateMachine for strict lifecycle management.
- Implemented comprehensive Work Order CRUD API with Tasks, Parts, and Labor support.
- Added E2E tests for Assets (Hierarchy, Search) and Work Orders.
- **Documentation**:
- Added Data Dictionary and Troubleshooting guide.
- Updated walkthroughs.
| import { ZodTypeProvider, serializerCompiler, validatorCompiler } from "fastify-type-provider-zod"; | ||
| import { z } from "zod"; | ||
| import { WorkOrderService } from "../services/work-order.service"; | ||
| import { workOrderStatusEnum } from "../db/schema"; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 7 months ago
To fix the problem, we should remove the unused import workOrderStatusEnum from the import statement on line 5. This will make the code easier to understand, avoid confusion, and eliminate any wasted parsing/import time. The only needed change is to modify the import statement so that it no longer imports workOrderStatusEnum. No additional imports or changes to other lines are required.
| @@ -2,8 +2,8 @@ | ||
| import { ZodTypeProvider, serializerCompiler, validatorCompiler } from "fastify-type-provider-zod"; | ||
| import { z } from "zod"; | ||
| import { WorkOrderService } from "../services/work-order.service"; | ||
| import { workOrderStatusEnum } from "../db/schema"; | ||
|
|
||
|
|
||
| const WorkOrderStatusSchema = z.enum([ | ||
| "draft", | ||
| "open", |
| sortOrder?: "asc" | "desc"; | ||
| } | ||
| import { workOrders, workOrderTasks, workOrderParts, workOrderLabor } from "../db/schema"; | ||
| import { eq, and, desc, asc, sql, like, or, inArray, gte, lte } from "drizzle-orm"; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 7 months ago
To fix the problem, simply remove the unused inArray import from the import statement on line 3. Make sure not to disturb the other imports from "drizzle-orm" that may still be used. This change only needs to happen on the line where the inArray is imported, and no further code changes are required.
| @@ -1,6 +1,6 @@ | ||
| import { db } from "../db"; | ||
| import { workOrders, workOrderTasks, workOrderParts, workOrderLabor } from "../db/schema"; | ||
| import { eq, and, desc, asc, sql, like, or, inArray, gte, lte } from "drizzle-orm"; | ||
| import { eq, and, desc, asc, sql, like, or, gte, lte } from "drizzle-orm"; | ||
| import { WorkOrderStateMachine, WorkOrderStatus } from "./work-order-state"; | ||
|
|
||
| export interface CreateWorkOrderData { |
No description provided.