mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-04 02:31:33 +00:00
14 lines
628 B
CoffeeScript
14 lines
628 B
CoffeeScript
Darkswarm.factory 'CurrentOrder', (currentOrder) ->
|
|
# Populate Currentorder.order from json in page. This is probably redundant now.
|
|
new class CurrentOrder
|
|
constructor: ->
|
|
if currentOrder.bill_address
|
|
currentOrder.bill_address.state_id = currentOrder.bill_address.state_id + ''
|
|
currentOrder.bill_address.country_id = currentOrder.bill_address.country_id + ''
|
|
|
|
if currentOrder.ship_address
|
|
currentOrder.ship_address.state_id = currentOrder.ship_address.state_id + ''
|
|
currentOrder.ship_address.country_id = currentOrder.ship_address.country_id + ''
|
|
|
|
@order = currentOrder
|