PATH:
home
/
letacommog
/
letaweb
/
scripts
/
editor
/
ecommerce
/
customer
define([], function() { return function($scope, communication, popup_customer_group,$dialog,$state,$uibModalStack) { $scope.gridInstance={}; $scope.add = function() { popup_customer_group.open().result.then(function(data) { communication.removeList('customer_group'); $scope.gridInstance.instance.reloadData(); }); } $scope.delete = function() { var rows = $scope.gridInstance.selections; if(rows.length > 0) { $dialog.confirm({ title:'', message:window.t('LBL_DELETE_ITEMS_CONFIRM_MESSAGE') }).result.then(function() { communication.api('deleteItems', {ids:rows},'ecommerce.customer.group').then(function() { communication.removeList('customer_group'); $scope.gridInstance.instance.reloadData(); }); }); } } $scope.RowButtonClickHandler = { edit : function(id) { communication.api('getFormData',{name:'customer_group', id:id}).then(function(data) { popup_customer_group.open( { data:data }).result.then(function(data) { if($state.current.name =='ecommerce.customer.customer_group.view') $state.go('ecommerce.customer.customer_group'); communication.removeList('customer_group'); $scope.gridInstance.instance.reloadData(); }, function() { if($state.current.name =='ecommerce.customer.customer_group.view') $state.go('ecommerce.customer.customer_group'); }); }) } }; var checkState = function() { if($state.current.name =='ecommerce.customer.customer_group.view') $scope.RowButtonClickHandler.edit($state.params.customer_groupID); } checkState(); $scope.$on("$stateChangeSuccess", function(event, toState, toParams, fromState, fromParams) { checkState(); if(fromState.name =='ecommerce.customer.customer_group.view') $uibModalStack.dismissAll(1); }); } });
[+]
..
[-] customer_group.js
[edit]
[-] customer.js
[edit]
[-] address.js
[edit]