App.SettingsController = Ember.Controller.extend
  #supplier: Ember.computed.alias 'globals.current_supplier'
  time_zones: (-> window.time_zones ).property()
  countries: (-> window.countries.map (el)-> el.name ).property()
  saving: false
  editIensProfile: Ember.computed 'globals.current_supplier.country', ->
    @get('globals.current_supplier.country') is 'Netherlands'
  actions:
    saveSettings: ->
      @set 'saving', true
      @get('globals.current_supplier').save().then (supplier) =>
        @set 'saving', false
        #$('.top-menu .supplier-name').text @get('globals.current_supplier.name')
        @transitionToRoute 'index'
