mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
household member editor: do not add in new members if the member is included in the members of household
This commit is contained in:
parent
f2c724726a
commit
159dba0dc3
@ -224,18 +224,21 @@ const store = createStore({
|
|||||||
}
|
}
|
||||||
|
|
||||||
state.concerned.forEach((c, index) => {
|
state.concerned.forEach((c, index) => {
|
||||||
let m = {
|
if (!(h.members.map((m) => m.person.id)).includes(c.person.id)) {
|
||||||
id: index * -1,
|
let m = {
|
||||||
person: c.person,
|
id: index * -1,
|
||||||
holder: c.holder,
|
person: c.person,
|
||||||
position: c.position,
|
holder: c.holder,
|
||||||
};
|
position: c.position,
|
||||||
if (c.position === null) {
|
};
|
||||||
m.position = {
|
if (c.position === null) {
|
||||||
ordering: 999999
|
m.position = {
|
||||||
|
ordering: 999999
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
h.new_members.push(m);
|
||||||
}
|
}
|
||||||
h.new_members.push(m);
|
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('fake household', h);
|
console.log('fake household', h);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user