Skip to content

Added controller, views, tests for reports index and destroy#264

Merged
pranavrao145 merged 4 commits intomainfrom
report-index-page-new
Mar 27, 2026
Merged

Added controller, views, tests for reports index and destroy#264
pranavrao145 merged 4 commits intomainfrom
report-index-page-new

Conversation

@AliK070
Copy link
Copy Markdown
Contributor

@AliK070 AliK070 commented Mar 24, 2026

TL;DR

Adds reports index support with matching index-page styling: routes, controller/view, and tests for listing reports with view, edit, and delete actions.


What is this PR trying to achieve?


How did you achieve it?

  • Updated routes to include index and destroy.
  • Added reports index view using IndexTableComponent and the ActionButtonComponent
  • Added/updated controller tests for index and destroy behavior.
  • Updated locale keys in English and Spanish for the index page.

Checklist

  • Changes have been top-hatted locally
  • Tests have been added or updated
  • Documentation has been updated (if applicable)
  • Linked related issues

Copilot AI review requested due to automatic review settings March 24, 2026 16:28
@AliK070 AliK070 self-assigned this Mar 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a Report index page (and delete support) consistent with other admin index screens, using Shared::IndexTableComponent + ActionButtonComponent, along with routes, locales, and controller tests to support the new functionality.

Changes:

  • Add reports#index and reports#destroy routes and controller actions.
  • Add app/views/reports/index.html.erb using Shared::IndexTableComponent with view/edit/delete actions.
  • Extend locales (EN/ES) and controller tests to cover listing and deletion.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
app/controllers/reports_controller.rb Adds index for listing reports and destroy for deleting reports.
app/views/reports/index.html.erb New index UI with table columns and action buttons.
config/routes.rb Exposes index and destroy for reports resources.
config/locales/en/reports.en.yml Adds index/destroy strings and report attribute labels.
config/locales/es/reports.es.yml Adds index/destroy strings and report attribute labels.
test/controllers/reports_controller_test.rb Adds coverage for index listing and admin deletion; includes auth checks for new routes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/views/reports/index.html.erb Outdated
Comment thread app/views/reports/index.html.erb Outdated
Comment thread app/views/reports/index.html.erb Outdated
@pranavrao145 pranavrao145 changed the title feat: added controller, views, tests for reports Added controller, views, tests for reports index and destroy Mar 24, 2026
Copilot AI review requested due to automatic review settings March 26, 2026 01:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread config/locales/en/reports.en.yml
Comment thread config/locales/es/reports.es.yml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pranavrao145 pranavrao145 merged commit 6ef53aa into main Mar 27, 2026
7 checks passed
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.

Report Index Page

3 participants