🤖 Auto commit for release 'develop' on 2026-10-11

This commit is contained in:
JC5 committed 2026-10-11 21:07:51 +02:00
1 parent 0088ddee79
commit 4dec72a2ed
17 files changed
+61 -84

No files matched your search

+18 -7
View File
@@ -22,14 +22,21 @@ import "../../boot/bootstrap.js";
import sidebar from "../shared/sidebar.js";
import dates from "../shared/dates.js";
import Alpine from "@alpinejs/csp";
import {getVariable} from "../../store/get-variable.js";
import { getVariable } from "../../store/get-variable.js";
import Put from "../../api/model/account/put.js";
import Get from "../../api/model/account/get.js";
import formatDate from "../../util/format-date.js";
import formatMoney from "../../util/format-money.js";
import i18next from "i18next";
import {addDrag} from "../shared/drag-and-droppable-rows.js";
import {initFromLocalStorage, initFromQueryParams, sortableTable, storeFilterAndSort, updateHistory, respondToSortChange} from "../shared/sortable-tables.js";
import { addDrag } from "../shared/drag-and-droppable-rows.js";
import {
initFromLocalStorage,
initFromQueryParams,
sortableTable,
storeFilterAndSort,
updateHistory,
respondToSortChange,
} from "../shared/sortable-tables.js";
window.enableDates = true;
@@ -84,7 +91,8 @@ let index = function () {
const address = window.location.href.split("?")[0].split("/");
this.objectType = address[address.length - 1].substring(0, 15);
this.storageKey = "accounts-" + this.objectType + (this.active ? "-active" : "-inactive");
this.defaultSortColumn = "expense" === this.objectType || "revenue" === this.objectType ? "name" : this.defaultSortColumn;
this.defaultSortColumn =
"expense" === this.objectType || "revenue" === this.objectType ? "name" : this.defaultSortColumn;
this.i18next = i18next;
this.anonymous = window.store.get("anonymous");
this.pageNavUrl = "./accounts/" + this.objectType;
@@ -113,7 +121,7 @@ let index = function () {
let item = e.detail[i];
if (item.order !== item.currentOrder) {
// PUT new order to system.
new Put().put({order: item.order}, {id: item.id});
new Put().put({ order: item.order }, { id: item.id });
// save new order as current order in the row.
document
@@ -158,7 +166,10 @@ let index = function () {
},
downloadObjects() {
this.sortableTable.loadingNewSort = true;
let sort = "asc" === this.sortableTable.sortDirection ? this.sortableTable.sortColumn : "-" + this.sortableTable.sortColumn;
let sort =
"asc" === this.sortableTable.sortDirection
? this.sortableTable.sortColumn
: "-" + this.sortableTable.sortColumn;
let start = window.store.get("start");
let end = window.store.get("end");
this.convertToPrimary = window.store.get("convert_to_primary");
@@ -205,7 +216,7 @@ let index = function () {
}
let lastActivity = formatDate(
current.attributes.last_activity,
i18next.t("config.date_time_fns_short", {lng: locale}),
i18next.t("config.date_time_fns_short", { lng: locale }),
locale,
);
@@ -25,7 +25,14 @@ import Alpine from "@alpinejs/csp";
import formatMoney from "../../util/format-money.js";
import formatDate from "../../util/format-date.js";
import i18next from "i18next";
import {initFromLocalStorage, initFromQueryParams, sortableTable, storeFilterAndSort, updateHistory, respondToSortChange} from "../shared/sortable-tables.js";
import {
initFromLocalStorage,
initFromQueryParams,
sortableTable,
storeFilterAndSort,
updateHistory,
respondToSortChange,
} from "../shared/sortable-tables.js";
import Get from "../../api/model/category/get.js";
window.enableDates = false;
@@ -85,7 +92,10 @@ let index = function () {
},
downloadObjects() {
this.sortableTable.loadingNewSort = true;
let sort = "asc" === this.sortableTable.sortDirection ? this.sortableTable.sortColumn : "-" + this.sortableTable.sortColumn;
let sort =
"asc" === this.sortableTable.sortDirection
? this.sortableTable.sortColumn
: "-" + this.sortableTable.sortColumn;
this.convertToPrimary = window.store.get("convert_to_primary");
let locale = window.store.get("locale");
new Get()
@@ -66,7 +66,9 @@ export class sortableTable {
// we do this in the parent because Alpine has the watch function that is needed.
this.parent.$watch("filter." + column, (newValue, oldValue) => {
console.log('filter for column "' + column + '" changed from "' + oldValue + '" to "' + newValue + '"',);
console.log(
'filter for column "' + column + '" changed from "' + oldValue + '" to "' + newValue + '"',
);
this.fireSortChangeEvent();
if ("" !== newValue) {
showSearchBox(th);
@@ -234,7 +236,8 @@ export class sortableTable {
}
updateHeaderClasses() {
document.querySelectorAll('table[data-sort-identifier="' + this.tableId + '"] thead th[data-sort-column]')
document
.querySelectorAll('table[data-sort-identifier="' + this.tableId + '"] thead th[data-sort-column]')
.forEach((th) => {
if (this.sortColumn === th.dataset.sortColumn) {
th.classList.add("sortable_sorted");