Chore: Changed layout to confirm better with the Style Guide
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
'use strict';
|
||||
|
||||
var ProductGroupListController = ['$scope', 'productGroups', function ($scope, productGroups) {
|
||||
$scope.info = productGroups;
|
||||
}];
|
||||
|
||||
ProductGroupListController.resolve = {
|
||||
productGroups: ['ProductGroup', function (ProductGroup) {
|
||||
return ProductGroup.query({}).$promise;
|
||||
}]
|
||||
};
|
||||
|
||||
var ProductGroupController = ['$scope', '$location', 'productGroup', function ($scope, $location, productGroup) {
|
||||
$scope.productGroup = productGroup;
|
||||
|
||||
$scope.save = function () {
|
||||
$scope.productGroup.$save(function (u, putResponseHeaders) {
|
||||
$scope.toasts.push({Type: 'Success', Message: ''});
|
||||
$location.path('/ProductGroups')
|
||||
}, function (data, status) {
|
||||
$scope.toasts.push({Type: 'Danger', Message: data.data});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.delete = function () {
|
||||
$scope.productGroup.$delete(function (u, putResponseHeaders) {
|
||||
$scope.toasts.push({Type: 'Success', Message: ''});
|
||||
$location.path('/ProductGroups')
|
||||
}, function (data, status) {
|
||||
$scope.toasts.push({Type: 'Danger', Message: data.data});
|
||||
});
|
||||
};
|
||||
$scope.foName = true;
|
||||
}];
|
||||
|
||||
ProductGroupController.resolve = {
|
||||
productGroup: ['$route', 'ProductGroup', function ($route, ProductGroup) {
|
||||
var id = $route.current.params.id;
|
||||
return ProductGroup.get({id: id}).$promise;
|
||||
}]
|
||||
};
|
||||
Reference in New Issue
Block a user