feat(prova): fluxo condicional custom no NewProva (Card 05) - #644
Merged
FernandoAlmeidaPinto merged 1 commit intoJul 26, 2026
Merged
Conversation
Card 05 da Etapa 4 (Provas Custom) — fecha a etapa no frontend.
- rastreia categoria escolhida -> isCustom (categoria.custom === true)
- custom: campos 'nome' e 'nomeSimulado' aparecem e são obrigatórios; PDF/gabarito
viram opcionais; formData inclui nome/nomeSimulado
- oficial: fluxo intacto (PDF obrigatório, sem campos livres)
- validação de submit e disabled do botão adaptados por isCustom
- hint visual 'Prova personalizada — nome livre, PDF opcional'
- criadorId NÃO vai no body (api-vcnafacul injeta via JWT — Card 04)
Nota: o select já filtrava por f.selecionavel (o card citava f.nome.includes('Enem'),
desatualizado — já estava correto). Fix trivial de lint pré-existente no mesmo
arquivo (param '_' não usado em handleRemove*) para passar no --max-warnings 0.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
FernandoAlmeidaPinto
deleted the
feature/provas-custom-card-05-newprova-custom-flow
branch
July 26, 2026 18:29
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
Card 05 da Etapa 4 (Provas Custom) — fecha a etapa no frontend. Adapta o modal
NewProvapara ter comportamento condicional quando a categoria escolhida écustom: true.O que mudou (
src/pages/dashProvas/modals/newProva.tsx)isCustom = categoriaEscolhida?.custom === truenomeenomeSimuladoaparecem e são obrigatórios; PDF/gabarito viram opcionais;formDataincluinome/nomeSimuladodisableddo botão adaptados porisCustomcriadorIdnão vai no body (o api-vcnafacul injeta via JWT — Card 04)Correções vs. spec do card
f.nome.includes("Enem")paraf.selecionavel, mas o código já filtrava porf.selecionavel(feito em etapa anterior) — nada a mudar aí._não usado emhandleRemoveGabarito/handleRemoveFile) — necessário porque o gate do client é--max-warnings 0e eu estou tocando o arquivo. Confirmado idêntico na develop.Test Plan
npm run build(tsc + vite) passa--max-warnings 0)selecionavel)nome/nomeSimuladoobrigatórios, PDF opcional, hint apareceShowProvamostra 1 simuladoCloses #643
🤖 Generated with Claude Code