From 12936c72abd0111c726ef7af655fbdb2de306098 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Sun, 15 Mar 2020 21:15:43 -0600 Subject: [PATCH] Split AddEditTransaction into multiple components Signed-off-by: William Brawner --- lib/Db/Transaction.php | 2 +- src/components/BudgetDetails.vue | 2 +- src/components/CategoryDetails.vue | 2 +- .../transaction/EditTransaction.vue | 20 ++++++++++++ src/components/transaction/NewTransaction.vue | 23 ++++++++++++++ .../{ => transaction}/TransactionDetails.vue | 0 .../TransactionForm.vue} | 31 +++++++++---------- .../{ => transaction}/TransactionList.vue | 0 src/router/index.js | 9 +++--- src/store/index.js | 5 +-- 10 files changed, 68 insertions(+), 26 deletions(-) create mode 100644 src/components/transaction/EditTransaction.vue create mode 100644 src/components/transaction/NewTransaction.vue rename src/components/{ => transaction}/TransactionDetails.vue (100%) rename src/components/{AddEditTransaction.vue => transaction/TransactionForm.vue} (80%) rename src/components/{ => transaction}/TransactionList.vue (100%) diff --git a/lib/Db/Transaction.php b/lib/Db/Transaction.php index 0ff428f..1faae35 100644 --- a/lib/Db/Transaction.php +++ b/lib/Db/Transaction.php @@ -41,6 +41,6 @@ class Transaction extends Entity implements JsonSerializable { if (!$timestamp) return null; $datetime = new DateTime(); $datetime->setTimestamp($timestamp); - return $datetime->format(DateTime::ATOM); + return $datetime->format(DateTime::RFC3339_EXTENDED); } } \ No newline at end of file diff --git a/src/components/BudgetDetails.vue b/src/components/BudgetDetails.vue index 4867e64..4c325f4 100644 --- a/src/components/BudgetDetails.vue +++ b/src/components/BudgetDetails.vue @@ -37,7 +37,7 @@ import { mapGetters, mapState } from "vuex"; import { Actions } from "@nextcloud/vue/dist/Components/Actions"; import { ActionButton } from "@nextcloud/vue/dist/Components/ActionButton"; import CategoryList from "./CategoryList"; -import TransactionList from "./TransactionList"; +import TransactionList from "./transaction/TransactionList"; export default { name: "budget-details", diff --git a/src/components/CategoryDetails.vue b/src/components/CategoryDetails.vue index 75ee19a..ec0d024 100644 --- a/src/components/CategoryDetails.vue +++ b/src/components/CategoryDetails.vue @@ -8,7 +8,7 @@ \ No newline at end of file diff --git a/src/components/transaction/NewTransaction.vue b/src/components/transaction/NewTransaction.vue new file mode 100644 index 0000000..1809fcd --- /dev/null +++ b/src/components/transaction/NewTransaction.vue @@ -0,0 +1,23 @@ + + \ No newline at end of file diff --git a/src/components/TransactionDetails.vue b/src/components/transaction/TransactionDetails.vue similarity index 100% rename from src/components/TransactionDetails.vue rename to src/components/transaction/TransactionDetails.vue diff --git a/src/components/AddEditTransaction.vue b/src/components/transaction/TransactionForm.vue similarity index 80% rename from src/components/AddEditTransaction.vue rename to src/components/transaction/TransactionForm.vue index 8bedb48..0b31bc5 100644 --- a/src/components/AddEditTransaction.vue +++ b/src/components/transaction/TransactionForm.vue @@ -1,6 +1,6 @@