This commit is contained in:
freedakgmail
2025-11-23 17:10:10 +08:00
parent d7bb86375d
commit 9cdd751a56
25 changed files with 900 additions and 309 deletions
+7 -1
View File
@@ -21,10 +21,11 @@ export default function NewMemberPage() {
const fatherId = searchParams.get('fatherId')
const motherId = searchParams.get('motherId')
const spouseId = searchParams.get('spouseId')
const childId = searchParams.get('childId')
const generation = searchParams.get('generation')
const gender = searchParams.get('gender')
if (!fatherId && !motherId && !spouseId && !generation && !gender) return undefined
if (!fatherId && !motherId && !spouseId && !childId && !generation && !gender) return undefined
const data: Partial<FamilyMember> = {}
@@ -52,6 +53,11 @@ export default function NewMemberPage() {
data.spouseIds = [spouseId]
}
// 处理子女信息(添加父母时使用)
if (childId) {
data.childrenIds = [childId]
}
// 处理世代
if (generation) {
data.generation = parseInt(generation)