Skip to content

Ajuste dos campos obrigatórios para tramitar (aba de orçamento) - #446

Merged
jeff-doliveira1 merged 1 commit into
developfrom
fix/required-fields-all-tabs
Jul 31, 2026
Merged

Ajuste dos campos obrigatórios para tramitar (aba de orçamento)#446
jeff-doliveira1 merged 1 commit into
developfrom
fix/required-fields-all-tabs

Conversation

@jeff-doliveira1

@jeff-doliveira1 jeff-doliveira1 commented Jul 30, 2026

Copy link
Copy Markdown
Member

✅ Descrição do propósito desse Pull Request


🧭 Referência a Issue


❓ O que foi feito para atingir isso?


🏃‍♀️ Tipo de mudança

Marque as opções relevantes:

  • Bug fix (correção de bug)
  • Nova feature (mudança não retrocompatível que adiciona funcionalidade)
  • Mudança de breaking (correção ou feature que faria com que a funcionalidade existente não funcionasse como esperado)
  • Documentação (somente mudanças ou atualizações na documentação)

🕵️ Como foi testado?

  • Critério de aceitação
  • Testes de software (TDD, BDD, UNITÁRIO, INTEGRAÇÃO, E2E)

Checklist: ✔️

  • Meu código segue as diretrizes do projeto
  • Eu fiz um code review com minha equipe
  • Eu comentei meu código, especialmente em áreas de difícil entendimento
  • Eu atualizei a documentação correspondente
  • Testes novos e existentes passaram localmente com minhas alterações

Observação:

Summary by CodeRabbit

  • New Features
    • Added validation before advancing project stages, including required budget details and documents.
    • Added clear field-level error states and required indicators in the budget workflow.
    • Added keyboard support for saving budget changes.
  • Bug Fixes
    • Prevented users from advancing when required information is incomplete or editing is not permitted.
    • Centralized stage advancement checks to provide consistent validation across workflows.

@jeff-doliveira1 jeff-doliveira1 self-assigned this Jul 30, 2026
@jeff-doliveira1 jeff-doliveira1 linked an issue Jul 30, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b3543ea5-f196-4c3d-b647-e9e29a36bf9b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jeff-doliveira1
jeff-doliveira1 force-pushed the fix/required-fields-all-tabs branch from 1406c83 to 719f64e Compare July 30, 2026 17:08
@jeff-doliveira1 jeff-doliveira1 changed the title WIP: Ajuste dos campos obrigatórios para tramitar (aba de orçamento) Ajuste dos campos obrigatórios para tramitar (aba de orçamento) Jul 30, 2026
@jeff-doliveira1
jeff-doliveira1 marked this pull request as ready for review July 30, 2026 17:09

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/Services/ProjectStageService.php`:
- Around line 33-35: In the stage-advance flow of ProjectStageService, move
ensureUserHasRole($stage, $user, ...) before validateStageAdvance($stage,
$stage->project), and place it after the existing canAdvance() check if
available. Ensure unauthorized callers receive AuthorizationException before
detailed field or document validation, while preserving the existing validation
and successful-advance behavior for authorized users.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 191b802b-f6ea-4feb-b273-aea9a46b3705

📥 Commits

Reviewing files that changed from the base of the PR and between ae328c8 and 719f64e.

📒 Files selected for processing (7)
  • app/Contracts/StageValidatorInterface.php
  • app/Http/Controllers/ProjectStageController.php
  • app/Services/BudgetService.php
  • app/Services/FormalizationService.php
  • app/Services/OpeningUpdateService.php
  • app/Services/ProjectStageService.php
  • resources/js/Pages/ProjectDetails/Partials/Tabs/BudgetTab.vue
💤 Files with no reviewable changes (1)
  • app/Http/Controllers/ProjectStageController.php

Comment thread app/Services/ProjectStageService.php Outdated
@jeff-doliveira1
jeff-doliveira1 force-pushed the fix/required-fields-all-tabs branch from 719f64e to fb7f2fd Compare July 30, 2026 17:50
@jeff-doliveira1
jeff-doliveira1 marked this pull request as draft July 30, 2026 17:53
@jeff-doliveira1
jeff-doliveira1 marked this pull request as ready for review July 30, 2026 18:05
@jeff-doliveira1
jeff-doliveira1 force-pushed the fix/required-fields-all-tabs branch from fb7f2fd to b50548b Compare July 30, 2026 18:05

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tests/Feature/ProjectStageFlowTest.php (1)

125-147: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add failing-path coverage for budget prerequisites.

The happy path passes with a complete fixture, but it would also pass if budget document or installment validation were removed. Add cases that reach the budget stage with each prerequisite omitted and assert advancement is rejected.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/Feature/ProjectStageFlowTest.php` around lines 125 - 147, Extend
ProjectStageFlowTest with failing-path cases that reach the budget stage using
fixtures from createValidBudget, omitting the budget document in one case and
the installment in another. Assert both attempts to advance are rejected, while
preserving the existing complete-budget happy-path coverage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/Feature/ProjectStageFlowTest.php`:
- Around line 125-147: Extend ProjectStageFlowTest with failing-path cases that
reach the budget stage using fixtures from createValidBudget, omitting the
budget document in one case and the installment in another. Assert both attempts
to advance are rejected, while preserving the existing complete-budget
happy-path coverage.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f56d85bb-2d27-4787-afc1-c8d354dd4124

📥 Commits

Reviewing files that changed from the base of the PR and between 719f64e and b50548b.

📒 Files selected for processing (8)
  • app/Contracts/StageValidatorInterface.php
  • app/Http/Controllers/ProjectStageController.php
  • app/Services/BudgetService.php
  • app/Services/FormalizationService.php
  • app/Services/OpeningUpdateService.php
  • app/Services/ProjectStageService.php
  • resources/js/Pages/ProjectDetails/Partials/Tabs/BudgetTab.vue
  • tests/Feature/ProjectStageFlowTest.php
💤 Files with no reviewable changes (1)
  • app/Http/Controllers/ProjectStageController.php
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/Services/OpeningUpdateService.php

@jeff-doliveira1
jeff-doliveira1 force-pushed the fix/required-fields-all-tabs branch from b50548b to 55504f2 Compare July 30, 2026 19:12
@jeff-doliveira1
jeff-doliveira1 force-pushed the fix/required-fields-all-tabs branch from 55504f2 to 6707cca Compare July 31, 2026 12:38
@jeff-doliveira1
jeff-doliveira1 merged commit ef6cffd into develop Jul 31, 2026
4 checks passed
@jeff-doliveira1
jeff-doliveira1 deleted the fix/required-fields-all-tabs branch July 31, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Informações dos campos obrigatório;

2 participants