diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 439e4ceb36..f3c11e628a 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -27,6 +27,7 @@ @import 'progress_stepper'; @import 'audits'; @import 'modal-dialog'; +@import 'expandable_table'; @import 'custom'; .modal-dialog { diff --git a/app/assets/stylesheets/expandable_table.scss b/app/assets/stylesheets/expandable_table.scss new file mode 100644 index 0000000000..ba2c3f41a1 --- /dev/null +++ b/app/assets/stylesheets/expandable_table.scss @@ -0,0 +1,22 @@ +/* + * Customized Styling for Exandable Tables - provided by AdminLTE + * ExpandableTable - https://adminlte.io/docs/3.1/javascript/expandable-tables.html + */ + +/* + * Default Expanded table has no indicator that the row is clickable. This styles an expand/collapse icon. + * Expanded=true is minus, Expanded=false is plus + */ +[data-widget="expandable-table"] { + &[aria-expanded="true"] { + td > .fa::before{ + content: "\f068"; + } + } + + &[aria-expanded="false"] { + td > .fa::before{ + content: "\f067"; + } + } +} \ No newline at end of file diff --git a/app/views/items/_item_row_inventory.html.erb b/app/views/items/_item_row_inventory.html.erb index af435b4664..c31bea3650 100644 --- a/app/views/items/_item_row_inventory.html.erb +++ b/app/views/items/_item_row_inventory.html.erb @@ -1,14 +1,17 @@ <% row_item = row.last %> + <%= link_to(row_item[:item_name], item_url(row_item[:item_id])) %> <%= row_item[:quantity] %> <%= row_item[:item_on_hand_minimum_quantity] %> <%= row_item[:item_on_hand_recommended_quantity] %> - + +

<% row_item[:locations].each do |location_name, quantity| %> -

<%= "#{location_name} - #{quantity} units" %>

+ <%= "#{location_name} - #{quantity} units" %>
<% end %> +

\ No newline at end of file diff --git a/app/views/items/_items_inventory.html.erb b/app/views/items/_items_inventory.html.erb index e718f31647..8c15bf352b 100644 --- a/app/views/items/_items_inventory.html.erb +++ b/app/views/items/_items_inventory.html.erb @@ -6,6 +6,7 @@ +
Name Quantity Minimum Quantity