-
Notifications
You must be signed in to change notification settings - Fork 0
/
bookingbug-angular-settings.min.js
1 lines (1 loc) · 4.2 KB
/
bookingbug-angular-settings.min.js
1
(function(){"use strict";angular.module("BBAdminSettings").config(["$logProvider",function($logProvider){"ngInject";$logProvider.debugEnabled(!0)}])}).call(this),function(){"use strict";angular.module("BBAdminSettings",["BB","BBAdmin.Services","BBAdmin.Filters","BBAdmin.Controllers","trNgGrid"]),angular.module("BBAdminSettingsMockE2E",["BBAdminSettings","BBAdminMockE2E"])}.call(this),function(){"use strict";angular.module("BBAdminSettings").directive("adminTable",["$log","ModalForm","BBModel",function($log,ModalForm,BBModel){var controller,link;return controller=function($scope){return $scope.getAdministrators=function(){var params;return params={company:$scope.company},BBModel.Admin.Administrator.$query(params).then(function(administrators){return $scope.admin_models=administrators,$scope.administrators=_.map(administrators,function(administrator){return _.pick(administrator,"id","name","email","role")})})},$scope.newAdministrator=function(){return ModalForm["new"]({company:$scope.company,title:"New Administrator",new_rel:"new_administrator",post_rel:"administrators",success:function(administrator){return $scope.administrators.push(administrator)}})},$scope.edit=function(id){var admin;return admin=_.find($scope.admin_models,function(p){return p.id===id}),ModalForm.edit({model:admin,title:"Edit Administrator"})}},link=function(scope,element,attrs){return scope.company?scope.getAdministrators():BBModel.Admin.Company.$query(attrs).then(function(company){return scope.company=company,scope.getAdministrators()})},{controller:controller,link:link,templateUrl:"admin-table/admin_table_main.html"}}])}.call(this),function(){"use strict";var extend=function(child,parent){function ctor(){this.constructor=child}for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;angular.module("BB.Models").factory("Admin.AdministratorModel",["$q","AdminAdministratorService","BBModel","BaseModel",function($q,AdminAdministratorService,BBModel,BaseModel){var Admin_Administrator;return Admin_Administrator=function(superClass){function Admin_Administrator(data){Admin_Administrator.__super__.constructor.call(this,data)}return extend(Admin_Administrator,superClass),Admin_Administrator.$query=function(params){return AdminAdministratorService.query(params)},Admin_Administrator}(BaseModel)}])}.call(this),function(){"use strict";var extend=function(child,parent){function ctor(){this.constructor=child}for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;angular.module("BB.Models").factory("Admin.UserModel",["$q","BBModel","BaseModel",function($q,BBModel,BaseModel){var Admin_User;return Admin_User=function(superClass){function Admin_User(data){Admin_User.__super__.constructor.call(this,data),this.companies=[],data&&this.$has("companies")&&this.$get("companies").then(function(_this){return function(comps){return _this.companies=comps}}(this))}return extend(Admin_User,superClass),Admin_User}(BaseModel)}])}.call(this),function(){"use strict";angular.module("BBAdmin.Services").factory("AdminAdministratorService",["$q","BBModel",function($q,BBModel){return{query:function(params){var company,defer;return company=params.company,defer=$q.defer(),company.$get("administrators").then(function(collection){return collection.$get("administrators").then(function(administrators){var a,models;return models=function(){var i,len,results;for(results=[],i=0,len=administrators.length;len>i;i++)a=administrators[i],results.push(new BBModel.Admin.Administrator(a));return results}(),defer.resolve(models)},function(err){return defer.reject(err)})},function(err){return defer.reject(err)}),defer.promise}}}])}.call(this),function(){"use strict";angular.module("BBAdminSettings").config(["$translateProvider",function($translateProvider){"ngInject";var translations;translations={SETTINGS:{ADMIN_TABLE:{NEW_ADMINISTRATOR:"New Administrator",EDIT:"@:COMMON.BTN.EDIT"},ADMIN_FORM:{OK_BTN:"@:COMMON.BTN.OK",CANCEL_BTN:"@:COMMON.BTN.CANCEL"}}},$translateProvider.translations("en",translations)}])}.call(this);