feat(mejoras): 14 mejoras al CRM Frasa
Fase 1 - UI: dark mode, skeletons, toasts Fase 2 - Filtros: avanzados Mi día, búsqueda global Ctrl+K Fase 3 - Datos: export Excel, notas apartados, auditoría Fase 4 - Dashboard: gráficas vendedor + métricas uso Fase 5 - Responsive: tablets optimizadas Fase 6 - PWA: IndexedDB offline, push notifications Backend: 3 tablas nuevas, 6 services, 6 endpoints nuevos 721 API tests + fronts verdes.
This commit is contained in:
26
api-gateway/src/services/nota-apartado.service.ts
Normal file
26
api-gateway/src/services/nota-apartado.service.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { prisma } from './prisma.js'
|
||||
|
||||
export interface NotaApartado {
|
||||
id: string
|
||||
apartadoId: string
|
||||
usuarioId: string
|
||||
contenido: string
|
||||
createdAt: Date
|
||||
}
|
||||
|
||||
export async function crearNota(
|
||||
apartadoId: string,
|
||||
usuarioId: string,
|
||||
contenido: string,
|
||||
): Promise<NotaApartado> {
|
||||
return prisma.notaApartado.create({
|
||||
data: { apartadoId, usuarioId, contenido },
|
||||
})
|
||||
}
|
||||
|
||||
export async function listarNotas(apartadoId: string): Promise<NotaApartado[]> {
|
||||
return prisma.notaApartado.findMany({
|
||||
where: { apartadoId },
|
||||
orderBy: { createdAt: 'desc' },
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user