mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Showing order cycle close time on banner when multiple open orders are present
This commit is contained in:
@@ -18,6 +18,7 @@ module Spree
|
||||
end
|
||||
|
||||
def changeable_orders
|
||||
# Only returns open order for the current user + shop + oc combo
|
||||
return [] unless spree_current_user && current_distributor && current_order_cycle
|
||||
Spree::Order.complete.where(
|
||||
state: 'complete',
|
||||
@@ -36,7 +37,7 @@ module Spree
|
||||
path: changeable_orders_link_path,
|
||||
order: changeable_orders.first.number,
|
||||
shop: current_distributor.name,
|
||||
oc_close: l(current_order_cycle.orders_close_at, format: "%b %d, %Y %H:%M"))
|
||||
oc_close: l(current_order_cycle.orders_close_at, format: "%A, %b %d, %Y @ %H:%M"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -897,7 +897,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
|
||||
shop_changeable_orders_alert_html:
|
||||
one: Your order with <a href='%{path}' target='_blank'>%{shop} / %{order}</a> is open for review. You can make changes until %{oc_close}.
|
||||
other: You have <a href='%{path}' target='_blank'>%{count} orders with %{shop}</a> currently open for review.
|
||||
other: You have <a href='%{path}' target='_blank'>%{count} orders with %{shop}</a> currently open for review. You can make changes until %{oc_close}.
|
||||
orders_changeable_orders_alert_html: This order has been confirmed, but you can make changes until <strong>%{oc_close}</strong>.
|
||||
|
||||
products_clear_all: Clear all
|
||||
|
||||
Reference in New Issue
Block a user