PATH:
home
/
letacommog
/
letaweb
/
scripts
/
editor
/
ecommerce
/
configuration
define([], function() { return function($scope, communication, uiTabEditing_helper) { $scope.tabEditList = []; $scope.add = function() { if(angular.isDefined($scope.tabEditList)) { $scope.tabEditList.push({ name:'New tax class', apply_to:0, other_zone_rate:0, tax_defined_by:0 }); } } $scope.save = function() { //console.log($scope.tabEditList); //return; if(!$scope.form.$valid) return; communication.moduleExecute('saveForm',{data:$scope.tabEditList},'ecommerce.configuration.tax').then(function(json) { //map new id uiTabEditing_helper.mapProperty(json, $scope.tabEditList,'id'); for(var i = 0;i < $scope.tabEditList.length;i++) { if(angular.isDefined($scope.tabEditList[i].tax_zones)) { uiTabEditing_helper.mapProperty(json[i].tax_zones, $scope.tabEditList[i].tax_zones,'id'); } } console.log($scope.tabEditList); $scope.saved = true; }); } } });
[+]
..
[-] payment - Copy.js
[edit]
[-] zone.js
[edit]
[-] currency.js
[edit]
[-] tax.js
[edit]
[-] currency - Copy.js
[edit]
[+]
currency
[-] shipping.js
[edit]
[-] general.js
[edit]
[+]
shipping
[-] system.js
[edit]
[-] mail.js
[edit]
[-] zone - Copy.js
[edit]
[+]
zone
[-] payment.js
[edit]
[+]
payment
[+]
tax