Logbuch Überarbeitung
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 29s
Build and Push Docker Images / build-frontend (push) Successful in 16s

This commit is contained in:
2026-02-15 20:43:01 +01:00
parent cb4917c536
commit db4e9612a0
4 changed files with 259 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
import {diffTranslations} from "./diffTranslations";
import {diffTranslations, getDiffLabel} from "./diffTranslations";
export type DiffChange = {
key: string;
@@ -43,8 +43,6 @@ export function diffObjects(
const oldVal = obj1?.[key];
const newVal = obj2?.[key];
console.log(oldVal, key, newVal);
// Wenn beides null/undefined → ignorieren
if (
(oldVal === null || oldVal === undefined || oldVal === "" || JSON.stringify(oldVal) === "[]") &&
@@ -72,12 +70,11 @@ export function diffObjects(
if (type === "unchanged") continue;
const translation = diffTranslations[key];
let label = key;
let label = getDiffLabel(key);
let resolvedOld = oldVal;
let resolvedNew = newVal;
if (translation) {
label = translation.label;
if (translation.resolve) {
const { oldVal: resOld, newVal: resNew } = translation.resolve(
oldVal,
@@ -100,4 +97,4 @@ export function diffObjects(
}
return diffs;
}
}