Refactor for authorization sanity
This commit is contained in:
@@ -2,6 +2,8 @@ attr = DS.attr
|
||||
App.Employee= DS.Model.extend Ember.Validations.Mixin,
|
||||
name: attr 'string'
|
||||
email: attr 'string'
|
||||
manager: attr 'boolean', defaultValue: false
|
||||
active: attr 'boolean', defaultValue: true
|
||||
|
||||
validations:
|
||||
name: {presence: true}
|
||||
|
||||
@@ -45,11 +45,11 @@ App.List = DS.Model.extend
|
||||
).property('state', 'orders.@each.state')
|
||||
close: ->
|
||||
@markClosed()
|
||||
$.post Routes.supplier_close_list_path(), list_id: @id
|
||||
$.post Routes.close_suppliers_list_pat(@id)
|
||||
|
||||
is_helped: ->
|
||||
@markHelped()
|
||||
$.post Routes.supplier_mark_list_as_helped_path(), list_id: @id
|
||||
$.post Routes.mark_helped_suppliers_list_path(@id)
|
||||
remove_needs_payment: ->
|
||||
@set 'needs_payment', false
|
||||
$.post Routes.supplier_remove_list_needs_payment_path(), list_id: @id
|
||||
|
||||
Reference in New Issue
Block a user