-
Notifications
You must be signed in to change notification settings - Fork 0
Added reports navigation Item in sidebar #265
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||
| <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 :id, header: t(".columns.id"), col_size: "80px" %> | ||||||
| <% table.column :start_date, header: t(".columns.start_date") %> | ||||||
| <% table.column :end_date, header: t(".columns.end_date") %> | ||||||
| <% table.column :actions, header: t("shared.index_table_component.actions"), col_size: "90px" do |report| %> | ||||||
| <div class="flex items-center gap-2"> | ||||||
| <%= render ActionButtonComponent.new(to: report_path(report), icon: "view") %> | ||||||
| <%= render ActionButtonComponent.new(to: edit_report_path(report), icon: "edit", colour: :info, turbo_stream: true) %> | ||||||
|
||||||
| <%= render ActionButtonComponent.new(to: edit_report_path(report), icon: "edit", colour: :info, turbo_stream: true) %> | |
| <%= render ActionButtonComponent.new(to: edit_report_path(report), icon: "edit", colour: :info) %> |
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.
ActionButtonComponentis rendering this link withdata-turbo-stream, butReportsController#newdoesn’t declare aturbo_streamresponse and there’s noapp/views/reports/new.turbo_stream.erb. This will cause a MissingTemplate (or an unexpected turbo_stream format) when the button is clicked. Either removeturbo_stream: truehere, or addrespond_to+ anew.turbo_stream.erbtemplate (as done in Projects/Regions/Users).