Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Get v2 up and running (sort of)
James Colea3fcd636e707
diff --git a/package-lock.json b/package-lock.jsonindex 1cf428edfb..405196ac5d 100644--- a/package-lock.json+++ b/package-lock.json@@ -13,42 +13,6 @@"postcss": "^8.4.47"}},- "node_modules/@ag-grid-community/client-side-row-model": {- "version": "32.3.4",- "resolved": "https://registry.npmjs.org/@ag-grid-community/client-side-row-model/-/client-side-row-model-32.3.4.tgz",- "integrity": "sha512-AZyLSemPyaCJi8wPJ/wvwow6v4MZKMkg9152TameKvaEf+m+N+gWJNKb1dQoqjgWCgEByqvM6SO8dJtYRrdr/A==",- "license": "MIT",- "dependencies": {- "@ag-grid-community/core": "32.3.4",- "tslib": "^2.3.0"- }- },- "node_modules/@ag-grid-community/core": {- "version": "32.3.4",- "resolved": "https://registry.npmjs.org/@ag-grid-community/core/-/core-32.3.4.tgz",- "integrity": "sha512-g1CJOQuA4uRx1U3VP9SZLnTJBYdMwCTM348FsubdI6anaqxnHv3X0kridq9v1v26qXbl7yytm5X3v1hPcV8wVA==",- "license": "MIT",- "dependencies": {- "ag-charts-types": "10.3.4",- "tslib": "^2.3.0"- }- },- "node_modules/@ag-grid-community/infinite-row-model": {- "version": "32.3.4",- "resolved": "https://registry.npmjs.org/@ag-grid-community/infinite-row-model/-/infinite-row-model-32.3.4.tgz",- "integrity": "sha512-GWlUoU9UPGp0ZYdBCiV8R+A/mwdYweoB3HsVOEeQiNZYDC1TQJxiCSKBCCg9qk3KDY+VbJ/6ebV/BUN7cLwIuQ==",- "license": "MIT",- "dependencies": {- "@ag-grid-community/core": "32.3.4",- "tslib": "^2.3.0"- }- },- "node_modules/@ag-grid-community/styles": {- "version": "33.0.3",- "resolved": "https://registry.npmjs.org/@ag-grid-community/styles/-/styles-33.0.3.tgz",- "integrity": "sha512-1bXrYoVj5TIpLvyjgXHvKnYrC0/JvrdGDdJ3mYfT58GulDt1iNQqhjxMnZB+sxMdQoOc681jmKTGcWzOEDE1Dw==",- "license": "MIT"- },"node_modules/@ampproject/remapping": {"version": "2.3.0","resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",@@ -3643,12 +3607,6 @@"integrity": "sha512-q2VoAOu1DtZ7z41M2gQ05VMNYkFCAMxFU+j/HUMwCOlr/e3VhO+qww2SGJw4OxBw5nZQ7YV78+wK2RiB7ConzQ==","license": "MIT"},- "node_modules/ag-charts-types": {- "version": "10.3.4",- "resolved": "https://registry.npmjs.org/ag-charts-types/-/ag-charts-types-10.3.4.tgz",- "integrity": "sha512-MU+3gvKn1jEyLlMHS0Vu0nHmIQxiVJAnA6ftUatLZvV0c7hOWap4VWghqZ0cVZUJsCdMI59Iuq1u3xquKv4LOQ==",- "license": "MIT"- },"node_modules/ajv": {"version": "6.12.6","resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",@@ -4448,9 +4406,9 @@}},"node_modules/caniuse-lite": {- "version": "1.0.30001706",- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001706.tgz",- "integrity": "sha512-3ZczoTApMAZwPKYWmwVbQMFpXBDds3/0VciVoUwPUbldlYyVLmRVuRs/PcUZtHpbLRpzzDvrvnFuREsGt6lUug==",+ "version": "1.0.30001707",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001707.tgz",+ "integrity": "sha512-3qtRjw/HQSMlDWf+X79N206fepf4SOOU6SQLMaq/0KkZLmSjPxAkBOQQ+FxbHKfHmYLZFfdWsO3KA90ceHPSnw==","dev": true,"funding": [{@@ -11094,6 +11052,7 @@"version": "2.8.1","resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz","integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",+ "dev": true,"license": "0BSD"},"node_modules/tty-browserify": {@@ -12276,18 +12235,14 @@"resources/assets/v2": {"hasInstallScript": true,"dependencies": {- "@ag-grid-community/client-side-row-model": "^32.0.2",- "@ag-grid-community/core": "^32.0.2",- "@ag-grid-community/infinite-row-model": "^32.0.2",- "@ag-grid-community/styles": "^33.0.2","@fortawesome/fontawesome-free": "^6.4.0","@popperjs/core": "^2.11.8",- "admin-lte": "^4.0.0-alpha3",+ "admin-lte": "^4.0.0-beta3","alpinejs": "^3.13.7",- "bootstrap": "^5.3.0",- "bootstrap5-autocomplete": "^1.1.22",- "bootstrap5-tags": "^1.7",- "chart.js": "^4.4.0",+ "bootstrap": "^5",+ "bootstrap5-autocomplete": "^1",+ "bootstrap5-tags": "^1",+ "chart.js": "^4","chartjs-adapter-date-fns": "^3.0.0","chartjs-chart-sankey": "^0.14.0","date-fns": "^4.0.0",@@ -12299,10 +12254,10 @@"store": "^2.0.12"},"devDependencies": {- "axios": "^1.8.2",- "laravel-vite-plugin": "^1.0.5",- "patch-package": "^8.0.0",- "sass": "^1.78.0",+ "axios": "^1",+ "laravel-vite-plugin": "^1",+ "patch-package": "^8",+ "sass": "^1","vite": "^6","vite-plugin-manifest-sri": "^0.2.0"}diff --git a/resources/assets/v2/package.json b/resources/assets/v2/package.jsonindex 1c1018dcf9..b7eca8bc55 100644--- a/resources/assets/v2/package.json+++ b/resources/assets/v2/package.json@@ -8,26 +8,22 @@"postinstall": "patch-package --error-on-fail"},"devDependencies": {- "axios": "^1.8.2",- "laravel-vite-plugin": "^1.0.5",- "patch-package": "^8.0.0",- "sass": "^1.78.0",+ "axios": "^1",+ "laravel-vite-plugin": "^1",+ "patch-package": "^8",+ "sass": "^1","vite": "^6","vite-plugin-manifest-sri": "^0.2.0"},"dependencies": {- "@ag-grid-community/client-side-row-model": "^32.0.2",- "@ag-grid-community/core": "^32.0.2",- "@ag-grid-community/infinite-row-model": "^32.0.2",- "@ag-grid-community/styles": "^33.0.2","@fortawesome/fontawesome-free": "^6.4.0","@popperjs/core": "^2.11.8",- "admin-lte": "^4.0.0-alpha3",+ "admin-lte": "^4.0.0-beta3","alpinejs": "^3.13.7",- "bootstrap": "^5.3.0",- "bootstrap5-autocomplete": "^1.1.22",- "bootstrap5-tags": "^1.7",- "chart.js": "^4.4.0",+ "bootstrap": "^5",+ "bootstrap5-autocomplete": "^1",+ "bootstrap5-tags": "^1",+ "chart.js": "^4","chartjs-adapter-date-fns": "^3.0.0","chartjs-chart-sankey": "^0.14.0","date-fns": "^4.0.0",diff --git a/resources/assets/v2/src/api/v1/chart/account/dashboard.js b/resources/assets/v2/src/api/v1/chart/account/dashboard.jsnew file mode 100644index 0000000000..f36e87574c--- /dev/null+++ b/resources/assets/v2/src/api/v1/chart/account/dashboard.js@@ -0,0 +1,36 @@+/*+ * overview.js+ * Copyright (c) 2022 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++import {api} from "../../../../boot/axios";+import {format} from "date-fns";++export default class Dashboard {+ dashboard(start, end) {+ let startStr = format(start, 'y-MM-dd');+ let endStr = format(end, 'y-MM-dd');+ return api.get('/api/v1/chart/account/dashboard', {params: {filter: {start: startStr, end: endStr}}});+ }++ expense(start, end) {+ let startStr = format(start, 'y-MM-dd');+ let endStr = format(end, 'y-MM-dd');+ return api.get('/api/v1/chart/account/expense-dashboard', {params: {start: startStr, end: endStr}});+ }+}diff --git a/resources/assets/v2/src/api/v1/chart/budget/dashboard.js b/resources/assets/v2/src/api/v1/chart/budget/dashboard.jsnew file mode 100644index 0000000000..6e94a2cc7c--- /dev/null+++ b/resources/assets/v2/src/api/v1/chart/budget/dashboard.js@@ -0,0 +1,30 @@+/*+ * overview.js+ * Copyright (c) 2022 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++import {api} from "../../../../boot/axios";+import {format} from "date-fns";++export default class Dashboard {+ dashboard(start, end) {+ let startStr = format(start, 'y-MM-dd');+ let endStr = format(end, 'y-MM-dd');+ return api.get('/api/v1/chart/budget/dashboard', {params: {start: startStr, end: endStr}});+ }+}diff --git a/resources/assets/v2/src/api/v1/chart/category/dashboard.js b/resources/assets/v2/src/api/v1/chart/category/dashboard.jsnew file mode 100644index 0000000000..46afdc01b0--- /dev/null+++ b/resources/assets/v2/src/api/v1/chart/category/dashboard.js@@ -0,0 +1,30 @@+/*+ * overview.js+ * Copyright (c) 2022 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++import {api} from "../../../../boot/axios";+import {format} from "date-fns";++export default class Dashboard {+ dashboard(start, end) {+ let startStr = format(start, 'y-MM-dd');+ let endStr = format(end, 'y-MM-dd');+ return api.get('/api/v1/chart/category/dashboard', {params: {start: startStr, end: endStr}});+ }+}diff --git a/resources/assets/v2/src/api/v1/accounts/get.js b/resources/assets/v2/src/api/v1/model/account/get.jssimilarity index 97%rename from resources/assets/v2/src/api/v1/accounts/get.jsrename to resources/assets/v2/src/api/v1/model/account/get.jsindex ce6fc50d57..0625ab496d 100644--- a/resources/assets/v2/src/api/v1/accounts/get.js+++ b/resources/assets/v2/src/api/v1/model/account/get.js@@ -18,7 +18,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/-import {api} from "../../../boot/axios";+import {api} from "../../../../boot/axios";import format from "date-fns/format";export default class Get {diff --git a/resources/assets/v2/src/api/v1/attachments/post.js b/resources/assets/v2/src/api/v1/model/attachment/post.jssimilarity index 100%rename from resources/assets/v2/src/api/v1/attachments/post.jsrename to resources/assets/v2/src/api/v1/model/attachment/post.jsdiff --git a/resources/assets/v2/src/api/v1/model/piggy-bank/get.js b/resources/assets/v2/src/api/v1/model/piggy-bank/get.jsnew file mode 100644index 0000000000..512120b50a--- /dev/null+++ b/resources/assets/v2/src/api/v1/model/piggy-bank/get.js@@ -0,0 +1,35 @@+/*+ * get.js+ * Copyright (c) 2023 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */+++import {api} from "../../../../boot/axios";++export default class Get {++ /**+ *+ * @param params+ * @returns {Promise<AxiosResponse<any>>}+ */+ list(params) {+ return api.get('/api/v1/piggy-banks', {params: params});+ }++}diff --git a/resources/assets/v2/src/api/v1/model/subscription/get.js b/resources/assets/v2/src/api/v1/model/subscription/get.jsnew file mode 100644index 0000000000..a1ba57460d--- /dev/null+++ b/resources/assets/v2/src/api/v1/model/subscription/get.js@@ -0,0 +1,42 @@+/*+ * get.js+ * Copyright (c) 2023 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */+++import {api} from "../../../../boot/axios";++export default class Get {++ /**+ *+ * @param params+ * @returns {Promise<AxiosResponse<any>>}+ */+ list(params) {+ return api.get('/api/v1/subscriptions', {params: params});+ }++ paid(params) {+ return api.get('/api/v1/subscriptions/sum/paid', {params: params});+ }++ unpaid(params) {+ return api.get('/api/v1/subscriptions/sum/unpaid', {params: params});+ }+}diff --git a/resources/assets/v2/src/api/v1/model/transaction/get.js b/resources/assets/v2/src/api/v1/model/transaction/get.jsnew file mode 100644index 0000000000..b7bbfdba80--- /dev/null+++ b/resources/assets/v2/src/api/v1/model/transaction/get.js@@ -0,0 +1,40 @@+/*+ * get.js+ * Copyright (c) 2023 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */+++import {api} from "../../../../boot/axios";++export default class Get {++ /**+ *+ * @param params+ * @returns {Promise<AxiosResponse<any>>}+ */+ list(params) {+ return api.get('/api/v2/transactions', {params: params});+ }+ infiniteList(params) {+ return api.get('/api/v2/infinite/transactions', {params: params});+ }+ show(id, params){+ return api.get('/api/v2/transactions/' + id, {params: params});+ }+}diff --git a/resources/assets/v2/src/api/v1/model/transaction/post.js b/resources/assets/v2/src/api/v1/model/transaction/post.jsnew file mode 100644index 0000000000..0b02577566--- /dev/null+++ b/resources/assets/v2/src/api/v1/model/transaction/post.js@@ -0,0 +1,28 @@+/*+ * post.js+ * Copyright (c) 2023 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++import {api} from "../../../../boot/axios";++export default class Post {+ post(submission) {+ let url = '/api/v2/transactions';+ return api.post(url, submission);+ }+}diff --git a/resources/assets/v2/src/api/v1/model/transaction/put.js b/resources/assets/v2/src/api/v1/model/transaction/put.jsnew file mode 100644index 0000000000..09efefc8d9--- /dev/null+++ b/resources/assets/v2/src/api/v1/model/transaction/put.js@@ -0,0 +1,28 @@+/*+ * post.js+ * Copyright (c) 2023 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++import {api} from "../../../../boot/axios";++export default class Put {+ put(submission, params) {+ let url = '/api/v2/transactions/' + parseInt(params.id);+ return api.put(url, submission);+ }+}diff --git a/resources/assets/v2/src/pages/accounts/index.js b/resources/assets/v2/src/pages/accounts/index.jsindex 422202ee24..80f4b34649 100644--- a/resources/assets/v2/src/pages/accounts/index.js+++ b/resources/assets/v2/src/pages/accounts/index.js@@ -24,8 +24,8 @@ import i18next from "i18next";import {format} from "date-fns";import formatMoney from "../../util/format-money.js";-import Get from "../../api/v2/model/account/get.js";-import Put from "../../api/v2/model/account/put.js";+import Get from "../../api/v1/model/account/get.js";+import Put from "../../api/v1/model/account/put.js";import AccountRenderer from "../../support/renderers/AccountRenderer.js";import {showInternalsButton} from "../../support/page-settings/show-internals-button.js";import {showWizardButton} from "../../support/page-settings/show-wizard-button.js";diff --git a/resources/assets/v2/src/pages/administrations/create.js b/resources/assets/v2/src/pages/administrations/create.jsindex 0def2cdce6..ef0ccd6231 100644--- a/resources/assets/v2/src/pages/administrations/create.js+++ b/resources/assets/v2/src/pages/administrations/create.js@@ -20,7 +20,7 @@import '../../boot/bootstrap.js';import dates from "../shared/dates.js";-import Post from "../../api/v2/model/user-group/post.js";+import Post from "../../api/v1/model/user-group/post.js";import i18next from "i18next";diff --git a/resources/assets/v2/src/pages/administrations/edit.js b/resources/assets/v2/src/pages/administrations/edit.jsindex 1cca799b6f..5237b770cd 100644--- a/resources/assets/v2/src/pages/administrations/edit.js+++ b/resources/assets/v2/src/pages/administrations/edit.js@@ -20,10 +20,10 @@import '../../boot/bootstrap.js';import dates from "../shared/dates.js";-import Post from "../../api/v2/model/user-group/post.js";+import Post from "../../api/v1/model/user-group/post.js";import i18next from "i18next";-import Get from "../../api/v2/model/user-group/get.js";-import Put from "../../api/v2/model/user-group/put.js";+import Get from "../../api/v1/model/user-group/get.js";+import Put from "../../api/v1/model/user-group/put.js";let administrations = function () {diff --git a/resources/assets/v2/src/pages/administrations/index.js b/resources/assets/v2/src/pages/administrations/index.jsindex 40fe046ceb..bae286d55a 100644--- a/resources/assets/v2/src/pages/administrations/index.js+++ b/resources/assets/v2/src/pages/administrations/index.js@@ -23,11 +23,9 @@ import dates from "../shared/dates.js";import i18next from "i18next";import {format} from "date-fns";-import '@ag-grid-community/styles/ag-grid.css';-import '@ag-grid-community/styles/ag-theme-alpine.css';import '../../css/grid-ff3-theme.css';-import Get from "../../api/v2/model/user-group/get.js";-import Post from "../../api/v2/model/user-group/post.js";+import Get from "../../api/v1/model/user-group/get.js";+import Post from "../../api/v1/model/user-group/post.js";let index = function () {return {diff --git a/resources/assets/v2/src/pages/dashboard/accounts.js b/resources/assets/v2/src/pages/dashboard/accounts.jsindex e22da6a86c..c7bb89fea1 100644--- a/resources/assets/v2/src/pages/dashboard/accounts.js+++ b/resources/assets/v2/src/pages/dashboard/accounts.js@@ -20,9 +20,9 @@import {getVariable} from "../../store/get-variable.js";import {setVariable} from "../../store/set-variable.js";-import Dashboard from "../../api/v2/chart/account/dashboard.js";+import Dashboard from "../../api/v1/chart/account/dashboard.js";import formatMoney from "../../util/format-money.js";-import Get from "../../api/v2/model/account/get.js";+import Get from "../../api/v1/model/account/get.js";import {Chart} from 'chart.js';import {getDefaultChartSettings} from "../../support/default-chart-settings.js";import {getCacheKey} from "../../support/get-cache-key.js";diff --git a/resources/assets/v2/src/pages/dashboard/boxes.js b/resources/assets/v2/src/pages/dashboard/boxes.jsindex 1bcc66497a..349610cd3f 100644--- a/resources/assets/v2/src/pages/dashboard/boxes.js+++ b/resources/assets/v2/src/pages/dashboard/boxes.js@@ -18,7 +18,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/-import Summary from "../../api/v2/summary/index.js";+import Summary from "../../api/v1/summary/index.js";import {format} from "date-fns";import {getVariable} from "../../store/get-variable.js";import formatMoney from "../../util/format-money.js";diff --git a/resources/assets/v2/src/pages/dashboard/budgets.js b/resources/assets/v2/src/pages/dashboard/budgets.jsindex fe7dc039af..46bef1ded6 100644--- a/resources/assets/v2/src/pages/dashboard/budgets.js+++ b/resources/assets/v2/src/pages/dashboard/budgets.js@@ -18,7 +18,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/import {getVariable} from "../../store/get-variable.js";-import Dashboard from "../../api/v2/chart/budget/dashboard.js";+import Dashboard from "../../api/v1/chart/budget/dashboard.js";import {getDefaultChartSettings} from "../../support/default-chart-settings.js";import formatMoney from "../../util/format-money.js";import {Chart} from 'chart.js';diff --git a/resources/assets/v2/src/pages/dashboard/categories.js b/resources/assets/v2/src/pages/dashboard/categories.jsindex 8f68e28b38..7b2e0026e7 100644--- a/resources/assets/v2/src/pages/dashboard/categories.js+++ b/resources/assets/v2/src/pages/dashboard/categories.js@@ -18,7 +18,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/import {getVariable} from "../../store/get-variable.js";-import Dashboard from "../../api/v2/chart/category/dashboard.js";+import Dashboard from "../../api/v1/chart/category/dashboard.js";import {getDefaultChartSettings} from "../../support/default-chart-settings.js";import {Chart} from "chart.js";import formatMoney from "../../util/format-money.js";diff --git a/resources/assets/v2/src/pages/dashboard/piggies.js b/resources/assets/v2/src/pages/dashboard/piggies.jsindex 037932f9f2..aa3bdbe6bc 100644--- a/resources/assets/v2/src/pages/dashboard/piggies.js+++ b/resources/assets/v2/src/pages/dashboard/piggies.js@@ -18,7 +18,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/import {getVariable} from "../../store/get-variable.js";-import Get from "../../api/v2/model/piggy-bank/get.js";+import Get from "../../api/v1/model/piggy-bank/get.js";import {getCacheKey} from "../../support/get-cache-key.js";import {format} from "date-fns";import i18next from "i18next";diff --git a/resources/assets/v2/src/pages/dashboard/sankey.js b/resources/assets/v2/src/pages/dashboard/sankey.jsindex 40a73e5aaa..b00fe85c54 100644--- a/resources/assets/v2/src/pages/dashboard/sankey.js+++ b/resources/assets/v2/src/pages/dashboard/sankey.js@@ -18,7 +18,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/import {getVariable} from "../../store/get-variable.js";-import Get from "../../api/v2/model/transaction/get.js";+import Get from "../../api/v1/model/transaction/get.js";import {getDefaultChartSettings} from "../../support/default-chart-settings.js";import {Chart} from 'chart.js';import {Flow, SankeyController} from 'chartjs-chart-sankey';diff --git a/resources/assets/v2/src/pages/dashboard/subscriptions.js b/resources/assets/v2/src/pages/dashboard/subscriptions.jsindex 9cca5c9c7e..475cef637c 100644--- a/resources/assets/v2/src/pages/dashboard/subscriptions.js+++ b/resources/assets/v2/src/pages/dashboard/subscriptions.js@@ -18,7 +18,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/import {getVariable} from "../../store/get-variable.js";-import Get from "../../api/v2/model/subscription/get.js";+import Get from "../../api/v1/model/subscription/get.js";import {format} from "date-fns";import {getCacheKey} from "../../support/get-cache-key.js";import {Chart} from "chart.js";diff --git a/resources/assets/v2/src/pages/transactions/create.js b/resources/assets/v2/src/pages/transactions/create.jsindex 18682d0e98..a876f78e88 100644--- a/resources/assets/v2/src/pages/transactions/create.js+++ b/resources/assets/v2/src/pages/transactions/create.js@@ -23,7 +23,7 @@ import dates from '../../pages/shared/dates.js';import {createEmptySplit, defaultErrorSet} from "./shared/create-empty-split.js";import {parseFromEntries} from "./shared/parse-from-entries.js";import formatMoney from "../../util/format-money.js";-import Post from "../../api/v2/model/transaction/post.js";+import Post from "../../api/v1/model/transaction/post.js";import {loadCurrencies} from "./shared/load-currencies.js";import {loadBudgets} from "./shared/load-budgets.js";import {loadPiggyBanks} from "./shared/load-piggy-banks.js";diff --git a/resources/assets/v2/src/pages/transactions/edit.js b/resources/assets/v2/src/pages/transactions/edit.jsindex 9d3fcc38d7..7698a1b131 100644--- a/resources/assets/v2/src/pages/transactions/edit.js+++ b/resources/assets/v2/src/pages/transactions/edit.js@@ -21,7 +21,7 @@import '../../boot/bootstrap.js';import dates from '../../pages/shared/dates.js';import formatMoney from "../../util/format-money.js";-import Get from "../../api/v2/model/transaction/get.js";+import Get from "../../api/v1/model/transaction/get.js";import {parseDownloadedSplits} from "./shared/parse-downloaded-splits.js";import {addAutocomplete, getUrls} from "./shared/add-autocomplete.js";import {@@ -40,7 +40,7 @@ import Tags from "bootstrap5-tags";import i18next from "i18next";import {defaultErrorSet} from "./shared/create-empty-split.js";import {parseFromEntries} from "./shared/parse-from-entries.js";-import Put from "../../api/v2/model/transaction/put.js";+import Put from "../../api/v1/model/transaction/put.js";import {processAttachments} from "./shared/process-attachments.js";import {spliceErrorsIntoTransactions} from "./shared/splice-errors-into-transactions.js";diff --git a/resources/assets/v2/src/pages/transactions/index.js b/resources/assets/v2/src/pages/transactions/index.jsindex 7b8d3c759d..e9f587b624 100644--- a/resources/assets/v2/src/pages/transactions/index.js+++ b/resources/assets/v2/src/pages/transactions/index.js@@ -24,10 +24,8 @@ import i18next from "i18next";import {format} from "date-fns";import formatMoney from "../../util/format-money.js";-import '@ag-grid-community/styles/ag-grid.css';-import '@ag-grid-community/styles/ag-theme-alpine.css';import '../../css/grid-ff3-theme.css';-import Get from "../../api/v2/model/transaction/get.js";+import Get from "../../api/v1/model/transaction/get.js";let index = function () {return {diff --git a/resources/assets/v2/src/pages/transactions/shared/add-autocomplete.js b/resources/assets/v2/src/pages/transactions/shared/add-autocomplete.jsindex d037448707..c648579df0 100644--- a/resources/assets/v2/src/pages/transactions/shared/add-autocomplete.js+++ b/resources/assets/v2/src/pages/transactions/shared/add-autocomplete.js@@ -22,10 +22,10 @@ import Autocomplete from "bootstrap5-autocomplete";export function getUrls() {return {- description: '/api/v2/autocomplete/transaction-descriptions',- account: '/api/v2/autocomplete/accounts',- category: '/api/v2/autocomplete/categories',- tag: '/api/v2/autocomplete/tags',+ description: '/api/v1/autocomplete/transaction-descriptions',+ account: '/api/v1/autocomplete/accounts',+ category: '/api/v1/autocomplete/categories',+ tag: '/api/v1/autocomplete/tags',}}diff --git a/resources/assets/v2/src/pages/transactions/shared/load-budgets.js b/resources/assets/v2/src/pages/transactions/shared/load-budgets.jsindex 27ba98b582..8416953fc3 100644--- a/resources/assets/v2/src/pages/transactions/shared/load-budgets.js+++ b/resources/assets/v2/src/pages/transactions/shared/load-budgets.js@@ -19,7 +19,7 @@*/-import Get from "../../../api/v2/model/budget/get.js";+import Get from "../../../api/v1/model/budget/get.js";export function loadBudgets() {let params = {diff --git a/resources/assets/v2/src/pages/transactions/shared/load-currencies.js b/resources/assets/v2/src/pages/transactions/shared/load-currencies.jsindex 048baa5701..02497d5a3a 100644--- a/resources/assets/v2/src/pages/transactions/shared/load-currencies.js+++ b/resources/assets/v2/src/pages/transactions/shared/load-currencies.js@@ -19,7 +19,7 @@*/-import Get from "../../../api/v2/model/currency/get.js";+import Get from "../../../api/v1/model/currency/get.js";export function loadCurrencies() {let params = {diff --git a/resources/assets/v2/src/pages/transactions/shared/load-piggy-banks.js b/resources/assets/v2/src/pages/transactions/shared/load-piggy-banks.jsindex 3e32d8afb6..c014345539 100644--- a/resources/assets/v2/src/pages/transactions/shared/load-piggy-banks.js+++ b/resources/assets/v2/src/pages/transactions/shared/load-piggy-banks.js@@ -18,7 +18,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/-import Get from "../../../api/v2/model/piggy-bank/get.js";+import Get from "../../../api/v1/model/piggy-bank/get.js";export function loadPiggyBanks() {let params = {diff --git a/resources/assets/v2/src/pages/transactions/shared/load-subscriptions.js b/resources/assets/v2/src/pages/transactions/shared/load-subscriptions.jsindex 29dea7b13b..a3ecb8b657 100644--- a/resources/assets/v2/src/pages/transactions/shared/load-subscriptions.js+++ b/resources/assets/v2/src/pages/transactions/shared/load-subscriptions.js@@ -18,7 +18,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/-import SubscriptionGet from "../../../api/v2/model/subscription/get.js";+import SubscriptionGet from "../../../api/v1/model/subscription/get.js";export function loadSubscriptions() {let params = {diff --git a/resources/assets/v2/src/pages/transactions/show.js b/resources/assets/v2/src/pages/transactions/show.jsindex 5b24c388c8..ad5a3f55ab 100644--- a/resources/assets/v2/src/pages/transactions/show.js+++ b/resources/assets/v2/src/pages/transactions/show.js@@ -21,7 +21,7 @@import '../../boot/bootstrap.js';import dates from "../shared/dates.js";import i18next from "i18next";-import Get from "../../api/v2/model/transaction/get.js";+import Get from "../../api/v1/model/transaction/get.js";import {parseDownloadedSplits} from "./shared/parse-downloaded-splits.js";import {format} from "date-fns";import formatMoney from "../../util/format-money.js";diff --git a/resources/assets/v2/vite.config.js b/resources/assets/v2/vite.config.jsindex 74c6bde199..f3f18671bb 100644--- a/resources/assets/v2/vite.config.js+++ b/resources/assets/v2/vite.config.js@@ -36,8 +36,8 @@ export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {let https = null;if (command === 'serve') {https = {- key: fs.readFileSync(`/sites/vm/tls-certificates/wildcard.sd.internal.key`),- cert: fs.readFileSync(`/sites/vm/tls-certificates/wildcard.sd.internal.crt`),+ key: fs.readFileSync(`/vagrant/tls-certificates/wildcard.sd.internal.key`),+ cert: fs.readFileSync(`/vagrant/tls-certificates/wildcard.sd.internal.crt`),};}@@ -82,11 +82,13 @@ export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {server: {- origin: 'http://127.0.0.1:8000',+ cors: true,+ origin: 'https://firefly.sd.internal:5173',watch: {usePolling: true,},- host: '10.0.0.15',+ port: 5173,+ host: true,// hmr: {// protocol: 'wss',// },