diff --git a/plugins/contact-resources/src/components/SpaceMembers.svelte b/plugins/contact-resources/src/components/SpaceMembers.svelte index cc264188cd..fec3186dae 100644 --- a/plugins/contact-resources/src/components/SpaceMembers.svelte +++ b/plugins/contact-resources/src/components/SpaceMembers.svelte @@ -49,8 +49,8 @@ ) } - async function add (employee: Ref): Promise { - const account = await client.findOne(contact.class.PersonAccount, { employee }) + async function add (person: Ref): Promise { + const account = await client.findOne(contact.class.PersonAccount, { person }) if (account === undefined) return await client.update(space, { $push: { @@ -59,8 +59,8 @@ }) } - async function removeMember (employee: Ref): Promise { - const account = await client.findOne(contact.class.PersonAccount, { employee }) + async function removeMember (person: Ref): Promise { + const account = await client.findOne(contact.class.PersonAccount, { person }) if (account === undefined) return await client.update(space, { $pull: { members: account._id } }) } diff --git a/plugins/hr-resources/src/components/ScheduleView.svelte b/plugins/hr-resources/src/components/ScheduleView.svelte index e8c0eca122..e368ba3834 100644 --- a/plugins/hr-resources/src/components/ScheduleView.svelte +++ b/plugins/hr-resources/src/components/ScheduleView.svelte @@ -265,7 +265,7 @@ const map = new Map, Department[]>() if (departmentStaff && departmentStaff.length > 0) { const ids = departmentStaff.map((staff) => staff._id) - const staffs = await client.findAll(contact.class.PersonAccount, { employee: { $in: ids } }) + const staffs = await client.findAll(contact.class.PersonAccount, { person: { $in: ids } }) const departments = await client.findAll(hr.class.Department, { members: { $in: staffs.map((staff) => staff._id) } })