'use strict';

var d = require('d')
  , activeManagers = require('../../users/active-managers')
  , _ = require('mano').i18n.bind('View: Manager Select');

module.exports = function (descriptor) {
	Object.defineProperties(descriptor, {
		inputOptions: d({
			list: activeManagers.toArray(function (a, b) {
				return a.fullName.toLowerCase().localeCompare(b.fullName.toLowerCase());
			}),
			property: 'fullName',
			chooseLabel: _("Select manager:")
		})
	});
};

@@ -37,232 +37,168 @@
   , 
-activeManagers = require('../../users/active-managers')%0A  , _ = require('mano').i18n.bind('View: Manager Select');%0A%0Amodule.exports = function (descriptor) %7B%0A%09Object.defineProperties(descriptor, %7B%0A%09%09inputOptions: d(%7B%0A%09%09%09list:
+_ = require('mano').i18n.bind('View: Manager Select')%0A  , activeManagers = require('mano').db.User.instances.filterByKey('isManagerActive')%0A  , sortedManagers =
  act
@@ -235,19 +235,16 @@
 a, b) %7B%0A
-%09%09%09
 %09return 
@@ -313,13 +313,136 @@
 ));%0A
-%09%09%09%7D)
+%7D);%0A%0Amodule.exports = function (descriptor) %7B%0A%09Object.defineProperties(descriptor, %7B%0A%09%09inputOptions: d(%7B%0A%09%09%09list: sortedManagers
 ,%0A%09%09

Update select