Open unclebay143 opened 1 month ago
Created this code example for you: https://code.balkan.app/familytree-js/ate-of-marriage#JS
Created this code example for you: https://code.balkan.app/familytree-js/ate-of-marriage#JS
thanks @ZornitsaPesheva, this is useful for rendering. However, what I'm requesting is adding the date in the generated family js and handling for multiple partners.
my thought:
[
{ id: 1, pids: [3], name: 'Amber McKenzie', gender: 'female', weddingDate: { pid: 3, date: '01.01.1999' } },
{ id: 2, pids: [3], name: 'Janet', gender: 'female', weddingDate: { pid: 3, date: '25.12.2001' } },
{
id: 3,
pids: [1, 2],
name: 'Ava Field',
gender: 'male',
weddingDate: { pid: 1, date: '01.01.1999', pid: 2, date: '25.12.2001' },
},
];
Does something like this exist? Or how would you approach this?
Thanks
What if 1 and 2 have more partners? How the data will look then?
What if 1 and 2 have more partners? How the data will look then?
Shoot! Should be an array of objects
i.e weddingDates: [{ pid: 1, date: '01.01.1999'}, {pid: 2, date: '25.12.2001' }],
[
{ id: 1, pids: [3], name: 'Amber McKenzie', gender: 'female', weddingDates: [{ pid: 3, date: '01.01.1999' }] },
{ id: 2, pids: [3], name: 'Janet', gender: 'female', weddingDates: [{ pid: 3, date: '25.12.2001' }] },
{
id: 3,
pids: [1, 2],
name: 'Ava Field',
gender: 'male',
weddingDates: [{ pid: 1, date: '01.01.1999'}, {pid: 2, date: '25.12.2001' }],
},
];
Also thinking how to avoid partners having different wedding dates at some point. We can always search for the other partner and update the dates when either of the partners are updated.
wdyt?
I have created this example. but it is not perfect for sure: https://code.balkan.app/familytree-js/date-of-marriage#JS
Oh shoot! Thought I hit the comment button!
This looks great.... This can be improved for sure if needed, it's a good start.
Is it possible to somehow add the date of marriage between partners?