App.SettingsController = Ember.ObjectController.extend
  needs: ['application']
  # model: (-> @get('controllers.application.supplier')).property('controllers.application.supplier')
  time_zones: (-> window.time_zones ).property()
  countries: (-> window.countries ).property()
  saving: false
  editIensProfile: (-> @get('model.country') is 'Netherlands' ).property('model.country')
  actions:
    saveSettings: ->
      @set 'saving', true
      @get('model').save().then (supplier) =>
        @set 'saving', false
        $('.top-menu .supplier-name').text @get('model.name')
        @transitionToRoute 'index'
