feat(arbre): « Position dans l'arbre » en relecture des contributions

Une contribution qui déplace une personne affiche désormais la ligne
« Position dans l'arbre » (Déplacée, Replacée automatiquement), sans
coordonnées brutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
IliesAllaliandClaude Opus 5.5 committed 2026-10-16 18:13:23 +02:00
1 parent de897070db
commit 697c0e3897
2 files changed
+8 -1

No files matched your search

@@ -5,6 +5,7 @@ import { persons as treePersons } from '../data/mockData'
import { Check, ChevronDown, Copy, RefreshCw, X } from 'lucide-react'
import './SettingsPanels.css'
import PzBusy from './PzBusy.jsx'
import { describePositionChange } from './galaxy/layoutPositions.js'
import { HELP_URL } from '../utils/siteLinks.js'
import { t, dateLocale } from '../i18n/index.js'
@@ -130,7 +131,7 @@ function getFieldRows(change) {
if (!after || typeof after !== 'object') return []
const before = (change.beforeJson && typeof change.beforeJson === 'object') ? change.beforeJson : null
return Object.entries(after)
const rows = Object.entries(after)
.filter(([key]) => PERSON_FIELD_LABELS[key])
.map(([key, newVal]) => ({
key,
@@ -142,6 +143,8 @@ function getFieldRows(change) {
if (oldVal !== undefined) return true
return newVal !== null && newVal !== undefined && newVal !== ''
})
const layoutRow = describePositionChange(before, after)
return layoutRow ? [...rows, layoutRow] : rows
}
function getAnnotationPreview(change, treeId) {
+4
View File
@@ -32,6 +32,10 @@ export default {
'Date de décès': 'Date of death',
'Lieu de naissance': 'Birthplace',
'Métier': 'Occupation',
"Position dans l'arbre": "Position in the tree",
'Déplacée': 'Moved',
'Replacée automatiquement': 'Placed automatically again',
'Automatique': 'Automatic',
'Nationalité': 'Nationality',
'Région': 'Region',
'Notes': 'Notes',