merge: stack widget modernization on dnd kit

This commit is contained in:
Thomas Camlong committed 2026-08-08 20:40:26 +02:00
commit 9edeba5cd2
940 files changed
+104475 -33649

No files matched your search

+7 -4
View File
@@ -1,4 +1,4 @@
/* eslint-disable import/namespace -- Schema tables are selected by validated typed keys. */
/* eslint-disable import/namespace -- Schema tables are intentionally selected by typed runtime keys. */
import type { InferInsertModel } from "drizzle-orm";
import { objectEntries } from "@homarr/common";
@@ -36,8 +36,10 @@ export const createDbInsertCollectionForTransaction = <TTableKey extends TableKe
db.transaction((transaction) => {
for (const [key, values] of objectEntries(context)) {
if (values.length >= 1) {
// oxlint-disable-next-line import/namespace -- TableKey limits key to exported schema tables.
const table = schema[key];
transaction
.insert(schema[key])
.insert(table)
.values(values as never)
.run();
}
@@ -51,14 +53,15 @@ export const createDbInsertCollectionForTransaction = <TTableKey extends TableKe
for (const [key, values] of objectEntries(context)) {
if (values.length >= 1) {
// Below is actually the mysqlSchema when the driver is mysql
await transaction.insert(schema[key] as never).values(values as never);
// oxlint-disable-next-line import/namespace -- TableKey limits key to exported schema tables.
const table = schema[key] as never;
await transaction.insert(table).values(values as never);
}
}
});
},
};
};
export const createDbInsertCollectionWithoutTransaction = <TTableKey extends TableKey>(
tablesInInsertOrder: TTableKey[],
) => {