Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Clean up account list.
James Cole8ae45ef263b5
diff --git a/resources/assets/v3/js/pages/accounts/index.js b/resources/assets/v3/js/pages/accounts/index.jsindex 62168696e2..e7ada893ae 100644--- a/resources/assets/v3/js/pages/accounts/index.js+++ b/resources/assets/v3/js/pages/accounts/index.js@@ -46,7 +46,6 @@ let index = function () {loadingPage: true,convertToPrimary: false,active: true,- storageKey: "",sums: {},debts: {},differences: {},@@ -55,6 +54,7 @@ let index = function () {formatMoney: formatMoney,// default settings for sorting+ storageKey: "",defaultSortColumn: "order",defaultSortDirection: "asc",@@ -78,10 +78,10 @@ let index = function () {this.anonymous = window.store.get("anonymous");this.storageKey = "accounts-" + this.objectType + (this.active ? "-active" : "-inactive");this.pageNavUrl = "./accounts/" + this.objectType;- this.defaultSortColumn =- "expense" === this.objectType || "revenue" === this.objectType ? "name" : this.defaultSortColumn;+ this.defaultSortColumn = "expense" === this.objectType || "revenue" === this.objectType ? "name" : this.defaultSortColumn;this.active = "inactive-accounts" !== address[address.length - 2];+ // todo make function:// grab state from localStorage.let fromStore = window.store.get(this.storageKey);if (fromStore) {@@ -91,6 +91,7 @@ let index = function () {//console.log('Restore from store:', fromStore);}+ // todo make function// grab state from URL params.const params = new Proxy(new URLSearchParams(window.location.search), {get: (searchParams, prop) => searchParams.get(prop),@@ -113,6 +114,7 @@ let index = function () {this.sortableTable.init(this);+ // todo make function// watch for changes in the sortable table instructions.document.addEventListener("sortable-table-sort-change", (event) => {console.log("sortable-table-sort-change", event.detail);diff --git a/resources/assets/v3/vite.config.js b/resources/assets/v3/vite.config.jsindex ffe05f1788..4802d8c6d0 100644--- a/resources/assets/v3/vite.config.js+++ b/resources/assets/v3/vite.config.js@@ -60,6 +60,7 @@ export default defineConfig(({ command }) => {"js/pages/administrations/edit.js",// categories+ "js/pages/categories/index.js",// budgetsdiff --git a/resources/views/accounts/index.blade.php b/resources/views/accounts/index.blade.phpindex ec722b0fd2..c4f09ae691 100644--- a/resources/views/accounts/index.blade.php+++ b/resources/views/accounts/index.blade.php@@ -17,7 +17,9 @@:route="route('accounts.create', $objectType) . '?_from=' . urlencode($FF3_FROM)":linkTitle="__('firefly.make_new_'. $objectType . '_account')"/><div class="card-body p-0">- <x-elements.alpine.page-navigation/>+ <template x-if="totalPages > 1">+ <x-elements.alpine.page-navigation/>+ </template><table data-sort-identifier="main" class="table table-valign-middle table-sm table-hover sortable"><thead>