feat(dashboard): painel Rafael — meta, comissão, inativos, pedidos recentes (C7)

GET /dashboard/rep retorna meta mensal, comissão (fixa + FLEX), clientes
inativos >30 dias e pedidos dos últimos 7 dias. RepTarget model com migration.
RafaelPainel conectado à API real via useRepDashboard().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 00:29:31 +00:00
parent 356c8e3c2c
commit 6028bf1ba9
12 changed files with 432 additions and 105 deletions

View File

@@ -15,6 +15,7 @@ import {
type ProductDetail,
type ProductListQuery,
type ProductListResponse,
type ProductSyncRequest,
type ProductSyncResponse,
} from '@sar/api-interface';
import { CatalogService } from './catalog.service';
@@ -41,6 +42,7 @@ export class CatalogController {
@Post('sync')
sync(@Body() body: ProductSyncRequestDto): Promise<ProductSyncResponse> {
return this.catalog.sync(body);
const parsed = ProductSyncRequestSchema.parse(body) as ProductSyncRequest;
return this.catalog.sync(parsed);
}
}