mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-31 06:31:41 +00:00
Just display the date that orders can be changed until
No fancy moment.js stuff
This commit is contained in:
@@ -8,9 +8,3 @@ Darkswarm.filter "sensible_timeframe", (date_in_wordsFilter)->
|
||||
t 'orders_open'
|
||||
else
|
||||
t('closing') + date_in_wordsFilter(date)
|
||||
|
||||
Darkswarm.filter "changesAllowed", ->
|
||||
(date) ->
|
||||
return t('say_no') unless date?
|
||||
return t('spree.users.open_orders.closed') if date < moment()
|
||||
t('spree.users.open_orders.until') + " " + moment(date).calendar()
|
||||
|
||||
@@ -19,7 +19,7 @@ module Api
|
||||
end
|
||||
|
||||
def changes_allowed_until
|
||||
object.order_cycle.andand.orders_close_at
|
||||
I18n.l(object.order_cycle.andand.orders_close_at, format: :long)
|
||||
end
|
||||
|
||||
def total
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
%tr
|
||||
%th.order1= t('.order')
|
||||
%th.order2= t('.shop')
|
||||
%th.order3.show-for-large-up= t('.changes_allowed')
|
||||
%th.order3.show-for-large-up= t('.changes_allowed_until')
|
||||
%th.order4.show-for-large-up= t('.items')
|
||||
%th.order5.text-right= t('.total')
|
||||
%th.order6.text-right.show-for-large-up= t('.edit')
|
||||
@@ -14,7 +14,7 @@
|
||||
%td.order1
|
||||
%a{"ng-href" => "{{::order.path}}", "ng-bind" => "::order.number"}
|
||||
%td.order2{"ng-bind" => "::order.shop_name"}
|
||||
%td.order3.show-for-large-up{"ng-bind" => "order.changes_allowed_until | changesAllowed"}
|
||||
%td.order3.show-for-large-up{"ng-bind" => "order.changes_allowed_until"}
|
||||
%td.order4.show-for-large-up{"ng-bind" => "::order.item_count"}
|
||||
%td.order5.text-right{"ng-class" => "{'credit' : order.total < 0, 'debit' : order.total > 0, 'paid' : order.total == 0}","ng-bind" => "::order.total | localizeCurrency"}
|
||||
%td.order6.text-right.show-for-large-up.brick
|
||||
|
||||
@@ -1683,7 +1683,7 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
open_orders:
|
||||
order: Order
|
||||
shop: Shop
|
||||
changes_allowed: Changes Allowed?
|
||||
changes_allowed_until: Changes Allowed Until
|
||||
items: Items
|
||||
total: Total
|
||||
edit: Edit
|
||||
|
||||
Reference in New Issue
Block a user