Update admin.js

parent cabf8e79
Pipeline #4648 passed with stage
in 12 minutes and 32 seconds
......@@ -12,6 +12,17 @@ angular.module('bars.admin', [
.config(['$stateProvider', function($stateProvider) {
$stateProvider.state('bar.admin', {
url: "/admin",
resolve: {
account_list: ['api.models.account', function(Account) {
return Account.all();
}],
stockitem_list: ['api.models.stockitem', function(StockItem) {
return StockItem.all();
}],
bar_account: ['api.models.account', function(Account) {
return Account.ofUser(6);
}]
},
views: {
'@bar': {
templateUrl: "components/admin/layout.html",
......@@ -19,18 +30,7 @@ angular.module('bars.admin', [
},
'@bar.admin': {
templateUrl: "components/admin/dashboard.html",
controller: 'admin.ctrl.home',
resolve: {
account_list: ['api.models.account', function(Account) {
return Account.all();
}],
stockitem_list: ['api.models.stockitem', function(StockItem) {
return StockItem.all();
}],
bar_account: ['api.models.account', function(Account) {
return Account.ofUser(6);
}]
}
controller: 'admin.ctrl.home'
}
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment