-
Notifications
You must be signed in to change notification settings - Fork 0
feat: added controller, views, tests for reports #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
09fb22a
8f8abeb
ee29de6
18fc9ae
dd5ef7e
8cac48f
485e52c
f9a275f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,9 @@ def build_admin_section | |
| SIDEBAR_ITEM.new(name: t("users", scope: "components.sidebar_component.build_admin_section"), | ||
| path: helpers.users_path, icon: "person-gear"), | ||
| SIDEBAR_ITEM.new(name: t("regions", scope: "components.sidebar_component.build_admin_section"), | ||
| path: helpers.regions_path, icon: "compass") | ||
| path: helpers.regions_path, icon: "compass"), | ||
| SIDEBAR_ITEM.new(name: t("reports", scope: "components.sidebar_component.build_admin_section"), | ||
| path: helpers.reports_path, icon: "reports-fill") | ||
|
||
| ] | ||
| ) | ||
| end | ||
|
|
||
AliK070 marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,28 @@ | ||||||||||||||||||||||||||||||
| <div class="mx-8 my-10"> | ||||||||||||||||||||||||||||||
| <div class="flex items-center justify-between mb-4"> | ||||||||||||||||||||||||||||||
| <h1 class="text-4xl font-bold"><%= t(".title") %></h1> | ||||||||||||||||||||||||||||||
| <%= render ActionButtonComponent.new(to: new_report_path, icon: "add", colour: :primary, size: :large, turbo_stream: true) do %> | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| <%= t(".actions.create") %> | ||||||||||||||||||||||||||||||
| <% end %> | ||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||
| <%= render ContentCardComponent.new do %> | ||||||||||||||||||||||||||||||
| <%= render Shared::IndexTableComponent.new(records: @reports) do |table| %> | ||||||||||||||||||||||||||||||
| <% table.column :start_date, header: t(".columns.start_date") do |report| %> | ||||||||||||||||||||||||||||||
| <%= l(report.start_date) if report.start_date %> | ||||||||||||||||||||||||||||||
| <% end %> | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| <% table.column :end_date, header: t(".columns.end_date") do |report| %> | ||||||||||||||||||||||||||||||
| <%= l(report.end_date) if report.end_date %> | ||||||||||||||||||||||||||||||
| <% end %> | ||||||||||||||||||||||||||||||
| <% table.column :created_at, header: t(".columns.created_at") do |report| %> | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| <% table.column :start_date, header: t(".columns.start_date") do |report| %> | |
| <%= l(report.start_date) if report.start_date %> | |
| <% end %> | |
| <% table.column :end_date, header: t(".columns.end_date") do |report| %> | |
| <%= l(report.end_date) if report.end_date %> | |
| <% end %> | |
| <% table.column :created_at, header: t(".columns.created_at") do |report| %> | |
| <% table.column :start_date do |report| %> | |
| <%= l(report.start_date) if report.start_date %> | |
| <% end %> | |
| <% table.column :end_date do |report| %> | |
| <%= l(report.end_date) if report.end_date %> | |
| <% end %> | |
| <% table.column :created_at do |report| %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This icon is not used throughout this PR.