|
@@ -9,7 +9,7 @@
|
|
|
*/
|
|
|
angular.module('fehlerberichtApp')
|
|
|
.controller('OverviewCtrl', function ($scope, $http, $routeParams, $interval) {
|
|
|
- var webservice = 'http://rbs06:8090/fehlerbericht/db.php?';
|
|
|
+ var webservice = 'db.php?';
|
|
|
|
|
|
var PERIOD_VISIBLE = 60 * 1000;
|
|
|
var PERIOD_NOT_VISIBLE = 5 * 60 * 1000;
|
|
@@ -58,6 +58,7 @@ angular.module('fehlerberichtApp')
|
|
|
'EDS',
|
|
|
'Filaks',
|
|
|
'GlobalCube',
|
|
|
+ 'Locosoft',
|
|
|
'Navision',
|
|
|
'Optima',
|
|
|
'Optima-Light'
|
|
@@ -139,6 +140,11 @@ angular.module('fehlerberichtApp')
|
|
|
$scope.domain.benutzer = _.unique(_.pluck(data, 'benutzer'));
|
|
|
});
|
|
|
|
|
|
+ $http.get(webservice + 'a=kommentar&kunde=' + $scope.Filter.kunde + '&datum=' + $scope.DatumFilter.von + '&datum_bis=' + $scope.DatumFilter.bis).success(function (data) {
|
|
|
+ $scope.comments = _.groupBy(data, 'kunde');
|
|
|
+ $scope.comments2 = _.indexBy(data, 'id');
|
|
|
+ });
|
|
|
+
|
|
|
$scope.refresh = function () {
|
|
|
$http.get(webservice + 'a=liste&kunde=' + $scope.Filter.kunde + '&datum=' + $scope.DatumFilter.von + '&datum_bis=' + $scope.DatumFilter.bis).success(function (data) {
|
|
|
if (JSON.stringify($scope.overview) !== JSON.stringify(data)) {
|
|
@@ -146,11 +152,6 @@ angular.module('fehlerberichtApp')
|
|
|
}
|
|
|
//$scope.domain.benutzer = _.unique(_.pluck(data, 'benutzer'));
|
|
|
});
|
|
|
-
|
|
|
- $http.get(webservice + 'a=kommentar&kunde=' + $scope.Filter.kunde + '&datum=' + $scope.DatumFilter.von + '&datum_bis=' + $scope.DatumFilter.bis).success(function (data) {
|
|
|
- $scope.comments = _.groupBy(data, 'kunde');
|
|
|
- $scope.comments2 = _.indexBy(data, 'id');
|
|
|
- });
|
|
|
};
|
|
|
|
|
|
$scope.importData = function () {
|
|
@@ -391,18 +392,12 @@ angular.module('fehlerberichtApp')
|
|
|
return false;
|
|
|
};
|
|
|
|
|
|
- $scope.getCommentsInfo = function (comment_id, kunde, datum) {
|
|
|
+ $scope.getCommentsInfo = function (comment_id) {
|
|
|
if ($scope.comments2[comment_id] !== undefined) {
|
|
|
var c = $scope.comments2[comment_id];
|
|
|
return '<i>' + $scope.domain.bearbeitet[c.status] + '</i><br/>' + c.kommentar;
|
|
|
- } else {
|
|
|
- var comments = _.filter($scope.comments[kunde], function (row) { return row.datum <= datum && row.status > 0; });
|
|
|
- var result = '';
|
|
|
- _.each(comments, function (c) {
|
|
|
- result += '<i>' + $scope.domain.bearbeitet[c.status] + '</i><br/>' + c.kommentar + '<br/>';
|
|
|
- });
|
|
|
- return result;
|
|
|
- }
|
|
|
+ }
|
|
|
+ return 'blubb';
|
|
|
};
|
|
|
|
|
|
$scope.getCommentIcon = function (c) {
|