From 577cf8f60e3c7550002e0b682309e63f6db2eace Mon Sep 17 00:00:00 2001 From: Jonathan Niles Date: Thu, 9 Feb 2017 19:39:28 +0100 Subject: [PATCH] fix(cashbox): ensure is_auxiliary is updated This commit should fix the issues in cashbox management where cashboxes were not properly updated with the is_auxiliary field. It also generally improves the code by: 1. Using the translate directive on the client. 2. Using `db.one()` on the server. 3. Using `FilterParser` on the server. Closes #976. --- .../partials/cash/cashboxes/cashboxes.html | 10 +- .../partials/cash/cashboxes/update/add.html | 29 +++-- .../partials/cash/cashboxes/update/edit.html | 42 +++---- server/controllers/finance/cashboxes/index.js | 114 +++++++----------- 4 files changed, 81 insertions(+), 114 deletions(-) diff --git a/client/src/partials/cash/cashboxes/cashboxes.html b/client/src/partials/cash/cashboxes/cashboxes.html index 1afc2cca4b..4ae860eab4 100644 --- a/client/src/partials/cash/cashboxes/cashboxes.html +++ b/client/src/partials/cash/cashboxes/cashboxes.html @@ -2,23 +2,21 @@
    -
  1. {{ "TREE.ADMIN" | translate }}
  2. -
  3. {{ "CASHBOX.TITLE" | translate }}
  4. - +
  5. TREE.ADMIN
  6. +
  7. CASHBOX.TITLE
-
diff --git a/client/src/partials/cash/cashboxes/update/add.html b/client/src/partials/cash/cashboxes/update/add.html index a80cdd163c..f9d4634843 100644 --- a/client/src/partials/cash/cashboxes/update/add.html +++ b/client/src/partials/cash/cashboxes/update/add.html @@ -5,7 +5,7 @@

- {{ "CASHBOX.BACK" | translate }} + CASHBOX.BACK

@@ -22,8 +22,8 @@
-
- -
+
@@ -55,8 +54,8 @@
-