mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-02 06:51:40 +00:00
Merge pull request #6528 from mprieger/5546-cart-page-last-item-deletion
Fix users removing last item of confirmed order on /cart page
This commit is contained in:
@@ -115,6 +115,9 @@ Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, $modal, $roo
|
||||
@line_items = []
|
||||
localStorageService.clearAll() # One day this will have to be moar GRANULAR
|
||||
|
||||
has_one_line_item: =>
|
||||
@line_items_finalised.length == 1
|
||||
|
||||
removeFinalisedLineItem: (id) =>
|
||||
@line_items_finalised = @line_items_finalised.filter (item) ->
|
||||
item.id != id
|
||||
|
||||
Reference in New Issue
Block a user