mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Update app/assets/javascripts/darkswarm/controllers/edit_bought_order_controller.js.coffee
This commit is contained in:
@@ -3,8 +3,9 @@ Darkswarm.controller "EditBoughtOrderController", ($scope, $resource, $timeout,
|
||||
$scope.removeEnabled = true
|
||||
|
||||
$scope.deleteLineItem = (id) ->
|
||||
if Cart.check_last_finalised_item()
|
||||
$scope.removeEnabled = false
|
||||
if Cart.has_one_line_item()
|
||||
Messages.error(t 'orders_cannot_remove_the_final_item')
|
||||
$scope.removeEnabled = false
|
||||
$timeout (->
|
||||
$scope.removeEnabled = true
|
||||
), 10000
|
||||
|
||||
Reference in New Issue
Block a user