Continue adding product variants
This commit is contained in:
@@ -45,6 +45,11 @@ App.MenuProductComponent = Ember.Component.extend
|
|||||||
product_variant.rollback()
|
product_variant.rollback()
|
||||||
@get('product').rollback()
|
@get('product').rollback()
|
||||||
@set 'editMode', false
|
@set 'editMode', false
|
||||||
|
addProductVariant: ->
|
||||||
|
product_variant = @get('targetObject.store').createRecord('product_variant')
|
||||||
|
@get('product.product_variants').addObject product_variant
|
||||||
|
removeProductVariant: (product_variant)->
|
||||||
|
product_variant.destroyRecord()
|
||||||
didInsertElement: ->
|
didInsertElement: ->
|
||||||
@set 'editMode', true if @get('product.isNew')
|
@set 'editMode', true if @get('product.isNew')
|
||||||
namePlaceholder: (-> t "attributes.product.name").property()
|
namePlaceholder: (-> t "attributes.product.name").property()
|
||||||
|
|||||||
@@ -23,9 +23,15 @@ if editMode
|
|||||||
img src=product.image_src
|
img src=product.image_src
|
||||||
each product_variant in product.product_variants
|
each product_variant in product.product_variants
|
||||||
.row
|
.row
|
||||||
.small-3.medium-2.large-1.columns plus
|
.small-1.columns
|
||||||
.small-9.medium-5.large-4.columns.end
|
.small-8.medium-5.large-4.columns= input value=product_variant.name
|
||||||
= input value=product_variant.name
|
.small-2.medium-6.large-7.columns
|
||||||
|
button.remove-product-variant{action "removeProductVariant" product_variant}: span
|
||||||
|
.row
|
||||||
|
.small-12.columns
|
||||||
|
button.add-product-variant{ action "addProductVariant"}
|
||||||
|
span.icon
|
||||||
|
= t 'product_variant.add_product_variant'
|
||||||
else
|
else
|
||||||
if showProduct
|
if showProduct
|
||||||
.row
|
.row
|
||||||
|
|||||||
@@ -13,4 +13,4 @@ form.form-horizontal
|
|||||||
.form-field= number-field numericValue=number_end
|
.form-field= number-field numericValue=number_end
|
||||||
hr
|
hr
|
||||||
button.modal-close{action "close"}=t 'section.add_tables.modal.close_button'
|
button.modal-close{action "close"}=t 'section.add_tables.modal.close_button'
|
||||||
button.modal-confirm.right{action "addTables"}=t 'section.add_tables.modal.add_button'
|
button.modal-confirm.right{action "ok"}=t 'section.add_tables.modal.add_button'
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
@ttry = (path, vars={})->
|
@ttry = (path, vars={})->
|
||||||
@t(path, $.extend(vars, emptyWhenNotFound: true))
|
@t(path, $.extend(vars, emptyWhenNotFound: true))
|
||||||
|
|
||||||
|
|
||||||
# return translation in the form
|
# return translation in the form
|
||||||
# <span data-t="models.table">Tafel</span>
|
# <span data-t="models.table">Tafel</span>
|
||||||
@tspan = (path, vars={}) -> "<span data-t='#{path}' class='translation' data-t-attributes='#{JSON.stringify(vars)}'>#{t(path, vars)}</span>"
|
@tspan = (path, vars={}) -> "<span data-t='#{path}' class='translation' data-t-attributes='#{JSON.stringify(vars)}'>#{t(path, vars)}</span>"
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ App.MenuProductComponent = Ember.Component.extend
|
|||||||
specific_id: (-> "order-product-#{@get('product.id')}").property('product.id')
|
specific_id: (-> "order-product-#{@get('product.id')}").property('product.id')
|
||||||
orderProducts: false
|
orderProducts: false
|
||||||
target: -> @get('parentView.targetObject')
|
target: -> @get('parentView.targetObject')
|
||||||
|
showDescriptionIcon: Ember.computed.or 'product.description', 'product.product_variants.length'
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
addProduct: (product)->
|
addProduct: (product)->
|
||||||
if existing = @target().store.all('product_order').find((po)-> po.get('product') == product and not po.get('order'))
|
if product.get('product_variants.length')
|
||||||
existing.increment()
|
@target().modal 'product_variant_select', model: product
|
||||||
else
|
else
|
||||||
@target().store.createRecord 'product_order', product: product, price: product.get('price')
|
product.addOrderItem()
|
||||||
showProductDescription: (product)->
|
showProductDescription: (product)->
|
||||||
@target().modal 'product_info', model: product, title: product.get('name')
|
@target().modal 'product_info', model: product, title: product.get('name')
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
@App.modals.ProductVariantSelectController = @App.modals.BaseController.extend
|
||||||
|
actions:
|
||||||
|
chooseProductVariant: (product_variant)->
|
||||||
|
@get('model').addOrderItem(product_variant: product_variant.get('name'))
|
||||||
|
@send 'close'
|
||||||
@@ -31,9 +31,16 @@ App.ProductOrdersController = Ember.ArrayController.extend
|
|||||||
|
|
||||||
#orders = @store.all('product_order').toArray()
|
#orders = @store.all('product_order').toArray()
|
||||||
#data = @get('product_orders').map( (po)->po.serialize() )
|
#data = @get('product_orders').map( (po)->po.serialize() )
|
||||||
dataObject = order: {table_id: @get('controllers.table.model.id')}
|
dataObject = {table_id: @get('controllers.table.model.id')}
|
||||||
@get('product_orders').forEach (product_order)-> dataObject['order'][product_order.get('product.id')] = product_order.get('quantity')
|
dataObject.product_orders = @get('product_orders').map( (po) -> po.serialize()).toArray()
|
||||||
Ember.$.post "#{$data_host}/user/orders.json", dataObject, (response) =>
|
#@get('product_orders').forEach (product_order)-> dataObject['order'][product_order.get('product.id')] = product_order.get('quantity')
|
||||||
|
Ember.$.ajax
|
||||||
|
type: 'POST'
|
||||||
|
dataType: 'json'
|
||||||
|
contentType: 'application/json'
|
||||||
|
url: "#{$data_host}/user/orders.json"
|
||||||
|
data: JSON.stringify(dataObject)
|
||||||
|
success: (response) =>
|
||||||
@store.pushPayload('order', response) if response.order
|
@store.pushPayload('order', response) if response.order
|
||||||
@transitionToRoute 'active_list'
|
@transitionToRoute 'active_list'
|
||||||
@get('product_orders').invoke 'unloadRecord'
|
@get('product_orders').invoke 'unloadRecord'
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
attr = DS.attr
|
||||||
|
App.ProductVariant = DS.Model.extend
|
||||||
|
name: attr 'string'
|
||||||
|
product: DS.belongsTo 'product'
|
||||||
|
position: attr 'number', defaultValue: 0
|
||||||
@@ -6,5 +6,26 @@ App.Product = DS.Model.extend
|
|||||||
position: attr('number', defaultValue: 0)
|
position: attr('number', defaultValue: 0)
|
||||||
active: attr 'boolean', defaultValue: true
|
active: attr 'boolean', defaultValue: true
|
||||||
image: attr()
|
image: attr()
|
||||||
product_category: DS.belongsTo('product_category')
|
product_category: DS.belongsTo('product-category')
|
||||||
product_orders: DS.hasMany('product_order')
|
product_orders: DS.hasMany('product-order')
|
||||||
|
product_variants: DS.hasMany 'product-variant'
|
||||||
|
sorted_product_variants: Ember.computed 'product_variants.@each.name', 'product_variants.@each.position', ->
|
||||||
|
@get('product_variants').sortBy('position')
|
||||||
|
|
||||||
|
variantsDisplay: Ember.computed 'sorted_product_variants', ->
|
||||||
|
@get('sorted_product_variants').mapBy('name').join(', ')
|
||||||
|
|
||||||
|
addOrderItem: (options = {})->
|
||||||
|
#if existing = @store.all('product_order').find((po)-> po.get('product') == product and not po.get('order'))
|
||||||
|
if options.product_variant
|
||||||
|
existing = @get('product_orders').find( (po)-> !po.get('order') and po.get('product_variant') is options.product_variant )
|
||||||
|
else
|
||||||
|
existing = @get('product_orders').find( (po)-> !po.get('order') )
|
||||||
|
|
||||||
|
if existing
|
||||||
|
existing.increment()
|
||||||
|
else
|
||||||
|
@store.createRecord 'product_order',
|
||||||
|
product: this
|
||||||
|
price: @get('price')
|
||||||
|
product_variant: options.product_variant
|
||||||
|
|||||||
@@ -4,12 +4,17 @@ App.ProductOrder = DS.Model.extend
|
|||||||
price: attr 'number'
|
price: attr 'number'
|
||||||
product_name: attr('string')
|
product_name: attr('string')
|
||||||
product: DS.belongsTo('product')
|
product: DS.belongsTo('product')
|
||||||
|
product_variant: attr('string')
|
||||||
order: DS.belongsTo('order')
|
order: DS.belongsTo('order')
|
||||||
placed: attr('boolean', defaultValue: false) # virtual attribute for new orders to be placed, should be more elegant
|
placed: attr('boolean', defaultValue: false) # virtual attribute for new orders to be placed, should be more elegant
|
||||||
increment: ->
|
increment: ->
|
||||||
@set('quantity', @get('quantity') + 1)
|
@set('quantity', @get('quantity') + 1)
|
||||||
total: (-> @get('quantity') * @get('price')).property('quantity', 'price')
|
total: (-> @get('quantity') * @get('price')).property('quantity', 'price')
|
||||||
display: (-> "#{@get('quantity')} x #{@get('product.name')}").property('quantity', '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()
|
||||||
setOrder: (order)->
|
setOrder: (order)->
|
||||||
@set('placed', true)
|
@set('placed', true)
|
||||||
@set('order', order)
|
@set('order', order)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
if product.description
|
if showDescriptionIcon
|
||||||
button.show-product-description{action "showProductDescription" product}
|
button.show-product-description{action "showProductDescription" product}
|
||||||
span
|
span
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
if image
|
if image
|
||||||
.right: img src=image.small alt=""
|
.right: img src=image.small alt=""
|
||||||
p==description
|
p==description
|
||||||
|
if product_variants
|
||||||
|
h4= t 'models.plural.product_variant'
|
||||||
|
ul
|
||||||
|
each product_variant in product_variants
|
||||||
|
li= product_variant.name
|
||||||
hr
|
hr
|
||||||
button{action "close"}= t 'modal.info.close'
|
button{action "close"}= t 'modal.info.close'
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
if model.image
|
||||||
|
.right: img src=model.image.small alt=""
|
||||||
|
each product_variant in product_variants
|
||||||
|
.row
|
||||||
|
.small-8.columns: a{action "chooseProductVariant" product_variant}= product_variant.name
|
||||||
|
.small-4.columns: a.choose-product-variant-button{action "chooseProductVariant" product_variant}= t 'product_variant.choose'
|
||||||
|
hr
|
||||||
|
button.modal-close{action "close"}= t 'modal.info.close'
|
||||||
@@ -90,6 +90,15 @@
|
|||||||
@extend .fa
|
@extend .fa
|
||||||
@extend .fa-lg
|
@extend .fa-lg
|
||||||
@extend .fa-trash
|
@extend .fa-trash
|
||||||
|
.remove-product-variant
|
||||||
|
+push-button($bg: $alert-color, $padding: 5px)
|
||||||
|
span
|
||||||
|
@extend .fa, .fa-trash
|
||||||
|
.add-product-variant
|
||||||
|
+button($bg: $success-color, $padding: $button-tny)
|
||||||
|
.icon
|
||||||
|
@extend .fa, .fa-plus
|
||||||
|
margin-right: 6px
|
||||||
.error
|
.error
|
||||||
color: $alert-color
|
color: $alert-color
|
||||||
input
|
input
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
.modal
|
.modal
|
||||||
margin: auto
|
margin: auto
|
||||||
margin-top: 90px
|
margin-top: 90px
|
||||||
width: 300px
|
width: 90%
|
||||||
|
max-width: 756px
|
||||||
background-color: #fff
|
background-color: #fff
|
||||||
padding: 1em
|
padding: 1em
|
||||||
z-index: 9085
|
z-index: 9085
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.choose-product-variant-button
|
||||||
|
+button($padding: $button-tny)
|
||||||
|
margin: 0
|
||||||
|
margin-bottom: 6px
|
||||||
@@ -24,6 +24,13 @@ module Suppliers
|
|||||||
# POST /product_variants
|
# POST /product_variants
|
||||||
# POST /product_variants.json
|
# POST /product_variants.json
|
||||||
def create
|
def create
|
||||||
|
@product_variant = ProductVariant.new(product_variant_params)
|
||||||
|
@product_variant.supplier = current_supplier
|
||||||
|
if @product_variant.save
|
||||||
|
render json: @product_variant
|
||||||
|
else
|
||||||
|
render json: {errors: @product_variant.errors}, status: :unprocessable_entity
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# PUT /product_variants/1
|
# PUT /product_variants/1
|
||||||
@@ -44,13 +51,10 @@ module Suppliers
|
|||||||
# DELETE /product_variants/1
|
# DELETE /product_variants/1
|
||||||
# DELETE /product_variants/1.json
|
# DELETE /product_variants/1.json
|
||||||
def destroy
|
def destroy
|
||||||
@product_variant = ProductVariant.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
|
#@product_variant = ProductVariant.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
|
||||||
|
@product_variant = ProductVariant.find(params[:id])
|
||||||
@product_variant.destroy
|
@product_variant.destroy
|
||||||
|
render json: {}
|
||||||
respond_to do |format|
|
|
||||||
format.html { redirect_to suppliers_product_variants_url, notice: t('action.destroy.successfull', model: ProductVariant.model_name.human) }
|
|
||||||
format.json { head :no_content }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ module Users
|
|||||||
# POST /user/orders
|
# POST /user/orders
|
||||||
def create
|
def create
|
||||||
# render json: {}, status: :unprocessable_entity and return unless params[:order].present? && params[:order][:product_orders].present?
|
# render json: {}, status: :unprocessable_entity and return unless params[:order].present? && params[:order][:product_orders].present?
|
||||||
# converted_order = params[:order][:product_orders].each_with_object({}){|po, o| o[po[:product_id]] = po[:quantity] }
|
|
||||||
converted_order = params[:order]
|
|
||||||
table_id = params[:order].delete('table_id')
|
|
||||||
if list = current_user.active_list
|
if list = current_user.active_list
|
||||||
render json: {}, status: :not_acceptable and return unless list.supplier.open?
|
render json: {}, status: :not_acceptable and return unless list.supplier.open?
|
||||||
else
|
else
|
||||||
@@ -16,8 +13,8 @@ module Users
|
|||||||
#NOTE: security bug here!!!!!!
|
#NOTE: security bug here!!!!!!
|
||||||
# - supplier.open?
|
# - supplier.open?
|
||||||
# - etc....
|
# - etc....
|
||||||
render json: {}, status: :unprocessable_entity and return unless table_id.present?
|
render json: {}, status: :unprocessable_entity and return unless params[:table_id].present?
|
||||||
table = Table.find(table_id)
|
table = Table.find(params[:table_id])
|
||||||
render json: {}, status: :not_acceptable and return unless table.supplier.open?
|
render json: {}, status: :not_acceptable and return unless table.supplier.open?
|
||||||
|
|
||||||
if table.occupied?
|
if table.occupied?
|
||||||
@@ -27,7 +24,7 @@ module Users
|
|||||||
|
|
||||||
list = List.from_table( table, current_user )
|
list = List.from_table( table, current_user )
|
||||||
end
|
end
|
||||||
order = list.place_order products: converted_order, user: current_user
|
order = list.place_order product_orders: params[:product_orders], user: current_user
|
||||||
render json: order, serializer: OrderSerializer
|
render json: order, serializer: OrderSerializer
|
||||||
#render nothing: true
|
#render nothing: true
|
||||||
end
|
end
|
||||||
|
|||||||
+15
-7
@@ -274,16 +274,24 @@ class List
|
|||||||
state == 'active'
|
state == 'active'
|
||||||
end
|
end
|
||||||
|
|
||||||
def place_order(products: {}, user: nil, employee: nil)
|
def place_order(product_orders: [], user: nil, employee: nil)
|
||||||
return false unless products.any?
|
return false unless product_orders.any?
|
||||||
order = Order.create list: self, supplier: supplier, user: user, employee: employee, section_id: section_id, table_id: table_id
|
order = Order.create list: self, supplier: supplier, user: user, employee: employee, section_id: section_id, table_id: table_id
|
||||||
return unless order.id
|
return unless order.id
|
||||||
orders_placed_count = supplier.increment_orders_placed_count!
|
orders_placed_count = supplier.increment_orders_placed_count!
|
||||||
loaded_products = self.class.database.load_document products.keys
|
loaded_products = self.class.database.load_document product_orders.map{|po| po['product_id']}
|
||||||
products.each do |product_id, quantity|
|
product_orders.each do |product_order|
|
||||||
product = loaded_products.find{|p| p.id == product_id} # to get the price
|
next unless product = loaded_products.find{|p| p.id == product_order['product_id']} # to get the price
|
||||||
if quantity.to_i > 0
|
quantity = product_order['quantity'].to_i
|
||||||
ProductOrder.create(order: order, product_id: product_id, quantity: quantity, price: product.price, product_name: product.name)
|
if quantity > 0
|
||||||
|
ProductOrder.create(
|
||||||
|
order: order,
|
||||||
|
product_id: product.id,
|
||||||
|
quantity: quantity,
|
||||||
|
price: product.price,
|
||||||
|
product_name: product.name,
|
||||||
|
product_variant: product_order['product_variant']
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
set_price
|
set_price
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class Product
|
|||||||
#has_and_belongs_to_many :product_categories, storing_keys: false
|
#has_and_belongs_to_many :product_categories, storing_keys: false
|
||||||
belongs_to :supplier # direct! category is an aid
|
belongs_to :supplier # direct! category is an aid
|
||||||
has_many :product_orders
|
has_many :product_orders
|
||||||
has_many :product_variants
|
has_many :product_variants, dependent: :destroy
|
||||||
|
|
||||||
attr_protected :supplier_id
|
attr_protected :supplier_id
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ class ProductOrder
|
|||||||
property :quantity, type: Fixnum
|
property :quantity, type: Fixnum
|
||||||
property :price, type: Float
|
property :price, type: Float
|
||||||
property :product_name
|
property :product_name
|
||||||
|
property :product_variant
|
||||||
|
|
||||||
belongs_to :product
|
belongs_to :product
|
||||||
belongs_to :order
|
belongs_to :order
|
||||||
@@ -14,7 +15,8 @@ class ProductOrder
|
|||||||
|
|
||||||
# Getter for product name. If a supplier deletes a product, that has product_orders, the product
|
# Getter for product name. If a supplier deletes a product, that has product_orders, the product
|
||||||
# will become nil. This method should handle this case.
|
# will become nil. This method should handle this case.
|
||||||
|
alias_method :direct_product_name, :product_name
|
||||||
def product_name
|
def product_name
|
||||||
product.try(:name) || '[deleted]'
|
direct_product_name.presence || product.try(:name) || '[deleted]'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ class ProductVariant
|
|||||||
property :name
|
property :name
|
||||||
property :position, type: Fixnum, default: 0
|
property :position, type: Fixnum, default: 0
|
||||||
belongs_to :product
|
belongs_to :product
|
||||||
|
belongs_to :supplier
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class Supplier
|
|||||||
|
|
||||||
#has_many :orders, through: :lists
|
#has_many :orders, through: :lists
|
||||||
has_many :products, dependent: :destroy
|
has_many :products, dependent: :destroy
|
||||||
|
has_many :product_variants
|
||||||
has_many :product_categories, dependent: :destroy
|
has_many :product_categories, dependent: :destroy
|
||||||
has_many :tables, dependent: :destroy
|
has_many :tables, dependent: :destroy
|
||||||
has_many :lists, dependent: :destroy
|
has_many :lists, dependent: :destroy
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Used for user ember1
|
# Used for user ember1
|
||||||
class ProductOrderSerializer < Qwaiter::Serializer
|
class ProductOrderSerializer < Qwaiter::Serializer
|
||||||
attributes :order_id, :product_id, :quantity, :price, :product_name
|
attributes :order_id, :product_id, :quantity, :price, :product_name, :product_variant
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -78,3 +78,5 @@ en:
|
|||||||
selected_products:
|
selected_products:
|
||||||
clear: Clear
|
clear: Clear
|
||||||
order: Order
|
order: Order
|
||||||
|
product_variant:
|
||||||
|
add_product_variant: Add ${models.product_variant}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ en:
|
|||||||
product: Product
|
product: Product
|
||||||
order: Order
|
order: Order
|
||||||
product_category: Product category
|
product_category: Product category
|
||||||
|
product_variant: Variant
|
||||||
section: Section
|
section: Section
|
||||||
join_request: Join request
|
join_request: Join request
|
||||||
user_feedback: User feedback
|
user_feedback: User feedback
|
||||||
@@ -26,6 +27,7 @@ en:
|
|||||||
product: Products
|
product: Products
|
||||||
order: Orders
|
order: Orders
|
||||||
product_category: Product categories
|
product_category: Product categories
|
||||||
|
product_variant: Variants
|
||||||
section: Sections
|
section: Sections
|
||||||
join_request: Join requests
|
join_request: Join requests
|
||||||
user_feedback: User feedbacks
|
user_feedback: User feedbacks
|
||||||
@@ -52,6 +54,8 @@ en:
|
|||||||
visible: Visible?
|
visible: Visible?
|
||||||
created_at: Created
|
created_at: Created
|
||||||
image: Image
|
image: Image
|
||||||
|
product_variant:
|
||||||
|
name: Name
|
||||||
list:
|
list:
|
||||||
created_at: Created
|
created_at: Created
|
||||||
state: Status
|
state: Status
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ nl:
|
|||||||
product: Product
|
product: Product
|
||||||
order: Bestelling
|
order: Bestelling
|
||||||
product_category: Product categorie
|
product_category: Product categorie
|
||||||
|
product_variant: Variant
|
||||||
section: Afdeling
|
section: Afdeling
|
||||||
join_request: Deelname verzoek
|
join_request: Deelname verzoek
|
||||||
employee: Werknemer
|
employee: Werknemer
|
||||||
@@ -25,6 +26,7 @@ nl:
|
|||||||
product: Producten
|
product: Producten
|
||||||
order: Bestellingen
|
order: Bestellingen
|
||||||
product_category: Product categorieen
|
product_category: Product categorieen
|
||||||
|
product_variant: Varianten
|
||||||
section: Afdelingen
|
section: Afdelingen
|
||||||
join_request: Deelname verzoeken
|
join_request: Deelname verzoeken
|
||||||
employee: Werknemers
|
employee: Werknemers
|
||||||
@@ -50,6 +52,8 @@ nl:
|
|||||||
active: "Actief?"
|
active: "Actief?"
|
||||||
created_at: Aangemaakt
|
created_at: Aangemaakt
|
||||||
image: Afbeelding
|
image: Afbeelding
|
||||||
|
product_variant:
|
||||||
|
name: Naam
|
||||||
list:
|
list:
|
||||||
created_at: Aangemaakt
|
created_at: Aangemaakt
|
||||||
state: Status
|
state: Status
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ nl:
|
|||||||
selected_products:
|
selected_products:
|
||||||
clear: Leegmaken
|
clear: Leegmaken
|
||||||
order: Bestellen
|
order: Bestellen
|
||||||
|
product_variant:
|
||||||
|
add_product_variant: ${models.product_variant} toevoegen
|
||||||
views:
|
views:
|
||||||
pagination:
|
pagination:
|
||||||
first: "« Eerste"
|
first: "« Eerste"
|
||||||
|
|||||||
-12183
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
|||||||
|
moduleForModel 'product', 'Product model',
|
||||||
|
needs: [
|
||||||
|
'model:product_variant',
|
||||||
|
'model:product_category',
|
||||||
|
'model:section_area',
|
||||||
|
'model:product_order',
|
||||||
|
'model:order',
|
||||||
|
'model:supplier'
|
||||||
|
]
|
||||||
|
|
||||||
|
#test "Nothing yet", ->
|
||||||
|
#element = @subject()
|
||||||
|
#assert 2, 2
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
moduleForModel 'section-element', 'Section element model',
|
moduleForModel 'section-element', 'Section element model',
|
||||||
needs: ['model:section', 'model:table']
|
needs: ['model:section', 'model:table', 'model:section-area']
|
||||||
|
|
||||||
test "box_size", ->
|
test "box_size", ->
|
||||||
element = @subject
|
element = @subject
|
||||||
|
|||||||
Reference in New Issue
Block a user