From c7c37a1ea4206d5699235477d5f598327d6f78ba Mon Sep 17 00:00:00 2001 From: prasath Date: Tue, 24 Dec 2024 20:47:14 -0800 Subject: [PATCH 1/2] 4672: Fixed alignment in adjustments, audits, barcode_items, distribution, purchases --- app/views/adjustments/index.html.erb | 20 ++++++------- app/views/audits/index.html.erb | 20 ++++++------- .../barcode_items/_barcode_item_row.html.erb | 8 +++--- app/views/barcode_items/index.html.erb | 6 ++-- .../distributions/_distribution_row.html.erb | 24 ++++++++-------- app/views/distributions/index.html.erb | 28 +++++++++---------- app/views/purchases/_purchase_row.html.erb | 16 +++++------ app/views/purchases/index.html.erb | 18 ++++++------ 8 files changed, 70 insertions(+), 70 deletions(-) diff --git a/app/views/adjustments/index.html.erb b/app/views/adjustments/index.html.erb index 4027d37bbe..daddb266a5 100644 --- a/app/views/adjustments/index.html.erb +++ b/app/views/adjustments/index.html.erb @@ -76,24 +76,24 @@ - - - - - + + + + + <% @paginated_adjustments.each do |adjustment| %> - - - - - + + + + <% end %> diff --git a/app/views/audits/index.html.erb b/app/views/audits/index.html.erb index 9bb22d2683..c4ca7494e5 100644 --- a/app/views/audits/index.html.erb +++ b/app/views/audits/index.html.erb @@ -69,24 +69,24 @@
CreatedOrganizationStorage locationCommentSummaryCreatedOrganizationStorage locationCommentSummary  
+ <%= adjustment.organization.name %><%= adjustment.storage_location.name %><%= adjustment.comment %><%= pluralize(adjustment.line_items.count, 'change') %><%= adjustment.organization.name %><%= adjustment.storage_location.name %><%= adjustment.comment %><%= pluralize(adjustment.line_items.count, 'change') %> <%= view_button_to adjustment %>
- - - - - + + + + + <% @audits.each do |audit| %> - - - - - + + + + <% end %> diff --git a/app/views/barcode_items/_barcode_item_row.html.erb b/app/views/barcode_items/_barcode_item_row.html.erb index dab25b4e43..11eea4e0fb 100644 --- a/app/views/barcode_items/_barcode_item_row.html.erb +++ b/app/views/barcode_items/_barcode_item_row.html.erb @@ -1,8 +1,8 @@ - - - - + + +
CreatedOrganizationStorage locationSummaryStatusCreatedOrganizationStorage locationSummaryStatus Actions
+ <%= audit.organization.name %><%= audit.storage_location.name %><%= pluralize(audit.line_items.count, 'item') %><%= audit.status.titleize %><%= audit.organization.name %><%= audit.storage_location.name %><%= pluralize(audit.line_items.count, 'item') %><%= audit.status.titleize %> <%= view_button_to audit %>
<%= barcode_item_row.barcodeable.name %><%= barcode_item_row.quantity %><%= barcode_item_row.value %> + <%= barcode_item_row.barcodeable.name %><%= barcode_item_row.quantity %><%= barcode_item_row.value %> <%= view_button_to barcode_item_path(barcode_item_row) %> <%= edit_button_to edit_barcode_item_path(barcode_item_row) %> <%= delete_button_to barcode_item_path(barcode_item_row), { confirm: confirm_delete_msg(barcode_item_row.item.name) } %> diff --git a/app/views/barcode_items/index.html.erb b/app/views/barcode_items/index.html.erb index fa8d97d260..e351c3071f 100644 --- a/app/views/barcode_items/index.html.erb +++ b/app/views/barcode_items/index.html.erb @@ -70,9 +70,9 @@ - - - + + + diff --git a/app/views/distributions/_distribution_row.html.erb b/app/views/distributions/_distribution_row.html.erb index 57dbd6660c..6274c73cfc 100644 --- a/app/views/distributions/_distribution_row.html.erb +++ b/app/views/distributions/_distribution_row.html.erb @@ -1,19 +1,19 @@ > - - - - - + + + + + - - - - - - + + + + + + <% distribution_has_inactive_item = @distributions_with_inactive_items.include?(distribution_row.id) %> -
Item TypeQuantity in the BoxBarcodeItem TypeQuantity in the BoxBarcode Actions
<%= distribution_row.id %><%= distribution_row.partner.name %><%= distribution_row.created_at.strftime("%m/%d/%Y") %><%= (distribution_row.issued_at.presence || distribution_row.created_at).strftime("%m/%d/%Y") %><%= distribution_row.storage_location.name %><%= distribution_row.id %><%= distribution_row.partner.name %><%= distribution_row.created_at.strftime("%m/%d/%Y") %><%= (distribution_row.issued_at.presence || distribution_row.created_at).strftime("%m/%d/%Y") %><%= distribution_row.storage_location.name %><%= @distribution_totals.fetch_quantity(distribution_row.id) %><%= dollar_value(@distribution_totals.fetch_value(distribution_row.id)) %><%= distribution_row.delivery_method.humanize %><%= distribution_shipping_cost(distribution_row.shipping_cost) %><%= distribution_row.comment %><%= distribution_row.state&.humanize %><%= @distribution_totals.fetch_quantity(distribution_row.id) %><%= dollar_value(@distribution_totals.fetch_value(distribution_row.id)) %><%= distribution_row.delivery_method.humanize %><%= distribution_shipping_cost(distribution_row.shipping_cost) %><%= distribution_row.comment %><%= distribution_row.state&.humanize %> + <%= view_button_to distribution_path(distribution_row) %> <% if (!distribution_row.complete? && !distribution_row.future?) || current_user.has_cached_role?(Role::ORG_ADMIN, current_organization) %> <%= edit_button_to edit_distribution_path(distribution_row), enabled: !distribution_has_inactive_item %> diff --git a/app/views/distributions/index.html.erb b/app/views/distributions/index.html.erb index e702720aae..6b0dbe20b0 100644 --- a/app/views/distributions/index.html.erb +++ b/app/views/distributions/index.html.erb @@ -97,29 +97,29 @@ - - - - - + + + + + <% if filter_params[:by_item_id].present? %> - + <% elsif filter_params[:by_item_category_id].present? %> - + <% else %> - + <% end %> - + - - - - - + + + + + diff --git a/app/views/purchases/_purchase_row.html.erb b/app/views/purchases/_purchase_row.html.erb index b2f48fb04c..9251c6a4ce 100644 --- a/app/views/purchases/_purchase_row.html.erb +++ b/app/views/purchases/_purchase_row.html.erb @@ -1,12 +1,12 @@ - - - - - - - - + + + + + + + + diff --git a/app/views/purchases/index.html.erb b/app/views/purchases/index.html.erb index 42f2d482f6..c2a6663abb 100644 --- a/app/views/purchases/index.html.erb +++ b/app/views/purchases/index.html.erb @@ -77,14 +77,14 @@
IDPartnerInitial AllocationDate of DistributionSource InventoryIDPartnerInitial AllocationDate of DistributionSource Inventory Total <%= @items.find { |i| i.id == filter_params[:by_item_id].to_i }&.name %>Total <%= @items.find { |i| i.id == filter_params[:by_item_id].to_i }&.name %>Total in <%= @item_categories.find { |ic| ic.id == filter_params[:by_item_category_id].to_i }&.name %>Total in <%= @item_categories.find { |ic| ic.id == filter_params[:by_item_category_id].to_i }&.name %>Total ItemsTotal ItemsTotal ValueTotal ValueDelivery MethodShipping CostCommentsStatusActionsDelivery MethodShipping CostCommentsStatusActions
<%= purchase_row.purchased_from_view %><%= purchase_row.storage_location.name %><%= purchase_row.comment %><%= purchase_row.line_items.total %><%= purchase_row.line_items.size %><%= dollar_value(purchase_row.amount_spent_in_cents) %><%= dollar_value(purchase_row.value_per_itemizable) %><%= purchase_row.issued_at.strftime("%F") %><%= purchase_row.purchased_from_view %><%= purchase_row.storage_location.name %><%= purchase_row.comment %><%= purchase_row.line_items.total %><%= purchase_row.line_items.size %><%= dollar_value(purchase_row.amount_spent_in_cents) %><%= dollar_value(purchase_row.value_per_itemizable) %><%= purchase_row.issued_at.strftime("%F") %> <%= view_button_to purchase_path(purchase_row) %>
- - - - - - - - + + + + + + + + @@ -93,7 +93,7 @@ - + - +
Purchases fromStorage LocationCommentsQuantity of ItemsVariety of ItemsAmount spentFMVPurchased DatePurchases fromStorage LocationCommentsQuantity of ItemsVariety of ItemsAmount spentFMVPurchased Date Actions
TotalTotal <%= @purchases_quantity %> (Total) From 393c979de1165060cbdf377640ebe54ef20cbcca Mon Sep 17 00:00:00 2001 From: prasath Date: Sun, 5 Jan 2025 15:38:02 -0800 Subject: [PATCH 2/2] 4672: Lint issue fix --- app/views/purchases/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/purchases/index.html.erb b/app/views/purchases/index.html.erb index c2a6663abb..2e32849f90 100644 --- a/app/views/purchases/index.html.erb +++ b/app/views/purchases/index.html.erb @@ -93,7 +93,7 @@
TotalTotal <%= @purchases_quantity %> (Total)