Conecta PrimeConecta PrimeConecta Prime
O ecossistema Conecta Prime — o programa de fidelidade B2B da BAT para o varejo. Reúne três telas sobre uma única base de dados: o hub de gestão (atalhos para pagamentos e simulador), os pagamentos Prime (mensalidades, com troca Pix ⇄ boleto e download) e o simulador de bonificação (estima pacotes bonificados a partir de um objetivo mensal). Tudo entra pelo contexto de um varejo (visita), exceto o simulador, que também abre de forma avulsa. The Conecta Prime ecosystem — BAT's B2B loyalty program for retail. It gathers three screens over a single data backbone: the management hub (shortcuts to payments and simulator), the Prime payments (monthly fees, with Pix ⇄ bank slip switch and download) and the bonus simulator (estimates bonus packages from a monthly target). Everything is entered through a retail's context (visit), except the simulator, which also opens standalone. El ecosistema Conecta Prime — el programa de fidelidad B2B de BAT para el punto de venta. Reúne tres pantallas sobre una única base de datos: el hub de gestión (atajos a pagos y simulador), los pagos Prime (mensualidades, con cambio Pix ⇄ boleto y descarga) y el simulador de bonificación (estima paquetes bonificados a partir de un objetivo mensual). Todo se entra por el contexto de un punto de venta (visita), salvo el simulador, que también abre de forma suelta.
O que é e para que serveWhat it is and what it's forQué es y para qué sirve
O Conecta Prime é o programa de fidelidade B2B da BAT: o varejo assinante paga uma mensalidade e, em troca, acumula pacotes bonificados conforme atinge metas de compra. Dentro do app do representante de vendas, o Prime aparece como um pequeno ecossistema de três telas que compartilham a mesma base de dados de um varejo. The Conecta Prime is BAT's B2B loyalty program: the subscribing retail pays a monthly fee and, in return, accrues bonus packages as it hits purchase targets. Inside the sales rep app, Prime shows up as a small three-screen ecosystem sharing the same retail data backbone. El Conecta Prime es el programa de fidelidad B2B de BAT: el punto de venta suscrito paga una mensualidad y, a cambio, acumula paquetes bonificados a medida que alcanza metas de compra. Dentro de la app del representante de ventas, Prime aparece como un pequeño ecosistema de tres pantallas que comparten la misma base de datos de un punto de venta.
Gestão (hub)Management (hub)Gestión (hub)
Uma grade de atalhos: abre Pagamentos e/ou Simulador — cada um só aparece se o varejo o tem habilitado.A grid of shortcuts: opens Payments and/or Simulator — each shows only if the retail has it enabled.Una grilla de atajos: abre Pagos y/o Simulador — cada uno aparece solo si el punto de venta lo tiene habilitado.
PagamentosPaymentsPagos
A lista das mensalidades: valor, vencimento e status. Permite trocar Pix ⇄ boleto e baixar o boleto.The list of monthly fees: value, due date and status. Lets you switch Pix ⇄ bank slip and download the slip.La lista de mensualidades: valor, vencimiento y estado. Permite cambiar Pix ⇄ boleto y descargar el boleto.
SimuladorSimulatorSimulador
O representante digita um objetivo mensal (em pacotes) e vê a bonificação estimada em 1, 12 e 24 meses.The rep types a monthly target (in packages) and sees the estimated bonus over 1, 12 and 24 months.El representante escribe un objetivo mensual (en paquetes) y ve la bonificación estimada en 1, 12 y 24 meses.
Habilitação duplaDouble gatingHabilitación doble O Prime é exclusivo do Brasil (BR) — só existe nesse mercado. Além disso, dentro do BR cada varejo só vê Pagamentos e Simulador se o backend os marcar como disponíveis para aquele varejo. Sem os dois sinais (mercado + varejo), a funcionalidade não aparece. Prime is Brazil-only (BR) — it exists in that market alone. On top of that, within BR each retail only sees Payments and Simulator if the backend flags them as available for that retail. Without both signals (market + retail), the feature does not show. Prime es exclusivo de Brasil (BR) — solo existe en ese mercado. Además, dentro de BR cada punto de venta solo ve Pagos y Simulador si el backend los marca como disponibles para ese punto de venta. Sin ambas señales (mercado + punto de venta), la funcionalidad no aparece.
Como acessarHow to openCómo acceder
O Prime tem quatro portas de entrada. A gestão e os pagamentos passam sempre por um varejo (uma visita); o simulador tem ainda dois atalhos avulsos, que abrem uma simulação genérica (sem varejo).Prime has four entry points. Management and payments always go through a retail (a visit); the simulator additionally has two standalone shortcuts, which open a generic simulation (no retail).Prime tiene cuatro puertas de entrada. La gestión y los pagos pasan siempre por un punto de venta (una visita); el simulador tiene además dos atajos sueltos, que abren una simulación genérica (sin punto de venta).
- Detalhe da visita → Conecta PrimeVisit detail → Conecta PrimeDetalle de la visita → Conecta PrimeNa grade de ferramentas do Detalhe da visita, o botão Conecta Prime abre o hub de gestão daquele varejo. É o caminho principal.In the Visit detail tools grid, the Conecta Prime button opens that retail's management hub. This is the main path.En la grilla de herramientas del Detalle de la visita, el botón Conecta Prime abre el hub de gestión de ese punto de venta. Es el camino principal.
- Hub → Pagamentos / SimuladorHub → Payments / SimulatorHub → Pagos / SimuladorDo hub, os dois atalhos abrem a lista de pagamentos ou o simulador já no contexto do varejo.From the hub, the two shortcuts open the payments list or the simulator already in the retail's context.Desde el hub, los dos atajos abren la lista de pagos o el simulador ya en el contexto del punto de venta.
- Home → módulo de açõesHome → actions moduleHome → módulo de accionesO módulo de ações rápidas da Home tem um atalho Simulador Prime que abre a simulação sem varejo.The Home quick-actions module has a Prime Simulator shortcut that opens the simulation without a retail.El módulo de acciones rápidas del Home tiene un atajo Simulador Prime que abre la simulación sin punto de venta.
- Menu lateral → Simulador PrimeSide menu → Prime SimulatorMenú lateral → Simulador PrimeO item Simulador Prime do menu (drawer) também abre a simulação avulsa.The Prime Simulator item in the drawer menu also opens the standalone simulation.El ítem Simulador Prime del menú (drawer) también abre la simulación suelta.
Estrutura das telasScreen structureEstructura de las pantallas
Hub de gestãoManagement hubHub de gestión
- Data de sincronizaçãoSync dateFecha de sincronización
- Faixa com a data da última sincronização dos dados de Prime.Strip with the last sync date of the Prime data.Franja con la fecha de última sincronización de los datos de Prime.
- Card do varejoRetail cardTarjeta del punto de venta
- Nome do varejo + código SAP (do contexto da visita).Retail name + SAP code (from the visit context).Nombre del punto de venta + código SAP (del contexto de la visita).
- Grade de atalhosShortcuts gridGrilla de atajos
- Até dois botões grandes: Pagamentos e Simulador. Cada um só aparece se estiver habilitado para o varejo; se nenhum aparece, a grade some.Up to two large buttons: Payments and Simulator. Each shows only if enabled for the retail; if none shows, the grid disappears.Hasta dos botones grandes: Pagos y Simulador. Cada uno aparece solo si está habilitado para el punto de venta; si ninguno aparece, la grilla desaparece.
PagamentosPaymentsPagos
- Card do varejoRetail cardTarjeta del punto de venta
- Mesmo cabeçalho do hub (nome + SAP).Same header as the hub (name + SAP).Mismo encabezado que el hub (nombre + SAP).
- Lista de mensalidadesFee listLista de mensualidades
- Um card por mensalidade, ordenados do mais recente ao mais antigo: mês de referência, valor, vencimento e uma tag de status. Se não houver pagamentos, mostra um estado vazio.One card per fee, sorted newest to oldest: reference month, value, due date and a status tag. If there are no payments, an empty state shows.Una tarjeta por mensualidad, ordenadas de la más reciente a la más antigua: mes de referencia, valor, vencimiento y una etiqueta de estado. Si no hay pagos, muestra un estado vacío.
- Ações do cardCard actionsAcciones de la tarjeta
- Quando permitido: botão trocar para Pix / boleto e/ou baixar boleto.When allowed: switch to Pix / bank slip button and/or download slip.Cuando está permitido: botón cambiar a Pix / boleto y/o descargar boleto.
SimuladorSimulatorSimulador
- CabeçalhoHeaderEncabezado
- Título do simulador. Aberto por um varejo, mostra também o card do varejo; avulso, mostra só o ícone + título.Simulator title. Opened from a retail, it also shows the retail card; standalone, only the icon + title.Título del simulador. Abierto desde un punto de venta, muestra también la tarjeta del punto de venta; suelto, solo el ícono + título.
- Enquadramento do varejoRetail framingEncuadre del punto de venta
- Card com os parâmetros da faixa: faixa, % adicional, % limitador, mensalidade e máx. de pacotes bonificados.Card with the tier parameters: tier, additional %, limiter %, monthly fee and max bonus packages.Tarjeta con los parámetros de la franja: franja, % adicional, % limitador, mensualidad y máx. de paquetes bonificados.
- Objetivo do mêsMonthly targetObjetivo del mes
- Um campo numérico (objetivo em pacotes) + botão Calcular.A numeric field (target in packages) + Calculate button.Un campo numérico (objetivo en paquetes) + botón Calcular.
- Bonificação PrimePrime bonusBonificación Prime
- Card com a estimativa (estimado/máximo) em 1 mês, 12 meses e 24 meses, em pacotes.Card with the estimate (estimated/max) over 1 month, 12 months and 24 months, in packages.Tarjeta con la estimación (estimado/máximo) en 1 mes, 12 meses y 24 meses, en paquetes.
- Nota importanteImportant noteNota importante
- Rodapé com avisos de elegibilidade e a ressalva de que a estimativa não é obrigação de pagamento (ver seção 05).Footer with eligibility warnings and the caveat that the estimate is not a payment obligation (see section 05).Pie con avisos de elegibilidad y la salvedad de que la estimación no es obligación de pago (ver sección 05).
Status de pagamentoPayment statusesEstados de pago
Cada mensalidade traz uma tag de status. Diferente do status de pedido, aqui o texto é traduzido pelo app (a lista completa dos valores de wire está na seção técnica Enums):Each fee carries a status tag. Unlike the order status, here the text is translated by the app (the full list of wire values is in the technical Enums section):Cada mensualidad trae una etiqueta de estado. A diferencia del estado del pedido, aquí el texto se traduce en la app (la lista completa de valores de wire está en la sección técnica Enums):
Ações e simuladorActions & simulatorAcciones y simulador
Trocar forma de pagamento (Pix ⇄ boleto)Switch payment method (Pix ⇄ bank slip)Cambiar forma de pago (Pix ⇄ boleto)
Quem aparece é decidido pelo backend: cada mensalidade chega marcando se pode trocar para Pix, para boleto e/ou baixar o boleto. O botão de troca pede uma confirmação num modal (com um aviso sobre a consequência da troca) antes de enviar.What appears is decided by the backend: each fee arrives flagging whether it can switch to Pix, to bank slip and/or download the slip. The switch button asks for a confirmation in a modal (with a warning about the consequence) before submitting.Lo que aparece lo decide el backend: cada mensualidad llega marcando si puede cambiar a Pix, a boleto y/o descargar el boleto. El botón de cambio pide una confirmación en un modal (con un aviso sobre la consecuencia) antes de enviar.
- Toque em trocarTap switchToque cambiarAbre um modal com o alerta e uma nota sobre o destino (Pix ou boleto).Opens a modal with the warning and a note about the target (Pix or bank slip).Abre un modal con la alerta y una nota sobre el destino (Pix o boleto).
- ConfirmeConfirmConfirme"Cancelar" desiste; "Confirmar" troca. Em sucesso, um aviso verde aparece e o card se atualiza."Cancel" backs out; "Confirm" switches. On success, a green notice shows and the card refreshes."Cancelar" desiste; "Confirmar" cambia. En éxito, un aviso verde aparece y la tarjeta se actualiza.
- Baixar boletoDownload slipDescargar boletoQuando disponível, abre o link do boleto no navegador. Se o link falha, mostra um aviso de erro.When available, opens the slip link in the browser. If the link fails, an error notice shows.Cuando está disponible, abre el enlace del boleto en el navegador. Si el enlace falla, muestra un aviso de error.
Calcular a bonificação (simulador)Calculate the bonus (simulator)Calcular la bonificación (simulador)
O representante digita um objetivo do mês (em pacotes) e toca em Calcular. O app estima quantos pacotes seriam bonificados em 1 mês e projeta para 12 e 24 meses (o resultado de 1 mês vezes 12 e vezes 24). O cálculo é 100% local — usa só os parâmetros da faixa que já vieram do backend, sem nova chamada de rede. A fórmula exata está na seção técnica Notifiers & State.The rep types a monthly target (in packages) and taps Calculate. The app estimates how many packages would be bonused in 1 month and projects it to 12 and 24 months (the 1-month result times 12 and times 24). The calculation is 100% local — it uses only the tier parameters already fetched from the backend, with no new network call. The exact formula is in the technical Notifiers & State section.El representante escribe un objetivo del mes (en paquetes) y toca Calcular. La app estima cuántos paquetes se bonificarían en 1 mes y lo proyecta a 12 y 24 meses (el resultado de 1 mes por 12 y por 24). El cálculo es 100% local — usa solo los parámetros de la franja ya traídos del backend, sin nueva llamada de red. La fórmula exacta está en la sección técnica Notifiers & State.
Ressalvas do simuladorSimulator caveatsSalvedades del simulador A tela mostra duas notas fixas: (1) para ser elegível ao Prime, o varejo não pode estar ativo em outro programa B2B da BAT; (2) a simulação de pacotes é baseada em Rothmans Blue, não representa obrigação de pagamento e é uma informação destinada ao vendedor da BAT. The screen shows two fixed notes: (1) to be eligible for Prime, the retail cannot be active in another BAT B2B program; (2) the package simulation is based on Rothmans Blue, does not represent a payment obligation and is information intended for the BAT seller. La pantalla muestra dos notas fijas: (1) para ser elegible a Prime, el punto de venta no puede estar activo en otro programa B2B de BAT; (2) la simulación de paquetes se basa en Rothmans Blue, no representa obligación de pago y es información destinada al vendedor de BAT.
Arquitetura e fluxo de dadosArchitecture & data flowArquitectura y flujo de datos
Clean Architecture + Riverpod + Freezed + gRPC + ObjectBox. As três telas compartilham uma única base de dados (o agregado PrimeManagement) e um único repository. Há dois fluxos: a leitura (um RPC getPrimeManagement, com cache write-through) e a escrita pontual da troca de forma de pagamento (RPC dedicado changePrimePaymentMethod — não passa pelo Dispatcher).Clean Architecture + Riverpod + Freezed + gRPC + ObjectBox. The three screens share a single data backbone (the PrimeManagement aggregate) and one repository. There are two flows: the read (one RPC getPrimeManagement, with cache write-through) and the targeted write of the payment-method switch (a dedicated RPC changePrimePaymentMethod — it does not go through the Dispatcher).Clean Architecture + Riverpod + Freezed + gRPC + ObjectBox. Las tres pantallas comparten una única base de datos (el agregado PrimeManagement) y un único repository. Hay dos flujos: la lectura (un RPC getPrimeManagement, con cache write-through) y la escritura puntual del cambio de forma de pago (un RPC dedicado changePrimePaymentMethod — no pasa por el Dispatcher).
Leitura · cache + fallback remotoRead · cache + remote fallbackLectura · caché + fallback remoto
O agregado atravessa quatro representações ligadas por mappers, com cache write-through (todo fetch grava no ObjectBox). Os notifiers leem por varejo (getCachedByAccountSfid) ou o agregado inteiro (execute):The aggregate crosses four representations linked by mappers, with cache write-through (every fetch writes to ObjectBox). Notifiers read per retail (getCachedByAccountSfid) or the whole aggregate (execute):El agregado atraviesa cuatro representaciones unidas por mappers, con cache write-through (todo fetch graba en ObjectBox). Los notifiers leen por punto de venta (getCachedByAccountSfid) o el agregado entero (execute):
- PrimeManagementReplygRPC proto
- toDTOPrimeManagementDTODTO · Freezed
- toEntityPrimeManagementEntitydomain
- toModelPrimeManagementModelObjectBox · write-through
- toEntityPrimeManagementEntitydomain · cache
- get*GetPrimeManagementUseCase
- build / _load3 Notifiers + State
- → UIManagement · Payments · Simulator
- build / _load3 Notifiers + State
- get*GetPrimeManagementUseCase
- toEntityPrimeManagementEntitydomain · cache
- toModelPrimeManagementModelObjectBox · write-through
- toEntityPrimeManagementEntitydomain
- toDTOPrimeManagementDTODTO · Freezed
Escrita · troca de pagamento (RPC dedicado)Write · payment switch (dedicated RPC)Escritura · cambio de pago (RPC dedicado)
A troca Pix ⇄ boleto chama um RPC dedicado (changePrimePaymentMethod), recebe de volta o PrimePayment atualizado e faz um merge cirúrgico desse único pagamento no cache (não regrava o agregado inteiro); depois o notifier relê o cache:The Pix ⇄ bank slip switch calls a dedicated RPC (changePrimePaymentMethod), gets back the updated PrimePayment and does a surgical merge of that single payment into the cache (it does not rewrite the whole aggregate); then the notifier re-reads the cache:El cambio Pix ⇄ boleto llama un RPC dedicado (changePrimePaymentMethod), recibe de vuelta el PrimePayment actualizado y hace un merge quirúrgico de ese único pago en el caché (no reescribe el agregado entero); luego el notifier relee el caché:
- PrimePaymentCardWidgetUI
- switchPaymentMethodPrimePaymentsNotifier
- executeChangePrimePaymentMethodUseCase
- changePrimePaymentMethodPrimeManagementRepositoryImpl
- RPCchangePrimePaymentMethodPrimeManagementConectaRepService
- merge + re-readObjectBox cache → _load→ UI
- RPCchangePrimePaymentMethodPrimeManagementConectaRepService
- changePrimePaymentMethodPrimeManagementRepositoryImpl
- executeChangePrimePaymentMethodUseCase
- switchPaymentMethodPrimePaymentsNotifier
Notas de implementaçãoImplementation notesNotas de implementación
Os três notifiers são family (por visitSfid, ou accountSfid no simulador). O locationHierarchySfid de todo request é resolvido no Repository via currentResourceProvider (§25) — nem notifier nem UseCase o carregam. A troca de pagamento é remote-first (só toca o cache após sucesso do RPC), mas é um RPC próprio da feature, não o Dispatcher genérico.
The three notifiers are family (by visitSfid, or accountSfid in the simulator). The locationHierarchySfid of every request is resolved in the Repository via currentResourceProvider (§25) — neither notifier nor UseCase carries it. The payment switch is remote-first (it only touches the cache after RPC success), but it is a feature-owned RPC, not the generic Dispatcher.
Los tres notifiers son family (por visitSfid, o accountSfid en el simulador). El locationHierarchySfid de cada request se resuelve en el Repository vía currentResourceProvider (§25) — ni notifier ni UseCase lo cargan. El cambio de pago es remote-first (solo toca el caché tras el éxito del RPC), pero es un RPC propio de la feature, no el Dispatcher genérico.
Modelo de dadosData modelModelo de datos
O agregado Prime existe em quatro representações ao longo das camadas — Proto (wire gRPC) → DTO (Freezed) → Model (ObjectBox) → Entity (domínio) — e cada fronteira é atravessada por um mapper. O fetch é write-through: todo retorno é gravado no ObjectBox e a UI lê do cache. Diferente do modelo de Pedidos, aqui há três particularidades: as datas são parseadas já no DTO (não no Model), dois wrappers de proto (PrimeHub, PrimePerformance) são achatados na conversão, e a lista raiz é renomeada (primeDataByAccount → accountsData).The Prime aggregate exists in four representations across the layers — Proto (gRPC wire) → DTO (Freezed) → Model (ObjectBox) → Entity (domain) — and each boundary is crossed by a mapper. Fetch is write-through: every response is written to ObjectBox and the UI reads from cache. Unlike the Orders model, here there are three quirks: dates are parsed at the DTO (not the Model), two proto wrappers (PrimeHub, PrimePerformance) are flattened in the conversion, and the root list is renamed (primeDataByAccount → accountsData).El agregado Prime existe en cuatro representaciones a lo largo de las capas — Proto (wire gRPC) → DTO (Freezed) → Model (ObjectBox) → Entity (dominio) — y cada frontera se cruza con un mapper. El fetch es write-through: toda respuesta se graba en ObjectBox y la UI lee del caché. A diferencia del modelo de Pedidos, aquí hay tres particularidades: las fechas se parsean ya en el DTO (no en el Model), dos wrappers de proto (PrimeHub, PrimePerformance) se aplanan en la conversión, y la lista raíz se renombra (primeDataByAccount → accountsData).
O container raiz é PrimeManagement (lastSyncAt gerado no mapper + simulator global + accountsData[]). Cada PrimeAccountData carrega o que aquele varejo tem: config do simulador, pagamentos, calendário e períodos de performance (com faixas). Os enums só existem tipados na Entity (PaymentStatus, PaymentMethod); em Proto/DTO/Model trafegam como String. A seguir, na ordem: o proto, as estruturas de dados campo-a-campo por camada, e os mappers.The root container is PrimeManagement (lastSyncAt generated in the mapper + global simulator + accountsData[]). Each PrimeAccountData carries what that retail has: simulator config, payments, calendar and performance periods (with slabs). Enums are only typed in the Entity (PaymentStatus, PaymentMethod); in Proto/DTO/Model they travel as String. Next, in order: the proto, the field-by-field data structures per layer, and the mappers.El container raíz es PrimeManagement (lastSyncAt generado en el mapper + simulator global + accountsData[]). Cada PrimeAccountData lleva lo que ese punto de venta tiene: config del simulador, pagos, calendario y períodos de performance (con franjas). Los enums solo están tipados en la Entity (PaymentStatus, PaymentMethod); en Proto/DTO/Model viajan como String. A continuación, en orden: el proto, las estructuras de datos campo a campo por capa, y los mappers.
Proto
PrimeManagementConectaRep.proto · proto3 · package mn.bat.conectarep.streambridge. Um serviço (PrimeManagementConectaRepService), dois métodos unários — um lê o agregado, o outro troca a forma de pagamento:One service (PrimeManagementConectaRepService), two unary methods — one reads the aggregate, the other switches the payment method:Un servicio (PrimeManagementConectaRepService), dos métodos unarios — uno lee el agregado, el otro cambia la forma de pago:
getPrimeManagementunaryrpc getPrimeManagement(PrimeManagementRequest) returns (PrimeManagementReply)
path /mn.bat.conectarep.streambridge.PrimeManagementConectaRepService/getPrimeManagement
PrimeManagementRequestlocationHierarchySfidstring· #1 · hierarquia do representante de vendas (resolvida no repository)sales rep hierarchy (resolved in the repository)jerarquía del representante de ventas (resuelta en el repository)dateReferencestring· #2 · optionallastModifiedDatestring· #3 · optional
PrimeManagementReplyPrimeSimulatorConfig simulator · repeated PrimeAccountData primeDataByAccount — a config global do simulador + os dados de Prime por varejo. As estruturas estão detalhadas abaixo.the global simulator config + the per-retail Prime data. The structures are detailed below.la config global del simulador + los datos de Prime por punto de venta. Las estructuras están detalladas abajo.
changePrimePaymentMethodunaryrpc changePrimePaymentMethod(ChangePrimePaymentMethodRequest) returns (ChangePrimePaymentMethodReply)
path /mn.bat.conectarep.streambridge.PrimeManagementConectaRepService/changePrimePaymentMethod
ChangePrimePaymentMethodRequestlocationHierarchySfidstring· #1 · resolvido no repositoryresolved in the repositoryresuelto en el repositoryaccountSfidstring· #2 · varejo do pagamentothe payment's retailpunto de venta del pagopaymentIdstring· #3paymentMethodstring· #4 · destino (pix/boleto)target (pix/boleto)destino (pix/boleto)
ChangePrimePaymentMethodReplyPrimePayment payment — o pagamento já atualizado, que o repository faz merge no cache.the already-updated payment, which the repository merges into the cache.el pago ya actualizado, que el repository fusiona en el caché.
Estruturas de dadosData structuresEstructuras de datos
Um dropdown por estrutura, aninhados pela hierarquia. Cada tabela tem uma coluna por camada — Proto · DTO · Model · Entity; o texto em destaque marca onde o tipo/nome primeiro muda (parse de data no DTO, achatamento/rename no Proto, relação no Model, enum na Entity).One dropdown per structure, nested by hierarchy. Each table has one column per layer — Proto · DTO · Model · Entity; the accent text marks where the type/name first changes (date parse at the DTO, flatten/rename at the Proto, relation at the Model, enum at the Entity).Un dropdown por estructura, anidados por jerarquía. Cada tabla tiene una columna por capa — Proto · DTO · Model · Entity; el texto destacado marca dónde primero cambia el tipo/nombre (parse de fecha en el DTO, aplanamiento/rename en el Proto, relación en el Model, enum en la Entity).
PrimeManagement raiz 3 campos
Campo Proto DTO Model Entity lastSyncAt— geradoDateTime DateTime DateTime simulatorPrimeSimulatorConfig …DTO? ToOne<…Model>…Entity? accountsDatarepeated primeDataByAccountList<…DTO> ToMany<…Model>List<…Entity> PrimeSimulatorConfig PrimeManagement.simulator · PrimeAccountData.simulatorConfig 5 campos
Campo Proto DTO Model Entity rangeNamestring String String String monthlyPaymentdouble double double double factordouble double double double limitPercentagedouble double double double maxPackagesint32 int int int PrimeAccountData PrimeManagement.accountsData[] 7 campos
Campo Proto DTO Model Entity accountSfidstring String String String displayPrimePaymenthub.displayPrimePaymentbool bool bool displayPrimeSimulatorhub.displayPrimeSimulatorbool bool bool simulatorConfigPrimeSimulatorConfig …DTO? ToOne<…Model>…Entity? paymentsrepeated PrimePayment List<…DTO> ToMany<…Model>List<…Entity> calendarPrimeCalendar …DTO? ToOne<…Model>…Entity? performancePeriodsperformance.periodsList<…DTO> ToMany<…Model>List<…Entity> PrimePayment PrimeAccountData.payments[] 13 campos
Campo Proto DTO Model Entity idstring String paymentIdString dateReferencestring DateTime?DateTime? DateTime? dateDuestring DateTime?DateTime? DateTime? paymentAmountdouble double double double paymentStatusstring String String PaymentStatus (status)paymentMethodstring String String PaymentMethod (method)linkTicketstring String? String? String? pixKeystring String? String? String? qrCodePixstring String? String? String? canDownloadBoletobool bool bool bool canSwitchToPixbool bool bool bool canSwitchToBoletobool bool bool bool canCopyPixKeybool bool bool bool PrimeCalendar PrimeAccountData.calendar 2 campos
Campo Proto DTO Model Entity firstAccessDatestring DateTime?DateTime? DateTime? bonusTotalAmountdouble double double double PrimePerformancePeriod PrimeAccountData.performancePeriods[] 11 campos
Campo Proto DTO Model Entity monthReferencestring String String String monthDescriptionstring String String String realizedint32 int int int inTransitint32 int int int targetint32 int int int maxPercentint32 int int int rewardAtTargetint32 int int int rewardAtMaxint32 int int int slabsrepeated PrimeSlab List<…DTO> ToMany<…Model>List<…Entity> lastUpdatedstring DateTime?DateTime? DateTime? rewardProductNamestring String String String PrimeSlab PrimePerformancePeriod.slabs[] 3 campos
Campo Proto DTO Model Entity minValuedouble double double double maxValuedouble double double double rewardValuedouble double double double
Wrappers só-proto (somem no DTO): PrimeHub {displayPrimePayment, displayPrimeSimulator} é achatado em PrimeAccountData; PrimePerformance {periods} é desembrulhado em performancePeriods.Proto-only wrappers (gone at the DTO): PrimeHub {displayPrimePayment, displayPrimeSimulator} is flattened into PrimeAccountData; PrimePerformance {periods} is unwrapped into performancePeriods.Wrappers solo-proto (desaparecen en el DTO): PrimeHub {displayPrimePayment, displayPrimeSimulator} se aplana en PrimeAccountData; PrimePerformance {periods} se desenvuelve en performancePeriods.
Mappers
As conversões entre camadas, como extension (5 direções por tipo). No Prime, DTO→Entity e Model→Entity usam toEntity() (não toDomain()):The conversions between layers, as extensions (5 directions per type). In Prime, DTO→Entity and Model→Entity use toEntity() (not toDomain()):Las conversiones entre capas, como extension (5 direcciones por tipo). En Prime, DTO→Entity y Model→Entity usan toEntity() (no toDomain()):
| DireçãoDirectionDirección | MétodoMethodMétodo |
|---|---|
| JSON → DTO | static fromMap(Map) (parseia datas via DateTimeUtils.tryParse; achata hub/performance)(parses dates via DateTimeUtils.tryParse; flattens hub/performance)(parsea fechas vía DateTimeUtils.tryParse; aplana hub/performance) |
| Proto → DTO | toDTO() (gera lastSyncAt com DateTimeUtils.now(); mesmo parse/achatamento)(generates lastSyncAt with DateTimeUtils.now(); same parse/flatten)(genera lastSyncAt con DateTimeUtils.now(); mismo parse/aplanado) |
| DTO → Entity | toEntity() (resolve enums: PaymentStatus/PaymentMethod.fromWire)(resolves enums: PaymentStatus/PaymentMethod.fromWire)(resuelve enums: PaymentStatus/PaymentMethod.fromWire) |
| Entity → Model | toModel() (enums → .value; id→paymentId; popula ToMany/ToOne)(enums → .value; id→paymentId; fills relations)(enums → .value; id→paymentId; llena relaciones) |
| Model → Entity | toEntity() |
Os únicos deltasThe only deltasLos únicos deltas
- enums tipados só na Entity:
paymentStatus→status(PaymentStatus) epaymentMethod→method(PaymentMethod) —Stringnas outrasenums typed only in the Entity:paymentStatus→status(PaymentStatus) andpaymentMethod→method(PaymentMethod) —Stringelsewhereenums tipados solo en la Entity:paymentStatus→status(PaymentStatus) ypaymentMethod→method(PaymentMethod) —Stringen las demás - datas
String→DateTime?parseadas no DTO (não no Model):dateReference,dateDue,firstAccessDate,lastUpdateddatesString→DateTime?parsed at the DTO (not the Model):dateReference,dateDue,firstAccessDate,lastUpdatedfechasString→DateTime?parseadas en el DTO (no en el Model):dateReference,dateDue,firstAccessDate,lastUpdated - rename
id→paymentIdsó no Model (PrimePayment)renameid→paymentIdonly in the Model (PrimePayment)renameid→paymentIdsolo en el Model (PrimePayment) - rename
primeDataByAccount→accountsDatano Proto→DTOrenameprimeDataByAccount→accountsDataat Proto→DTOrenameprimeDataByAccount→accountsDataen Proto→DTO - achatamento dos wrappers
PrimeHubePrimePerformance(só existem no proto)flatten of thePrimeHubandPrimePerformancewrappers (proto-only)aplanado de los wrappersPrimeHubyPrimePerformance(solo-proto) - relações viram
ToMany/ToOneno Modelrelations becomeToMany/ToOnein the Modelrelaciones pasan aToMany/ToOneen el Model lastSyncAtgerado no mapper comDateTimeUtils.now(), uma vez no containerPrimeManagementgenerated in the mapper withDateTimeUtils.now(), once in thePrimeManagementcontainergenerado en el mapper conDateTimeUtils.now(), una vez en el containerPrimeManagement
Repository
PrimeManagementRepositoryImpl implementaimplementsimplementa PrimeManagementRepositoryInterface e injeta os 3 datasources (mock/local/remote) + ConnectivityService + a flag useMock + Ref. Método a método:and injects the 3 datasources (mock/local/remote) + ConnectivityService + the useMock flag + Ref. Method by method:e inyecta los 3 datasources (mock/local/remote) + ConnectivityService + la flag useMock + Ref. Método a método:
getPrimeManagement({source}) mock / local / remote
RetornaReturnsDevuelve Result<PrimeManagementEntity, Failure>
Ponto de entrada do agregado. Decide a fonte pela source + flags e grava no cache (write-through).Aggregate entry point. Picks the source from source + flags and writes to cache (write-through).Punto de entrada del agregado. Elige la fuente por source + flags y graba en caché (write-through).
Árvore de decisão de fonteSource decision treeÁrbol de decisión de fuente
useMock== true ouorosource == mock→_fetchFromMock(): lê o mock, mapeia, grava no cache.→_fetchFromMock(): reads the mock, maps, writes to cache.→_fetchFromMock(): lee el mock, mapea, graba en caché.source == localou offlineor offlineu offline→_fetchFromCacheOrFail()(sem rede; erro se o cache está vazio).→_fetchFromCacheOrFail()(no network; errors if the cache is empty).→_fetchFromCacheOrFail()(sin red; error si el caché está vacío).- senão (remoto + conectado)otherwise (remote + connected)si no (remoto + conectado)→
_fetchFromRemoteWithFallback(): lêcurrentResourceProvider; senullcai pro cache; senão chama o remoto comlocationHierarchyId, mapeia e grava; em erro, fallback pro cache.→_fetchFromRemoteWithFallback(): readscurrentResourceProvider; ifnullfalls back to cache; else calls remote withlocationHierarchyId, maps and writes; on error, falls back to cache.→_fetchFromRemoteWithFallback(): leecurrentResourceProvider; sinullcae al caché; si no llama al remoto conlocationHierarchyId, mapea y graba; en error, fallback al caché.
getCachedPrimeManagement() local
RetornaReturnsDevuelve Result<PrimeManagementEntity?, Failure>
Lê o agregado do ObjectBox (sem rede). null se o cache está vazio.Reads the aggregate from ObjectBox (no network). null if the cache is empty.Lee el agregado del ObjectBox (sin red). null si el caché está vacío.
getCachedPrimeAccountDataBySfid({accountSfid}) local · by retail
RetornaReturnsDevuelve Result<PrimeAccountDataEntity?, Failure>
Lookup single-item por varejo (§28-A, cache-only): lê o agregado do cache e filtra accountDataFor(accountSfid) em memória.Single-item lookup per retail (§28-A, cache-only): reads the aggregate from cache and filters accountDataFor(accountSfid) in memory.Lookup single-item por punto de venta (§28-A, cache-only): lee el agregado del caché y filtra accountDataFor(accountSfid) en memoria.
getCachedPrimeManagementLastSyncAt() local
RetornaReturnsDevuelve Future<DateTime?>
Só o lastSyncAt do agregado em cache, para o DataLoadInfo (§23) da gestão e dos pagamentos.Only the cached aggregate's lastSyncAt, for the management and payments DataLoadInfo (§23).Solo el lastSyncAt del agregado en caché, para el DataLoadInfo (§23) de la gestión y los pagos.
savePrimeManagement({entity}) local · write-through
RetornaReturnsDevuelve Result<void, Failure>
Grava o agregado no ObjectBox (limpa e regrava). Usado internamente pelo write-through de cada fetch e pelo merge da troca de pagamento.Writes the aggregate to ObjectBox (clears and rewrites). Used internally by each fetch's write-through and by the payment-switch merge.Graba el agregado en ObjectBox (limpia y reescribe). Usado internamente por el write-through de cada fetch y por el merge del cambio de pago.
changePrimePaymentMethod({accountSfid, paymentId, targetMethod}) remote-first · dedicated RPC
RetornaReturnsDevuelve Result<void, Failure>
Troca a forma de pagamento. Busca o PrimePayment atualizado (_fetchSwitchedPayment: mock, ou o RPC remoto com locationHierarchyId resolvido do resource; erro se offline / sem resource) e faz merge só desse pagamento no agregado em cache (_mergeUpdatedPaymentIntoCache). Remote-first: só toca o cache após sucesso.Switches the payment method. Fetches the updated PrimePayment (_fetchSwitchedPayment: mock, or the remote RPC with locationHierarchyId resolved from the resource; errors if offline / no resource) and merges just that payment into the cached aggregate (_mergeUpdatedPaymentIntoCache). Remote-first: only touches the cache after success.Cambia la forma de pago. Busca el PrimePayment actualizado (_fetchSwitchedPayment: mock, o el RPC remoto con locationHierarchyId resuelto del resource; error si offline / sin resource) y hace merge solo de ese pago en el agregado en caché (_mergeUpdatedPaymentIntoCache). Remote-first: solo toca el caché tras el éxito.
Datasources
Três datasources, um provider cada. O fundo interno é a cor da página.Three datasources, one provider each. The inner background is the page color.Tres datasources, un provider cada uno. El fondo interno es el color de la página.
Remote · PrimeManagementRemoteDataSource
Thin shell sobre o stub gRPC PrimeManagementConectaRepServiceClient. Erros de gRPC passam pelo GrpcExceptionHandler; o resto vira ServerException.Thin shell over the gRPC stub PrimeManagementConectaRepServiceClient. gRPC errors go through GrpcExceptionHandler; the rest becomes ServerException.Thin shell sobre el stub gRPC PrimeManagementConectaRepServiceClient. Los errores gRPC pasan por GrpcExceptionHandler; el resto se vuelve ServerException.
getPrimeManagement({locationHierarchySfid, lastModifiedDate?})
- EnvioSendsEnvío
PrimeManagementRequest(locationHierarchySfid;lastModifiedDatese presenteif presentsi está presente)- RetornoReturnsRetorno
PrimeManagementDTO(reply.toDTO())
changePrimePaymentMethod({locationHierarchySfid, accountSfid, paymentId, paymentMethod})
- EnvioSendsEnvío
ChangePrimePaymentMethodRequest- RetornoReturnsRetorno
PrimePaymentDTO(reply.payment.toDTO())
Mock · PrimeManagementMockDataSource
Lê o JSON de mock por mercado (prime_management, sintético ou real via useRealMockData). A troca de pagamento é simulada em memória: copia o pagamento e ajusta os flags de troca conforme o destino.Reads the per-market mock JSON (prime_management, synthetic or real via useRealMockData). The payment switch is simulated in memory: it copies the payment and adjusts the switch flags per target.Lee el JSON de mock por mercado (prime_management, sintético o real vía useRealMockData). El cambio de pago se simula en memoria: copia el pago y ajusta los flags de cambio según el destino.
getPrimeManagement()
- RetornoReturnsRetorno
PrimeManagementDTO(fromMapdo JSONfrom JSONdel JSON)
changePrimePaymentMethod({accountSfid, paymentId, paymentMethod})
- RetornoReturnsRetorno
PrimePaymentDTO(copyWith; erroCacheExceptionse não achadoCacheExceptionif not founderrorCacheExceptionsi no se encuentra)
Local · PrimeManagementLocalDataSource
CRUD sobre a box PrimeManagementModel do ObjectBox. Erros viram CacheException. save limpa as boxes filhas (PrimeSimulatorConfigModel, PrimePaymentModel, PrimeAccountDataModel) antes de regravar — single-row.CRUD over the ObjectBox PrimeManagementModel box. Errors become CacheException. save clears the child boxes (PrimeSimulatorConfigModel, PrimePaymentModel, PrimeAccountDataModel) before rewriting — single-row.CRUD sobre la box PrimeManagementModel de ObjectBox. Los errores se vuelven CacheException. save limpia las boxes hijas (PrimeSimulatorConfigModel, PrimePaymentModel, PrimeAccountDataModel) antes de reescribir — single-row.
getPrimeManagement() · getPrimeManagementLastSyncAt() · savePrimeManagement() · clearPrimeManagement()
getPrimeManagement()PrimeManagementEntity?— a primeira (e única) linha,toEntity()the first (and only) row,toEntity()la primera (y única) fila,toEntity()getPrimeManagementLastSyncAt()DateTime?savePrimeManagement({entity})void— clear +toModel()+ putclearPrimeManagement()void
Enums e labelsEnums & labelsEnums y labels
PaymentStatus 6 valores · label traduzido + tag
Status da mensalidade. fromWire aceita o valor em inglês e em português (o app traduz o label; a cor da tag vem de PaymentStatusUx).Fee status. fromWire accepts the English and the Portuguese value (the app translates the label; the tag color comes from PaymentStatusUx).Estado de la mensualidad. fromWire acepta el valor en inglés y en portugués (la app traduce el label; el color de la etiqueta viene de PaymentStatusUx).
| case | value (wire) | tag |
|---|---|---|
open | open · em aberto | warning |
overdue | overdue · vencido | negative |
paid | paid · pago | positive |
invalid | invalid · invalido · inválido | negative |
exempt | exempt · abonado | neutral |
unknown | "" (fallback)(fallback)(fallback) | neutral |
PaymentMethod 3 valores
Forma de pagamento da mensalidade. fromWire normaliza para minúsculas; switchTargetMethod (na Entity) alterna Pix ⇄ boleto.Fee payment method. fromWire lowercases; switchTargetMethod (on the Entity) toggles Pix ⇄ bank slip.Forma de pago de la mensualidad. fromWire normaliza a minúsculas; switchTargetMethod (en la Entity) alterna Pix ⇄ boleto.
| case | value (wire) |
|---|---|
boleto | boleto |
pix | pix |
unknown | "" |
UseCases
Dois UseCases sobre o mesmo repository. O de leitura é compartilhado pelas três telas.Two UseCases over the same repository. The read one is shared by all three screens.Dos UseCases sobre el mismo repository. El de lectura es compartido por las tres pantallas.
GetPrimeManagementUseCase 4 métodos
| MétodoMethodMétodo | RetornaReturnsDevuelve | UsoUseUso |
|---|---|---|
execute({source}) | Result<PrimeManagementEntity, Failure> | agregado inteiro (cache/remoto); usado pelo simulador e no refresh remotowhole aggregate (cache/remote); used by the simulator and on remote refreshagregado entero (caché/remoto); usado por el simulador y en el refresh remoto |
getCached() | Result<PrimeManagementEntity?, Failure> | agregado do cacheaggregate from cacheagregado del caché |
getCachedByAccountSfid({accountSfid}) | Result<PrimeAccountDataEntity?, Failure> | dados de um varejo (gestão e pagamentos)one retail's data (management and payments)datos de un punto de venta (gestión y pagos) |
getCachedLastSyncAt() | Future<DateTime?> | DataLoadInfo |
ChangePrimePaymentMethodUseCase 1 método
| MétodoMethodMétodo | RetornaReturnsDevuelve | UsoUseUso |
|---|---|---|
execute({accountSfid, paymentId, targetMethod}) | Result<void, Failure> | troca a forma de pagamento (chamado pelo PrimePaymentsNotifier)switches the payment method (called by PrimePaymentsNotifier)cambia la forma de pago (llamado por PrimePaymentsNotifier) |
Notifiers & State
O Prime tem três notifiers — um por tela — todos family e com o mixin AsyncGuard (guardedBuild/runGuarded). O build() é magro (injeta useCases + _load()); refresh() re-executa o remoto e recarrega. Nenhum deles usa o Dispatcher. Métodos e State de cada um:Prime has three notifiers — one per screen — all family and with the AsyncGuard mixin (guardedBuild/runGuarded). build() is thin (injects useCases + _load()); refresh() re-runs the remote fetch and reloads. None uses the Dispatcher. Methods and State of each:Prime tiene tres notifiers — uno por pantalla — todos family y con el mixin AsyncGuard (guardedBuild/runGuarded). El build() es magro (inyecta useCases + _load()); refresh() re-ejecuta el remoto y recarga. Ninguno usa el Dispatcher. Métodos y State de cada uno:
MétodosMethodsMétodos
PrimeManagementNotifier family(visitSfid)
| MétodoMethodMétodo | RetornaReturnsDevuelve | O que fazWhat it doesQué hace |
|---|---|---|
build({visitSfid}) | FutureOr<PrimeManagementState> | resolve a visita (visitContextProvider), lê os dados Prime do varejo do cache e monta o State (flags + lastSyncAt)resolves the visit (visitContextProvider), reads the retail's Prime data from cache and builds the State (flags + lastSyncAt)resuelve la visita (visitContextProvider), lee los datos Prime del punto de venta del caché y arma el State (flags + lastSyncAt) |
refresh() | Future<void> | re-fetch remoto (execute(remote)) + runGuarded(_load)remote re-fetch (execute(remote)) + runGuarded(_load)re-fetch remoto (execute(remote)) + runGuarded(_load) |
PrimePaymentsNotifier family(visitSfid)
| MétodoMethodMétodo | RetornaReturnsDevuelve | O que fazWhat it doesQué hace |
|---|---|---|
build({visitSfid}) | FutureOr<PrimePaymentsState> | lê os pagamentos do varejo do cache, ordena por referência (desc) e monta o Statereads the retail's payments from cache, sorts by reference (desc) and builds the Statelee los pagos del punto de venta del caché, ordena por referencia (desc) y arma el State |
refresh() | Future<void> | re-fetch remoto + runGuarded(_load)remote re-fetch + runGuarded(_load)re-fetch remoto + runGuarded(_load) |
switchPaymentMethod({payment}) | Future<Failure?> | chama o ChangePrimePaymentMethodUseCase com payment.switchTargetMethod; em sucesso recarrega e devolve null, em erro devolve a Failurecalls ChangePrimePaymentMethodUseCase with payment.switchTargetMethod; on success reloads and returns null, on error returns the Failurellama ChangePrimePaymentMethodUseCase con payment.switchTargetMethod; en éxito recarga y devuelve null, en error devuelve la Failure |
PrimeSimulatorNotifier family(accountSfid?)
| MétodoMethodMétodo | RetornaReturnsDevuelve | O que fazWhat it doesQué hace |
|---|---|---|
build({accountSfid?}) | FutureOr<PrimeSimulatorState> | lê o agregado (execute), pega a config via simulatorConfigFor(accountSfid) (por varejo se houver sfid, senão a global); erro BusinessFailure se não há configreads the aggregate (execute), gets the config via simulatorConfigFor(accountSfid) (per retail if there's a sfid, else the global one); errors BusinessFailure if there's no configlee el agregado (execute), toma la config vía simulatorConfigFor(accountSfid) (por punto de venta si hay sfid, si no la global); error BusinessFailure si no hay config |
refresh() | Future<void> | re-fetch remoto, preservando o submittedMonthlyTarget digitadoremote re-fetch, preserving the typed submittedMonthlyTargetre-fetch remoto, preservando el submittedMonthlyTarget escrito |
calculate({value}) | void | grava o texto digitado em submittedMonthlyTarget (client-state); os getters do State recalculamstores the typed text in submittedMonthlyTarget (client-state); the State getters recomputeguarda el texto escrito en submittedMonthlyTarget (client-state); los getters del State recalculan |
State disponível para as PagesState available to the PagesState disponible para las Pages
PrimeManagementState
accountAccountDataEntity— varejo (do contexto da visita)retail (from the visit context)punto de venta (del contexto de la visita)displayPrimePayment·displayPrimeSimulatorbool— flags do varejoretail flagsflags del punto de ventahasSimulatorConfigboollastSyncAtDateTime?showBoletos/showSimulator- getters: qual atalho renderizar (
showSimulator=displayPrimeSimulator&&hasSimulatorConfig)getters: which shortcut to render (showSimulator=displayPrimeSimulator&&hasSimulatorConfig)getters: qué atajo renderizar (showSimulator=displayPrimeSimulator&&hasSimulatorConfig)
PrimePaymentsState
accountAccountDataEntitypaymentsList<PrimePaymentEntity>— ordenados por referência (desc)sorted by reference (desc)ordenados por referencia (desc)lastSyncAtDateTime?hasPayments- getter
PrimeSimulatorState contém a fórmula de cálculo
configPrimeSimulatorConfigEntity— parâmetros da faixatier parametersparámetros de la franjaaccountSfid·accountString?·AccountDataEntity?— nulos no modo avulsonull in standalone modenulos en modo sueltosubmittedMonthlyTargetString— o objetivo digitado (client-state)the typed target (client-state)el objetivo escrito (client-state)lastSyncAtDateTime?hasCalculated- getter:
truese o objetivo não é vaziogetter:trueif the target isn't emptygetter:truesi el objetivo no está vacío estimatedPackages1Month·...12Months·...24Months- getters: 1 mês do
config, e ×12 / ×24getters: 1 month fromconfig, and ×12 / ×24getters: 1 mes delconfig, y ×12 / ×24
A fórmula (cálculo local)The formula (local calc)La fórmula (cálculo local)
- objetivo parseado:
double.tryParse(submittedMonthlyTarget.replaceAll(",", ".")) ?? 0parsed target:double.tryParse(submittedMonthlyTarget.replaceAll(",", ".")) ?? 0objetivo parseado:double.tryParse(submittedMonthlyTarget.replaceAll(",", ".")) ?? 0 base = 2 + (((target × limitPercentage) − target) × factor)- limite:cap:límite:
base > maxPackages ? maxPackages : base, arredondado (.round()) = pacotes em 1 mêsrounded (.round()) = packages in 1 monthredondeado (.round()) = paquetes en 1 mes - 12 meses = 1 mês × 12; 24 meses = 1 mês × 2412 months = 1 month × 12; 24 months = 1 month × 2412 meses = 1 mes × 12; 24 meses = 1 mes × 24
- a lógica vive em
PrimeSimulatorConfigEntity.estimatedPackages()+ getters do State — sem redethe logic lives inPrimeSimulatorConfigEntity.estimatedPackages()+ State getters — no networkla lógica vive enPrimeSimulatorConfigEntity.estimatedPackages()+ getters del State — sin red
Pages e widgetsPages & widgetsPages y widgets
Três pages, todas AppPageShell com CustomPullToRefresh + DataLoadInfo + AccountHeaderCard, e widgets auto-suficientes (§27). Árvore de composição de cada uma (modais aninhados sob o widget que os abre):Three pages, all AppPageShell with CustomPullToRefresh + DataLoadInfo + AccountHeaderCard, and self-sufficient widgets (§27). Composition tree of each (modals nested under the widget that opens them):Tres pages, todas AppPageShell con CustomPullToRefresh + DataLoadInfo + AccountHeaderCard, y widgets auto-suficientes (§27). Árbol de composición de cada una (modales anidados bajo el widget que los abre):
Hub de gestãoManagement hubHub de gestión
- PrimeManagementPage
- DataLoadInfo
- AccountHeaderCard
- PrimeManagementHeaderWidget
- PrimeManagementActionsWidget grade de atalhos (MenuActionGrid); some se vaziashortcuts grid (MenuActionGrid); hides if emptygrilla de atajos (MenuActionGrid); se oculta si está vacía
PagamentosPaymentsPagos
- PrimePaymentsPage
- DataLoadInfo
- AccountHeaderCard
- PrimePaymentsHeaderWidget
- PrimePaymentsListWidget CustomEmptyState se sem pagamentosCustomEmptyState if no paymentsCustomEmptyState si no hay pagos
- PrimePaymentCardWidget um por mensalidade; botões trocar / baixarone per fee; switch / download buttonsuno por mensualidad; botones cambiar / descargar
- PrimePaymentSwitchModalContent modal de confirmação da troca (ConectaModal)switch confirmation modal (ConectaModal)modal de confirmación del cambio (ConectaModal)
- PrimePaymentCardWidget um por mensalidade; botões trocar / baixarone per fee; switch / download buttonsuno por mensualidad; botones cambiar / descargar
SimuladorSimulatorSimulador
- PrimeSimulatorPage
- DataLoadInfo
- AccountHeaderCard só quando aberto por um varejoonly when opened from a retailsolo cuando se abre desde un punto de venta
- PrimeSimulatorHeaderWidget ícone só no modo avulsoicon only in standalone modeícono solo en modo suelto
- PrimeSimulatorRetailFramingCardWidget parâmetros da faixatier parametersparámetros de la franja
- PrimeSimulatorMetricCell
- PrimeSimulatorMonthlyTargetWidget input + botão Calcular → notifier.calculateinput + Calculate button → notifier.calculateinput + botón Calcular → notifier.calculate
- PrimeSimulatorBonusCardWidget estimativa 1 / 12 / 24 meses1 / 12 / 24 month estimateestimación 1 / 12 / 24 meses
- PrimeSimulatorMetricCell
- PrimeSimulatorImportantNoteWidget notas de elegibilidade / ressalvaeligibility / caveat notesnotas de elegibilidad / salvedad
Notas por mercadoMarket notesNotas por mercado
O Conecta Prime é dirigido pelo End Market Configuration (EMC) e é exclusivo do Brasil: só o mercado br tem a ferramenta prime_management no detalhe da visita, o item prime_simulator no menu/home e o módulo visit_detail_conecta_prime. Os demais mercados não têm nenhuma dessas chaves. Dentro do BR ainda há a habilitação por varejo (flags displayPrimePayment/displayPrimeSimulator do backend).Conecta Prime is driven by the End Market Configuration (EMC) and is Brazil-only: only the br market has the prime_management tool in the visit detail, the prime_simulator item in the menu/home and the visit_detail_conecta_prime module. The other markets have none of these keys. Within BR there's still per-retail gating (backend flags displayPrimePayment/displayPrimeSimulator).Conecta Prime es dirigido por el End Market Configuration (EMC) y es exclusivo de Brasil: solo el mercado br tiene la herramienta prime_management en el detalle de la visita, el ítem prime_simulator en el menú/home y el módulo visit_detail_conecta_prime. Los demás mercados no tienen ninguna de estas claves. Dentro de BR aún hay habilitación por punto de venta (flags displayPrimePayment/displayPrimeSimulator del backend).
Único mercado com PrimeOnly market with PrimeÚnico mercado con Prime
Ferramenta prime_management (detalhe da visita), prime_simulator (home + menu) e módulo visit_detail_conecta_prime presentes no EMC. Pix e boleto (Pagamentos) são específicos do Brasil.
The prime_management tool (visit detail), prime_simulator (home + menu) and visit_detail_conecta_prime module present in the EMC. Pix and bank slip (Payments) are Brazil-specific.
Herramienta prime_management (detalle de la visita), prime_simulator (home + menú) y módulo visit_detail_conecta_prime presentes en el EMC. Pix y boleto (Pagos) son específicos de Brasil.
Sem PrimeNo PrimeSin Prime Nenhuma chave de Prime no EMC desses mercados — as três telas são inacessíveis. No Prime key in these markets' EMC — the three screens are unreachable. Ninguna clave de Prime en el EMC de estos mercados — las tres pantallas son inaccesibles.
Divergência do registroRegistry divergenceDivergencia del registro A disponibilidade default (BR/CL/ZA) do registro não bate com o código/EMC: hoje o Prime existe só em BR. Este doc segue o código. The registry's default availability (BR/CL/ZA) doesn't match the code/EMC: today Prime exists in BR only. This doc follows the code. La disponibilidad default (BR/CL/ZA) del registro no coincide con el código/EMC: hoy Prime existe solo en BR. Este doc sigue el código.