FR-6.1/6.2: Sandra recebe push quando pedido entra em pending_approval; Rafael recebe quando pedido é aprovado ou recusado. Service worker registrado em background (PWA-ready via public/sw.js). FR-6.3: Badge na Topbar busca GET /notifications/pending-count (supervisores veem count de pending_approval; reps veem 0). Intervalo de 30s. FR-6.4: Botão Compartilhar no OrderDetailPage para pedidos approved/invoiced (apenas reps). Usa navigator.share() com texto formatado para WhatsApp. Infra: modelo PushSubscription (Prisma), NotificationsModule (subscribe/ unsubscribe/pending-count + PushService VAPID), VAPID keys em .env, integração no OrdersService (create → supervisores, approve/reject → repId). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
13 lines
394 B
TypeScript
13 lines
394 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { OrdersController } from './orders.controller';
|
|
import { OrdersService } from './orders.service';
|
|
import { NotificationsModule } from '../notifications/notifications.module';
|
|
|
|
@Module({
|
|
imports: [NotificationsModule],
|
|
controllers: [OrdersController],
|
|
providers: [OrdersService],
|
|
exports: [OrdersService],
|
|
})
|
|
export class OrdersModule {}
|