fixed sample arrival and date

This commit is contained in:
2026-07-23 16:00:26 +02:00
parent 33615f65d7
commit 71d6fe1d98
+9 -1
View File
@@ -1296,7 +1296,7 @@
}
// Precalcola le coppie come col.key (sourceKey → targetKey)
const AUTO_COPY_KEY_PAIRS = AUTO_COPY_FIELD_PAIRS.map((p) => ({
var AUTO_COPY_KEY_PAIRS = AUTO_COPY_FIELD_PAIRS.map((p) => ({
fromKey: colKeyByFieldId(p.from),
toKey: colKeyByFieldId(p.to),
})).filter((p) => p.fromKey && p.toKey);
@@ -1571,6 +1571,10 @@
}
if (col && (col.type === "detail" || col.type === "main_field")) {
const autoPair = AUTO_COPY_KEY_PAIRS.find(
(p) => p.fromKey === String(col.key),
);
data.forEach((row) => {
if (
window.isTargetGridId &&
@@ -1580,6 +1584,10 @@
if (!row.details) row.details = {};
row.details[col.key] = value;
if (autoPair) {
row.details[autoPair.toKey] = value;
}
if (col.type === "main_field") {
row.mainFieldValue = value;
}