fix: tRPC router type adjustments (celulares, red)

This commit is contained in:
2026-02-12 15:26:30 -06:00
parent 43d2ed9011
commit 1761dcdfe8
2 changed files with 5 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import { z } from 'zod'
import { TRPCError } from '@trpc/server'
import { TipoDispositivo } from '@prisma/client'
import { router, protectedProcedure, adminProcedure } from '../trpc'
import { HeadwindClient } from '@/server/services/headwind/client'
@@ -19,7 +20,7 @@ export const celularesRouter = router({
const { clienteId, estado, search, page = 1, limit = 20 } = input || {}
const where = {
tipo: { in: ['CELULAR', 'TABLET'] as const },
tipo: { in: ['CELULAR', 'TABLET'] as TipoDispositivo[] },
...(ctx.user.clienteId ? { clienteId: ctx.user.clienteId } : {}),
...(clienteId ? { clienteId } : {}),
...(estado ? { estado } : {}),