diff --git a/app/components/master/pointEntry/pointEntry.html b/app/components/master/pointEntry/pointEntry.html index 049518f..58901f0 100644 --- a/app/components/master/pointEntry/pointEntry.html +++ b/app/components/master/pointEntry/pointEntry.html @@ -1,7 +1,7 @@ -
+

- +

Point Entry

@@ -14,19 +14,43 @@

Point Entry

- + - Add - Add - Add - Add - Add - Add +
+ New + Save + Edit + Delete + Reset + List + + Get Data +
+ +
+ + + + + + + + + + + + + + + + +
#IDDescription
{{$index + 1}}{{h.pointId}}{{h.desc}}
diff --git a/app/components/master/pointEntry/pointEntryController.js b/app/components/master/pointEntry/pointEntryController.js index dc6984a..dfd0a09 100644 --- a/app/components/master/pointEntry/pointEntryController.js +++ b/app/components/master/pointEntry/pointEntryController.js @@ -1,26 +1,58 @@ -angular.module('hrApp').controller('pointEntryController', function ($scope) { - $scope.points = []; +angular.module('hrApp').controller('pointEntryController', function ($scope, $http) { + //$window.document.getElementById('inputPointId').focus(); + $scope.focuser = true; + $scope.points = []; var pointKey = 0; - $scope.point = { key: 0, pointId: "", desc: "" }; - $scope.add = function () { + $scope.clearAll = function () { + $scope.focuser = true; + }; + $scope.save = function () { var l_point = angular.copy($scope.point); - l_point.pointId = ++pointKey; + l_point.key = ++pointKey; $scope.points.push(l_point); $scope.point.pointId = ""; $scope.point.desc = ""; + }; + $scope.edit = function () { - alert($scope.points.length); - } + }; + $scope.delete = function () { + + }; + $scope.reset = function () { + + }; + $scope.list = function () { + + }; $scope.remove = function (index) { $scope.points.splice(index, 1); - } + }; + + $scope.find = function (id) { + $scope.chosen = $scope.points.filter(function (val) { + return val.pointId == id; + }); + if ($scope.chosen.length > 0) { + $scope.point.desc = $scope.chosen[0].desc; + } + }; + + $scope.getData = function () { + alert('b'); + $http.post('http://192.168.100.1/JSWebservice/MyWebservice.asmx/SelectData') + .then(function (response) { + $scope.holas = response.data; + alert($scope.holas); + }) + }; }); diff --git a/app/components/master/taxEntry/taxEntry.html b/app/components/master/taxEntry/taxEntry.html new file mode 100644 index 0000000..f616339 --- /dev/null +++ b/app/components/master/taxEntry/taxEntry.html @@ -0,0 +1,53 @@ +
+
+ + +
+

Group Entry

+
+ + + +
+ + + + + + + + + +
+ New + Save + Edit + Delete + Reset + List +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + +
Group IDDescription
+ X + {{g.groupid}}{{g.description}}
\ No newline at end of file diff --git a/app/components/master/taxEntry/taxEntryController.js b/app/components/master/taxEntry/taxEntryController.js new file mode 100644 index 0000000..54c58ed --- /dev/null +++ b/app/components/master/taxEntry/taxEntryController.js @@ -0,0 +1,5 @@ + +angular.module('hrApp').controller('taxEntryController', function ($scope, $http) { + $scope.clearAll = function () { + }; +}); diff --git a/app/shared/directives.js b/app/shared/directives.js new file mode 100644 index 0000000..5a48e39 --- /dev/null +++ b/app/shared/directives.js @@ -0,0 +1,20 @@ +angular.module('hrApp').directive('focus', function ($timeout, $parse) { + return { + restrict: 'A', + link: function (scope, element, attrs) { + scope.$watch(attrs.focus, function (newValue, oldValue) { + if (newValue) { element[0].focus(); } + }); + element.bind("blur", function (e) { + $timeout(function () { + scope.$apply(attrs.focus + "=false"); + }, 0); + }); + element.bind("focus", function (e) { + $timeout(function () { + scope.$apply(attrs.focus + "=true"); + }, 0); + }) + } + } +}); \ No newline at end of file diff --git a/assets/js/app.js b/assets/js/app.js index b2abd07..357a920 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -6,10 +6,14 @@ var hrApp = angular.module('hrApp', ['ngMaterial', 'ngRoute']); // configure our routes hrApp.config(function ($routeProvider) { $routeProvider - // route for the point entry .when('/masterPointEntry', { - templateUrl: 'app/components/master/pointEntry/pointEntry.html' + templateUrl: 'app/components/master/pointEntry/pointEntry.html', + controller: 'pointEntryController' + }) + .when('/masterTaxEntry', { + templateUrl: 'app/components/master/taxEntry/taxEntry.html', + controller: 'taxEntryController' }) }); @@ -79,3 +83,7 @@ hrApp.controller('aboutController', function ($scope) { hrApp.controller('contactController', function ($scope) { $scope.message = 'Contact us! JK. This is just a demo.'; }); + +hrApp.config(function ($httpProvider) { + delete $httpProvider.defaults.headers.common['X-Requested-With']; +}); \ No newline at end of file diff --git a/index.html b/index.html index 50b518c..782b40f 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,9 @@ Point Entry + + Tax Entry + @@ -39,8 +42,7 @@
- - +
@@ -51,5 +53,7 @@ + + \ No newline at end of file