feat(plano-setorial): adicionar campo de fechamento automático do orçamento#593
Conversation
…amento Adiciona select de dia de fechamento (1 a 28) ao formulário de PDM e Plano Setorial, visível apenas quando monitoramento de orçamento está habilitado. Corrige layout de checkboxes removendo class block.
📝 WalkthroughWalkthroughThe changes introduce a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying smae with
|
| Latest commit: |
cf0a1be
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2d516abb.smae.pages.dev |
| Branch Preview URL: | https://feature-seplan-s04-09-pdm-e.smae.pages.dev |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/src/views/planosSetoriais/PlanosSetoriaisCriarEditar.vue (1)
658-681: Consider adding a placeholder option to the select.The select field lacks a placeholder/empty option, which means day 1 will be pre-selected by default when the field becomes visible. This could lead to unintentional submissions if users don't actively select a value.
For consistency with other selects in this form (like
nivel_orcamentowhich has explicit options), consider adding a placeholder:♻️ Proposed fix to add placeholder option
<Field name="orcamento_dia_fechamento" as="select" class="inputtext light mb1" :class="{ 'error': errors.orcamento_dia_fechamento }" > + <option value=""> + Selecionar + </option> <option v-for="dia in 28" :key="dia" :value="dia" > {{ dia }} </option> </Field>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/views/planosSetoriais/PlanosSetoriaisCriarEditar.vue` around lines 658 - 681, The select for "orcamento_dia_fechamento" currently renders days 1–28 with no empty option so day 1 becomes selected by default; add a placeholder/empty <option> (e.g., value="" disabled selected or value="" hidden) as the first option in the Field with name "orcamento_dia_fechamento" so users must actively choose a day, and ensure the form validation (schema referenced by LabelFromYup and ErrorMessage tied to errors.orcamento_dia_fechamento) treats empty string as invalid so submissions without a selection are rejected.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@frontend/src/views/planosSetoriais/PlanosSetoriaisCriarEditar.vue`:
- Around line 658-681: The select for "orcamento_dia_fechamento" currently
renders days 1–28 with no empty option so day 1 becomes selected by default; add
a placeholder/empty <option> (e.g., value="" disabled selected or value=""
hidden) as the first option in the Field with name "orcamento_dia_fechamento" so
users must actively choose a day, and ensure the form validation (schema
referenced by LabelFromYup and ErrorMessage tied to
errors.orcamento_dia_fechamento) treats empty string as invalid so submissions
without a selection are rejected.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
frontend/src/consts/formSchemas.jsfrontend/src/stores/planosSetoriais.store.tsfrontend/src/views/planosSetoriais/PlanosSetoriaisCriarEditar.vue
| :schema="schema" | ||
| /> | ||
| <Field | ||
| name="orcamento_dia_fechamento" |
There was a problem hiding this comment.
A gente devia começar a botar id nessas coisas.
| class="inputtext light mb1" | ||
| :class="{ 'error': errors.orcamento_dia_fechamento }" | ||
| > | ||
| <option |
There was a problem hiding this comment.
Não devia ter um item para o valor vazio, mesmo que desabilitado, @Eduruiz ?
robsonsobral
left a comment
There was a problem hiding this comment.
Um comentário a mais.



Adiciona select de dia de fechamento (1 a 28) ao formulário de PDM e Plano Setorial, visível apenas quando monitoramento de orçamento está habilitado. Corrige layout de checkboxes removendo class block.
Summary by CodeRabbit
New Features
Style