Get v2 up and running (sort of)

This commit is contained in:
James Cole
2025-03-23 09:05:06 +01:00
parent a4e1c8c24f
commit a3fcd636e7
33 changed files with 327 additions and 109 deletions

71
package-lock.json generated
View File

@@ -13,42 +13,6 @@
"postcss": "^8.4.47" "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": { "node_modules/@ampproject/remapping": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
@@ -3643,12 +3607,6 @@
"integrity": "sha512-q2VoAOu1DtZ7z41M2gQ05VMNYkFCAMxFU+j/HUMwCOlr/e3VhO+qww2SGJw4OxBw5nZQ7YV78+wK2RiB7ConzQ==", "integrity": "sha512-q2VoAOu1DtZ7z41M2gQ05VMNYkFCAMxFU+j/HUMwCOlr/e3VhO+qww2SGJw4OxBw5nZQ7YV78+wK2RiB7ConzQ==",
"license": "MIT" "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": { "node_modules/ajv": {
"version": "6.12.6", "version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@@ -4448,9 +4406,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001706", "version": "1.0.30001707",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001706.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001707.tgz",
"integrity": "sha512-3ZczoTApMAZwPKYWmwVbQMFpXBDds3/0VciVoUwPUbldlYyVLmRVuRs/PcUZtHpbLRpzzDvrvnFuREsGt6lUug==", "integrity": "sha512-3qtRjw/HQSMlDWf+X79N206fepf4SOOU6SQLMaq/0KkZLmSjPxAkBOQQ+FxbHKfHmYLZFfdWsO3KA90ceHPSnw==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -11094,6 +11052,7 @@
"version": "2.8.1", "version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"dev": true,
"license": "0BSD" "license": "0BSD"
}, },
"node_modules/tty-browserify": { "node_modules/tty-browserify": {
@@ -12276,18 +12235,14 @@
"resources/assets/v2": { "resources/assets/v2": {
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "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", "@fortawesome/fontawesome-free": "^6.4.0",
"@popperjs/core": "^2.11.8", "@popperjs/core": "^2.11.8",
"admin-lte": "^4.0.0-alpha3", "admin-lte": "^4.0.0-beta3",
"alpinejs": "^3.13.7", "alpinejs": "^3.13.7",
"bootstrap": "^5.3.0", "bootstrap": "^5",
"bootstrap5-autocomplete": "^1.1.22", "bootstrap5-autocomplete": "^1",
"bootstrap5-tags": "^1.7", "bootstrap5-tags": "^1",
"chart.js": "^4.4.0", "chart.js": "^4",
"chartjs-adapter-date-fns": "^3.0.0", "chartjs-adapter-date-fns": "^3.0.0",
"chartjs-chart-sankey": "^0.14.0", "chartjs-chart-sankey": "^0.14.0",
"date-fns": "^4.0.0", "date-fns": "^4.0.0",
@@ -12299,10 +12254,10 @@
"store": "^2.0.12" "store": "^2.0.12"
}, },
"devDependencies": { "devDependencies": {
"axios": "^1.8.2", "axios": "^1",
"laravel-vite-plugin": "^1.0.5", "laravel-vite-plugin": "^1",
"patch-package": "^8.0.0", "patch-package": "^8",
"sass": "^1.78.0", "sass": "^1",
"vite": "^6", "vite": "^6",
"vite-plugin-manifest-sri": "^0.2.0" "vite-plugin-manifest-sri": "^0.2.0"
} }

View File

@@ -8,26 +8,22 @@
"postinstall": "patch-package --error-on-fail" "postinstall": "patch-package --error-on-fail"
}, },
"devDependencies": { "devDependencies": {
"axios": "^1.8.2", "axios": "^1",
"laravel-vite-plugin": "^1.0.5", "laravel-vite-plugin": "^1",
"patch-package": "^8.0.0", "patch-package": "^8",
"sass": "^1.78.0", "sass": "^1",
"vite": "^6", "vite": "^6",
"vite-plugin-manifest-sri": "^0.2.0" "vite-plugin-manifest-sri": "^0.2.0"
}, },
"dependencies": { "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", "@fortawesome/fontawesome-free": "^6.4.0",
"@popperjs/core": "^2.11.8", "@popperjs/core": "^2.11.8",
"admin-lte": "^4.0.0-alpha3", "admin-lte": "^4.0.0-beta3",
"alpinejs": "^3.13.7", "alpinejs": "^3.13.7",
"bootstrap": "^5.3.0", "bootstrap": "^5",
"bootstrap5-autocomplete": "^1.1.22", "bootstrap5-autocomplete": "^1",
"bootstrap5-tags": "^1.7", "bootstrap5-tags": "^1",
"chart.js": "^4.4.0", "chart.js": "^4",
"chartjs-adapter-date-fns": "^3.0.0", "chartjs-adapter-date-fns": "^3.0.0",
"chartjs-chart-sankey": "^0.14.0", "chartjs-chart-sankey": "^0.14.0",
"date-fns": "^4.0.0", "date-fns": "^4.0.0",

View File

@@ -0,0 +1,36 @@
/*
* overview.js
* Copyright (c) 2022 james@firefly-iii.org
*
* 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}});
}
}

View File

@@ -0,0 +1,30 @@
/*
* overview.js
* Copyright (c) 2022 james@firefly-iii.org
*
* 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}});
}
}

View File

@@ -0,0 +1,30 @@
/*
* overview.js
* Copyright (c) 2022 james@firefly-iii.org
*
* 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}});
}
}

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * 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"; import format from "date-fns/format";
export default class Get { export default class Get {

View File

@@ -0,0 +1,35 @@
/*
* get.js
* Copyright (c) 2023 james@firefly-iii.org
*
* 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});
}
}

View File

@@ -0,0 +1,42 @@
/*
* get.js
* Copyright (c) 2023 james@firefly-iii.org
*
* 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});
}
}

View File

@@ -0,0 +1,40 @@
/*
* get.js
* Copyright (c) 2023 james@firefly-iii.org
*
* 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});
}
}

View File

@@ -0,0 +1,28 @@
/*
* post.js
* Copyright (c) 2023 james@firefly-iii.org
*
* 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);
}
}

View File

@@ -0,0 +1,28 @@
/*
* post.js
* Copyright (c) 2023 james@firefly-iii.org
*
* 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);
}
}

View File

@@ -24,8 +24,8 @@ import i18next from "i18next";
import {format} from "date-fns"; import {format} from "date-fns";
import formatMoney from "../../util/format-money.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 Put from "../../api/v2/model/account/put.js"; import Put from "../../api/v1/model/account/put.js";
import AccountRenderer from "../../support/renderers/AccountRenderer.js"; import AccountRenderer from "../../support/renderers/AccountRenderer.js";
import {showInternalsButton} from "../../support/page-settings/show-internals-button.js"; import {showInternalsButton} from "../../support/page-settings/show-internals-button.js";
import {showWizardButton} from "../../support/page-settings/show-wizard-button.js"; import {showWizardButton} from "../../support/page-settings/show-wizard-button.js";

View File

@@ -20,7 +20,7 @@
import '../../boot/bootstrap.js'; import '../../boot/bootstrap.js';
import dates from "../shared/dates.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 i18next from "i18next";

View File

@@ -20,10 +20,10 @@
import '../../boot/bootstrap.js'; import '../../boot/bootstrap.js';
import dates from "../shared/dates.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 i18next from "i18next";
import Get from "../../api/v2/model/user-group/get.js"; import Get from "../../api/v1/model/user-group/get.js";
import Put from "../../api/v2/model/user-group/put.js"; import Put from "../../api/v1/model/user-group/put.js";
let administrations = function () { let administrations = function () {

View File

@@ -23,11 +23,9 @@ import dates from "../shared/dates.js";
import i18next from "i18next"; import i18next from "i18next";
import {format} from "date-fns"; 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 '../../css/grid-ff3-theme.css';
import Get from "../../api/v2/model/user-group/get.js"; import Get from "../../api/v1/model/user-group/get.js";
import Post from "../../api/v2/model/user-group/post.js"; import Post from "../../api/v1/model/user-group/post.js";
let index = function () { let index = function () {
return { return {

View File

@@ -20,9 +20,9 @@
import {getVariable} from "../../store/get-variable.js"; import {getVariable} from "../../store/get-variable.js";
import {setVariable} from "../../store/set-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 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 {Chart} from 'chart.js';
import {getDefaultChartSettings} from "../../support/default-chart-settings.js"; import {getDefaultChartSettings} from "../../support/default-chart-settings.js";
import {getCacheKey} from "../../support/get-cache-key.js"; import {getCacheKey} from "../../support/get-cache-key.js";

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * 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 {format} from "date-fns";
import {getVariable} from "../../store/get-variable.js"; import {getVariable} from "../../store/get-variable.js";
import formatMoney from "../../util/format-money.js"; import formatMoney from "../../util/format-money.js";

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import {getVariable} from "../../store/get-variable.js"; 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 {getDefaultChartSettings} from "../../support/default-chart-settings.js";
import formatMoney from "../../util/format-money.js"; import formatMoney from "../../util/format-money.js";
import {Chart} from 'chart.js'; import {Chart} from 'chart.js';

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import {getVariable} from "../../store/get-variable.js"; 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 {getDefaultChartSettings} from "../../support/default-chart-settings.js";
import {Chart} from "chart.js"; import {Chart} from "chart.js";
import formatMoney from "../../util/format-money.js"; import formatMoney from "../../util/format-money.js";

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import {getVariable} from "../../store/get-variable.js"; 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 {getCacheKey} from "../../support/get-cache-key.js";
import {format} from "date-fns"; import {format} from "date-fns";
import i18next from "i18next"; import i18next from "i18next";

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import {getVariable} from "../../store/get-variable.js"; 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 {getDefaultChartSettings} from "../../support/default-chart-settings.js";
import {Chart} from 'chart.js'; import {Chart} from 'chart.js';
import {Flow, SankeyController} from 'chartjs-chart-sankey'; import {Flow, SankeyController} from 'chartjs-chart-sankey';

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import {getVariable} from "../../store/get-variable.js"; 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 {format} from "date-fns";
import {getCacheKey} from "../../support/get-cache-key.js"; import {getCacheKey} from "../../support/get-cache-key.js";
import {Chart} from "chart.js"; import {Chart} from "chart.js";

View File

@@ -23,7 +23,7 @@ import dates from '../../pages/shared/dates.js';
import {createEmptySplit, defaultErrorSet} from "./shared/create-empty-split.js"; import {createEmptySplit, defaultErrorSet} from "./shared/create-empty-split.js";
import {parseFromEntries} from "./shared/parse-from-entries.js"; import {parseFromEntries} from "./shared/parse-from-entries.js";
import formatMoney from "../../util/format-money.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 {loadCurrencies} from "./shared/load-currencies.js";
import {loadBudgets} from "./shared/load-budgets.js"; import {loadBudgets} from "./shared/load-budgets.js";
import {loadPiggyBanks} from "./shared/load-piggy-banks.js"; import {loadPiggyBanks} from "./shared/load-piggy-banks.js";

View File

@@ -21,7 +21,7 @@
import '../../boot/bootstrap.js'; import '../../boot/bootstrap.js';
import dates from '../../pages/shared/dates.js'; import dates from '../../pages/shared/dates.js';
import formatMoney from "../../util/format-money.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 {parseDownloadedSplits} from "./shared/parse-downloaded-splits.js";
import {addAutocomplete, getUrls} from "./shared/add-autocomplete.js"; import {addAutocomplete, getUrls} from "./shared/add-autocomplete.js";
import { import {
@@ -40,7 +40,7 @@ import Tags from "bootstrap5-tags";
import i18next from "i18next"; import i18next from "i18next";
import {defaultErrorSet} from "./shared/create-empty-split.js"; import {defaultErrorSet} from "./shared/create-empty-split.js";
import {parseFromEntries} from "./shared/parse-from-entries.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 {processAttachments} from "./shared/process-attachments.js";
import {spliceErrorsIntoTransactions} from "./shared/splice-errors-into-transactions.js"; import {spliceErrorsIntoTransactions} from "./shared/splice-errors-into-transactions.js";

View File

@@ -24,10 +24,8 @@ import i18next from "i18next";
import {format} from "date-fns"; import {format} from "date-fns";
import formatMoney from "../../util/format-money.js"; 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 '../../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 () { let index = function () {
return { return {

View File

@@ -22,10 +22,10 @@ import Autocomplete from "bootstrap5-autocomplete";
export function getUrls() { export function getUrls() {
return { return {
description: '/api/v2/autocomplete/transaction-descriptions', description: '/api/v1/autocomplete/transaction-descriptions',
account: '/api/v2/autocomplete/accounts', account: '/api/v1/autocomplete/accounts',
category: '/api/v2/autocomplete/categories', category: '/api/v1/autocomplete/categories',
tag: '/api/v2/autocomplete/tags', tag: '/api/v1/autocomplete/tags',
} }
} }

View File

@@ -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() { export function loadBudgets() {
let params = { let params = {

View File

@@ -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() { export function loadCurrencies() {
let params = { let params = {

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * 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() { export function loadPiggyBanks() {
let params = { let params = {

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * 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() { export function loadSubscriptions() {
let params = { let params = {

View File

@@ -21,7 +21,7 @@
import '../../boot/bootstrap.js'; import '../../boot/bootstrap.js';
import dates from "../shared/dates.js"; import dates from "../shared/dates.js";
import i18next from "i18next"; 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 {parseDownloadedSplits} from "./shared/parse-downloaded-splits.js";
import {format} from "date-fns"; import {format} from "date-fns";
import formatMoney from "../../util/format-money.js"; import formatMoney from "../../util/format-money.js";

View File

@@ -36,8 +36,8 @@ export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {
let https = null; let https = null;
if (command === 'serve') { if (command === 'serve') {
https = { https = {
key: fs.readFileSync(`/sites/vm/tls-certificates/wildcard.sd.internal.key`), key: fs.readFileSync(`/vagrant/tls-certificates/wildcard.sd.internal.key`),
cert: fs.readFileSync(`/sites/vm/tls-certificates/wildcard.sd.internal.crt`), cert: fs.readFileSync(`/vagrant/tls-certificates/wildcard.sd.internal.crt`),
}; };
} }
@@ -82,11 +82,13 @@ export default defineConfig(({command, mode, isSsrBuild, isPreview}) => {
server: { server: {
origin: 'http://127.0.0.1:8000', cors: true,
origin: 'https://firefly.sd.internal:5173',
watch: { watch: {
usePolling: true, usePolling: true,
}, },
host: '10.0.0.15', port: 5173,
host: true,
// hmr: { // hmr: {
// protocol: 'wss', // protocol: 'wss',
// }, // },