mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-01 21:47:16 +00:00
Starting to restructure data injection
This commit is contained in:
@@ -2,6 +2,8 @@ Darkswarm.factory 'Cart', (CurrentOrder)->
|
||||
# Handles syncing of current cart/order state to server
|
||||
new class Cart
|
||||
order: CurrentOrder.order
|
||||
line_items: CurrentOrder.order.line_items
|
||||
constructor: ->
|
||||
console.log @order.line_items
|
||||
|
||||
|
||||
# How to structure this?
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Darkswarm.factory 'Products', ($resource, Enterprises, Dereferencer, Taxons) ->
|
||||
@products = $resource("/shop/products").query (products)=>
|
||||
@extend()
|
||||
@dereference()
|
||||
@loading = false
|
||||
@loading = false
|
||||
@
|
||||
|
||||
dereference: ->
|
||||
|
||||
Reference in New Issue
Block a user