Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpbrett committed Jan 11, 2021
1 parent cbadd25 commit aab004c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Darkswarm.controller "EditBoughtOrderController", ($scope, $resource, $timeout,

$scope.deleteLineItem = (id) ->
if Cart.has_one_line_item()
Messages.error(t 'orders_cannot_remove_the_final_item')
$scope.removeEnabled = false
Messages.error(t 'orders_cannot_remove_the_final_item')
$scope.removeEnabled = false
$timeout (->
$scope.removeEnabled = true
), 10000
Expand Down
3 changes: 2 additions & 1 deletion app/assets/javascripts/darkswarm/services/cart.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, $modal, $roo
localStorageService.clearAll() # One day this will have to be moar GRANULAR

has_one_line_item: =>
@line_items_finalised.length == 1
@line_items_finalised.length == 1

removeFinalisedLineItem: (id) =>
@line_items_finalised = @line_items_finalised.filter (item) ->
item.id != id
Expand Down

0 comments on commit aab004c

Please sign in to comment.