Merge pull request #150 from IliesAllali/fix/badge-a-verifier

Chercher quelqu'un : la famille ajoute en proposition ; marque « à vérifier » sur le coin
This commit is contained in:
IliesAllali authored and GitHub committed 2026-10-25 20:06:10 +01:00
commit 0feb6c55ab
5 files changed
+33 -6

No files matched your search

+5
View File
@@ -2,6 +2,11 @@
Notable changes to Parenthèse. Dates are in YYYY-MM-DD format.
## Unreleased
- "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.
- The "needs checking" mark sits on the corner of the portrait, half outside, so it no longer covers the face.
## 1.5.0 (2026-10-25)
### Several managers for one tree
+20 -3
View File
@@ -254,6 +254,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 } : {}),
},
})
@@ -1194,6 +1199,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,
},
@@ -1206,7 +1215,7 @@ function App() {
setContribSubmitError('')
setContribChanges(buildContribChangesList(editMode.restoreDraft()))
setShowContribModal(true)
return
return { proposed: true }
}
if (!auth.userAuth.token) return
@@ -3376,8 +3385,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
@@ -941,7 +941,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}',