feat(devedores): editar cobrança em aberto#27
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ing do cron Garante que fluxos derivados (splits de transação, parcelas, resgates, settleCharge/createDebtPayment) cifrem source/amount/description/notes via DEK antes de gravar. Cron de rollover passa a validar CRON_SECRET com timingSafeEqual e recusar quando a env não está definida. Atualiza script de backfill e docs de cripto/auth. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…amentos Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… cifragem de campos derivados Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
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.
Objetivo
Adiciona a ação Editar a cobranças em aberto no detalhe de um devedor, permitindo trocar descrição, data e observações. O valor é imutável.
Mudanças
updateDebtCharge(lib/actions/debtors.ts) +updateDebtChargeSchema(lib/validations/debtors.ts): segue o padrão obrigatório (requireUserId → parse → assertOwnsDebtEntry → guard de escopo → update cifrado → revalidatePath). Guard rejeita qualquer lançamento que não seja cobrança aberta (type='charge'estatusopen/null).referenceMonthé recalculado a partir do novoentryDate.description/notescifrados via DEK. Sem mudança de schema, sem migration.EditChargeDialog(components/devedores/EditChargeDialog.tsx): dialog responsivo (Dialog desktop / Drawer mobile) no molde doSettleChargeDialog; valor exibido read-only; validação client-side via schema +formatZodErrors; fecha só no sucesso.DebtEntryList: ação "Editar" adicionada apenas ao ramoisOpenChargedoRowActions.Fora do escopo do feature (incluído neste branch)
fix(crypto)(bd3327a): fecha gaps de cifragem em escritas derivadas (incomes/debtorEntriesde splits, parcelas, resgates,settleCharge/createDebtPayment) e endurece a auth do cron de rollover (timingSafeEqual+ recusa quandoCRON_SECRETausente).next.config.mjs: bloco de security headers (CSP, HSTS prod-only, X-Frame-Options, Permissions-Policy) foi bundled junto — vale um smoke-test manual de login (OAuth) e Speed Insights sob a CSP.test(integration)(84eef5e): asserts de integração pré-existentes atualizados para os campos agora cifrados (decifra antes de comparar; lookups pivotados paraincomeIdporque a cifragem GCM é não-determinística).Testes
updateDebtChargee os asserts corrigidos)🤖 Generated with Claude Code