Ajuste dos campos obrigatórios para tramitar (aba de orçamento) - #446
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
1406c83 to
719f64e
Compare
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
app/Contracts/StageValidatorInterface.phpapp/Http/Controllers/ProjectStageController.phpapp/Services/BudgetService.phpapp/Services/FormalizationService.phpapp/Services/OpeningUpdateService.phpapp/Services/ProjectStageService.phpresources/js/Pages/ProjectDetails/Partials/Tabs/BudgetTab.vue
💤 Files with no reviewable changes (1)
- app/Http/Controllers/ProjectStageController.php
719f64e to
fb7f2fd
Compare
fb7f2fd to
b50548b
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/Feature/ProjectStageFlowTest.php (1)
125-147: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd 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
📒 Files selected for processing (8)
app/Contracts/StageValidatorInterface.phpapp/Http/Controllers/ProjectStageController.phpapp/Services/BudgetService.phpapp/Services/FormalizationService.phpapp/Services/OpeningUpdateService.phpapp/Services/ProjectStageService.phpresources/js/Pages/ProjectDetails/Partials/Tabs/BudgetTab.vuetests/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
b50548b to
55504f2
Compare
55504f2 to
6707cca
Compare
✅ 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:
🕵️ Como foi testado?
Checklist: ✔️
Observação:
Summary by CodeRabbit