End of day commit
This commit is contained in:
@@ -3,13 +3,14 @@ App.ProductOrder = DS.Model.extend
|
||||
quantity: attr 'number', defaultValue: 1
|
||||
price: attr 'number'
|
||||
product_variant: attr('string')
|
||||
product_name: attr('string')
|
||||
product: DS.belongsTo('product', async: true)
|
||||
order: DS.belongsTo('order')
|
||||
increment: ->
|
||||
@set('quantity', @get('quantity') + 1)
|
||||
total: (-> @get('quantity') * @get('price')).property('quantity', 'price')
|
||||
display: Ember.computed 'quantity', 'product_variant', 'product.name', ->
|
||||
disp = "#{@get('quantity')} x #{@get('product.name')}"
|
||||
display: Ember.computed 'quantity', 'product_variant', 'product_name', ->
|
||||
disp = "#{@get('quantity')} x #{@get('product_name')}"
|
||||
if variant = @get('product_variant')
|
||||
disp = "#{disp} (#{variant})"
|
||||
disp.htmlSafe()
|
||||
|
||||
@@ -3,9 +3,9 @@ App.Section = DS.Model.extend
|
||||
title: attr 'string'
|
||||
width: attr 'number'
|
||||
height: attr 'number'
|
||||
tables: DS.hasMany('table')
|
||||
section_elements: DS.hasMany('section-element')
|
||||
section_areas: DS.hasMany('section-area')
|
||||
tables: DS.hasMany('table', async: false)
|
||||
section_elements: DS.hasMany('section-element', async: false)
|
||||
section_areas: DS.hasMany('section-area', async: false)
|
||||
|
||||
editmode: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user