function toIsoString(value) { return value instanceof Date ? value.toISOString() : value; } export function toAdminInventoryItemDto(inventoryItem) { return { id: inventoryItem.id, productId: inventoryItem.productId, conditionId: inventoryItem.conditionId, status: inventoryItem.status, notes: inventoryItem.notes ?? null, createdAt: toIsoString(inventoryItem.createdAt), updatedAt: toIsoString(inventoryItem.updatedAt), }; }