From b8a7a6e7e476fb2906efc59d756dadf693766f5c Mon Sep 17 00:00:00 2001 From: tliero Date: Thu, 4 Aug 2016 13:51:54 +0200 Subject: [PATCH] bugfix for retired categories --- pom.xml | 2 +- src/main/resources/data-h2.sql | 9 ++++++--- src/main/resources/static/app/controllers.js | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 38b8247..1d09d64 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 de.tilman next-transactions - 1.5.6 + 1.5.7 org.springframework.boot diff --git a/src/main/resources/data-h2.sql b/src/main/resources/data-h2.sql index 515afa9..9d1cade 100644 --- a/src/main/resources/data-h2.sql +++ b/src/main/resources/data-h2.sql @@ -6,10 +6,13 @@ INSERT INTO Category (id, name, account_id, position, retired) VALUES (null, 'Einnahmen - Gehalt', 1, 1, false), (null, 'Essen - Arbeit', 1, 3, false), (null, 'Sonstiges - Projekt 1000', 1, 4, true), - (null, 'Wohnen - Haushalt', 1, 4, false), - (null, 'Private Entnahme', 1, 5, false), + (null, 'Wohnen - Haushalt', 1, 5, false), + (null, 'Private Entnahme', 1, 6, false), (null, 'Einnahmen - Gehalt', 2, 1, false), - (null, 'Technik - Server und Hosting', 2, 2, false); + (null, 'Technik - Server und Hosting', 2, 2, false), + (null, 'Essen - Restaurant & Café', 1, 6, true), + (null, 'Essen - Süßwaren & Genussmittel', 1, 7, true), + (null, 'Familie - Baby', 1, 8, true); INSERT INTO Account_User (account_id, user_id) VALUES (1, 1), (1, 2), (1, 3), (2, 1); diff --git a/src/main/resources/static/app/controllers.js b/src/main/resources/static/app/controllers.js index 1bb91a4..3814bfd 100644 --- a/src/main/resources/static/app/controllers.js +++ b/src/main/resources/static/app/controllers.js @@ -154,6 +154,7 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$routePara for (i = 0; i < $scope.categories.length; i++) { if ($scope.categories[i].retired) { $scope.categories.splice(i, 1); + i--; } }