feat(api,web): positivacao de novos clientes por representante no painel gerencial

- novosClientes por rep no dashboard do gerente: clientes da carteira
  cuja PRIMEIRA compra (historico todo do ERP) caiu no periodo
- Coluna "Novos no mes" (tag verde +N, ordenavel) na tabela de
  positivacao + total de novos clientes no cabecalho do card

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-22 20:23:13 +00:00
parent 54ef63f5c7
commit b6b16e1e21
3 changed files with 57 additions and 3 deletions

View File

@@ -85,7 +85,10 @@ export const SupervisorDashboardSchema = z.object({
});
export type SupervisorDashboard = z.infer<typeof SupervisorDashboardSchema>;
// novosClientes: clientes da carteira cuja PRIMEIRA compra (historico todo)
// caiu no periodo selecionado
export const PositivacaoRepSchema = z.object({
novosClientes: z.number().int().default(0),
codVendedor: z.number().int(),
nomeVendedor: z.string().nullable(),
totalClientes: z.number().int(),