diff --git a/client/client/src/credit-list/credit-list.html b/client/client/src/credit-list/credit-list.html
index 02a13d1ff..e888bfacb 100644
--- a/client/client/src/credit-list/credit-list.html
+++ b/client/client/src/credit-list/credit-list.html
@@ -2,7 +2,6 @@
Credit
-
@@ -12,11 +11,10 @@
- {{::credit.amount | number:2}} €
- {{::credit.created | date:'dd/MM/yyyy HH:mm' }}
- {{::credit.employee.name}}
+ ng-repeat="credit in index.model.instances track by credit.id">
+ {{::credit.amount | number:2}} €
+ {{::credit.created | date:'dd/MM/yyyy HH:mm' }}
+ {{::credit.employee.name}} {{::credit.employee.surname}}
No results
@@ -25,5 +23,5 @@
-
+
\ No newline at end of file
diff --git a/services/client/common/models/client-credit.js b/services/client/common/models/client-credit.js
index 7205be03e..ae7fbb466 100644
--- a/services/client/common/models/client-credit.js
+++ b/services/client/common/models/client-credit.js
@@ -1,5 +1,5 @@
module.exports = function(Self) {
- Self.installMethod('filter', filterParams, filterResults);
+ Self.installMethod('filter', filterParams);
function filterParams(params) {
return {
@@ -17,15 +17,4 @@ module.exports = function(Self) {
}
};
}
-
- function filterResults(instances) {
- let result = JSON.parse(JSON.stringify(instances));
- if (result && result.instances && result.instances.length) {
- result.instances.forEach((element, i) => {
- result.instances[i].employee.name = `${element.employee.name} ${element.employee.surname}`;
- delete result.instances[i].employee.surname;
- });
- }
- return result;
- }
};