Files
mozo-backend/app/assets/javascripts/supplier/app/controllers/sections_index_controller.js.coffee
T

19 lines
790 B
CoffeeScript

App.SectionsIndexController = Ember.ArrayController.extend
needs: ['application', 'sections', 'index']
sections: (-> @get('controllers.sections.model')).property('controllers.sections.model')
sectionQrCodesUrl: ((a,b,c)->
debugger
Routes.qr_codes_suppliers_tables_path()
).property()
newPath: Routes.new_suppliers_section_path()
qrPath: (section_id)->
Routes.qr_codes_suppliers_tables_path section_id: section_id
actions:
showDashboardOrders: (section)->
@set 'controllers.application.active_section', section
@transitionToRoute('index')
addSection: -> @send 'openModal', 'modal_add_section', @get('model')
goToSection: (section)->
@set 'controllers.application.active_section', section
@transitionToRoute 'section', section.id