Merge remote-tracking branch 'origin/main' into feat/propositions-fantomes

# Conflicts:
#	CHANGELOG.md
#	frontend/src/App.jsx
This commit is contained in:
IliesAllali committed 2026-10-25 22:38:47 +01:00
commit 4829fd77f4
5 files changed
+30 -6

No files matched your search

+2
View File
@@ -18,6 +18,7 @@ Notable changes to Parenthèse. Dates are in YYYY-MM-DD format.
### Adding relatives from a profile
- "Someone elsewhere": relatives can add a person found in public records too. It goes into their changes and the tree manager reviews it, like any other proposal. Places, the "needs checking" mark and the source link now travel with a proposed new person.
- In a profile's Links tab, searching for a parent, child or partner who is not in the tree yet now offers "Create …", which opens the add panel already filled in.
- Profiles have a Siblings section, with "Add a sibling".
- The Info tab has quick buttons to add a parent, partner, child or sibling without going into edit mode first.
@@ -26,6 +27,7 @@ Notable changes to Parenthèse. Dates are in YYYY-MM-DD format.
### Fixes
- The "needs checking" mark sits on the corner of the portrait, half outside, so it no longer covers the face.
- "Update the tree" no longer clears your changes when part of them fails to save: what failed stays in your edits, with a message.
- A suggestion already reviewed elsewhere (another tab, a co-manager) now says so, instead of a message about emails, and the tree updates.
- After the family sends their changes, the tree reloads: a photo just sent no longer looks accepted.
+20 -3
View File
@@ -257,6 +257,11 @@ function buildContributionChangesFromDraft(draft = {}) {
birthDate: person.birthDate || null,
deathDate: person.deathDate || null,
isDeceased: !person.deathDate && Boolean(person.isDeceased),
// Personne venue d'une source publique (panneau « Chercher quelqu'un ») : lieux, « à vérifier » et source
...(person.birthPlace ? { birthPlace: person.birthPlace } : {}),
...(person.deathPlace ? { deathPlace: person.deathPlace } : {}),
...(person.toVerify ? { toVerify: true } : {}),
...(person.notes ? { notes: person.notes } : {}),
},
})
@@ -1277,6 +1282,10 @@ function App() {
birthDate: formData.birthDate || null,
deathDate: formData.deathDate || null,
isDeceased: Boolean(formData.isDeceased),
birthPlace: formData.birthPlace || null,
deathPlace: formData.deathPlace || null,
toVerify: Boolean(formData.toVerify),
notes: formData.notes || null,
relations: (formData.relations || []).map((rel) => ({ type: rel.type, personId: rel.personId, adopted: Boolean(rel.adopted) })),
siblingParentLinks,
},
@@ -1288,7 +1297,7 @@ function App() {
// seule façon de montrer qu'un ajout invisible comptait.
setAddPersonPanelVisible(false)
setDraftNotice(t("{name} est sur l'arbre, en brouillon. Envoyez quand vous avez fini.", { name: [formData.firstName, formData.lastName].filter(Boolean).join(' ') || t('Nouvelle personne') }))
return
return { proposed: true }
}
if (!auth.userAuth.token) return
@@ -3510,8 +3519,16 @@ function App() {
treeId={tree.treeContext.treeId}
token={tree.treeContext.accessToken || auth.userAuth.token}
persons={persons}
canApply={tree.canEditCurrentTree}
onApply={handlePersonSave}
// La famille ajoute aussi, en proposition que le propriétaire valide (même envoi qu'« Ajouter quelqu'un »)
canApply={tree.canEditCurrentTree || tree.canSubmitContribution}
proposes={!tree.canEditCurrentTree}
onApply={async (personId, changes) => {
await handlePersonSave(personId, changes)
if (tree.canEditCurrentTree) return
setContribSubmitError('')
setContribChanges(buildContribChangesList(editMode.restoreDraft()))
setShowContribModal(true)
}}
onCreate={handleAddPersonSubmit}
createError={addPersonError}
onClose={() => setSearchPanelVisible(false)}
@@ -106,7 +106,8 @@ const RELATION_LABELS = {
const plain = (value) => String(value || '').normalize('NFD').replace(/\p{Diacritic}/gu, '').toLowerCase().trim()
function SearchSourcesPanel({ visible, treeId, token, persons = [], canApply = false, onApply, onCreate, createError = '', onClose }) {
// proposes : la famille ajoute en proposition, le propriétaire de l'arbre valide ensuite
function SearchSourcesPanel({ visible, treeId, token, persons = [], canApply = false, proposes = false, onApply, onCreate, createError = '', onClose }) {
const [lastName, setLastName] = useState('')
const [firstName, setFirstName] = useState('')
const [birthYear, setBirthYear] = useState('')
@@ -353,7 +354,9 @@ function SearchSourcesPanel({ visible, treeId, token, persons = [], canApply = f
</div>
{applied[key] && (
<p className="sp-result-applied">
{applied[key].created ? t("{name} est dans l'arbre, à vérifier", { name: applied[key].name }) : t('Ajouté à {name}, à vérifier', { name: applied[key].name })}
{proposes
? t('Proposé, le propriétaire de l’arbre validera')
: applied[key].created ? t("{name} est dans l'arbre, à vérifier", { name: applied[key].name }) : t('Ajouté à {name}, à vérifier', { name: applied[key].name })}
</p>
)}
{isPicking && (
+2 -1
View File
@@ -949,7 +949,8 @@ export function drawPortrait(ctx, frameType, person, img, withMark) {
function drawToVerifyMark(ctx) {
const r = 9
const x = PERSON_R * 0.74, y = -PERSON_R * 0.74
// À cheval sur le coin, à moitié dehors : la marque ne cache plus le visage (Patch, 25/10)
const x = PERSON_R * 0.92, y = -PERSON_R * 0.92
ctx.shadowColor = 'transparent'
ctx.fillStyle = '#FFFFFF'
ctx.beginPath()
+1
View File
@@ -44,6 +44,7 @@ export default {
'né(e) vers {year}': 'born around {year}',
'Modifier': 'Edit',
'Nouvelle personne': 'New person',
'Proposé, le propriétaire de l’arbre validera': 'Proposed, the tree owner will review it',
"Déjà dans l'arbre": 'Already in the tree',
"{name} est dans l'arbre, à vérifier": '{name} is in the tree, needs checking',
'Créer {name}': 'Create {name}',