Files
openfoodnetwork/app/views/spree/admin/shared/_routes.html.erb
Jean-Baptiste Bellet 8624fa2a85 On last item deletion, prevent user on order canceling and cancellation email
... with a modal.
User can cancel the modal or confirm the last item deletion & order cancelation with or without sending a cancellation email to the consumer.
2022-02-10 14:39:00 +01:00

16 lines
569 B
Plaintext

<script>
if (Spree === undefined) {
var Spree = {}
}
if (Spree.routes == undefined) {
Spree.routes = {}
}
Spree.routes = <%== {
:variants_search => spree.admin_search_variants_url(:format => 'json'),
:taxons_search => main_app.api_v0_taxons_url(:format => 'json'),
:orders_api => main_app.api_v0_orders_url,
:states_search => main_app.api_v0_states_url(:format => 'json'),
:cancel_order => spree.fire_admin_order_url(id: @order ? @order.number : "", e: 'cancel')
}.to_json %>;
</script>