feat: separate credit card issuer and network branding - #9
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Esta PR implementa a Phase 34, corrigindo a modelagem e a UX de cartões de crédito ao separar banco emissor e bandeira no cadastro da conta, além de aplicar identidade visual por banco nas telas de fatura.
Com isso, cenários como "Itaú Mastercard" ou "Nubank Visa" passam a ser tratados corretamente, sem conflitar emissor e bandeira no mesmo campo visual.
O que foi feito
network_brand_keyemaccountsAccount.iconcomo banco emissor para preservar compatibilidade com o código e os dados já existentesnetworkBrandKeynetworkBrandKeyautomaticamente quando a conta deixa de serCREDIT_CARDBanco emissorBandeiraBrandChippara exibir identidades secundárias de forma consistentecredit-card-theme.tspara centralizar as paletas por banco emissor/credit-cardsnos cards individuais de cartão/credit-cardscom o tema neutro do sistema/credit-cards/[id]:seedereset-demopara gerar cartão demo comnubank + mastercardREADME.md.docs/CONTEXT.md.docs/CHANGELOG.md.docs/tasks/phase-34-credit-card-issuer-network-and-brand-themed-statements.mdArquivos principais
prisma/schema.prismaprisma/migrations/20260420220000_add_account_network_brand_key/migration.sqlsrc/server/modules/finance/http/schemas.tssrc/app/api/accounts/route.tssrc/app/api/accounts/[id]/route.tssrc/app/(app)/accounts/account-form.tsxsrc/app/(app)/accounts/account-card.tsxsrc/app/(app)/credit-cards/page.tsxsrc/app/(app)/credit-cards/[id]/page.tsxsrc/lib/brands/brand-chip.tsxsrc/lib/brands/credit-card-theme.tsCompatibilidade / Migração
Account.iconcontinua existindo e agora representa explicitamente o banco emissornetworkBrandKeyé opcional, então cartões antigos continuam funcionando sem backfill obrigatório20260420220000_add_account_network_brand_keyTestes executados
npx prisma generatenpm run formatnpm run format:checknpm testnpm run lintnpm run buildObservações
lightedark