Commit 78cc0705 authored by Phạm Duy Phi's avatar Phạm Duy Phi

no message

parent 5c69f55e
/* /*
*/ */
angular.module("myApp").controller("timeSheetController", function($scope, $http) { angular.module("myApp").controller("timeSheetController", function($scope, $http, $state) {
console.log("Time Sheet controller"); console.log("Time Sheet controller");
$scope.ts = { $scope.ts = {
...@@ -40,9 +40,10 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http ...@@ -40,9 +40,10 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http
url : "http://localhost:8080/eproject/timesheet/delete/" + ts.id url : "http://localhost:8080/eproject/timesheet/delete/" + ts.id
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
$scope.config.timeSheets=response.data; $state.reload();
}, function errorCallback(response) { }, function errorCallback(response) {
console.log(response) console.log(response);
$state.reload();
}); });
}; };
...@@ -56,8 +57,10 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http ...@@ -56,8 +57,10 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http
data: $scope.tsdto data: $scope.tsdto
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
$state.reload();
}, function errorCallback(response) { }, function errorCallback(response) {
console.log(response) console.log(response);
$state.reload();
}); });
} }
...@@ -79,8 +82,10 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http ...@@ -79,8 +82,10 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http
data: $scope.tsdto data: $scope.tsdto
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
$state.reload();
}, function errorCallback(response) { }, function errorCallback(response) {
console.log(response) console.log(response);
$state.reload();
}); });
} }
}).directive('pgnTable', ['$compile', function ($compile) { }).directive('pgnTable', ['$compile', function ($compile) {
......
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