mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-08 10:47:42 +02:00
introduce EmployeeAccount
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
@@ -103,14 +103,15 @@ program
|
||||
const url = new URL(`/${token}`, transactorUrl)
|
||||
const contrib = await createContributingClient(url.href)
|
||||
const txop = new TxOperations(contrib, core.account.System)
|
||||
await txop.createDoc(contact.class.Employee, contact.space.Employee, {
|
||||
const employee = await txop.createDoc(contact.class.Employee, contact.space.Employee, {
|
||||
firstName: account.first,
|
||||
lastName: account.last,
|
||||
city: 'Mountain View',
|
||||
channels: []
|
||||
})
|
||||
await txop.createDoc(core.class.Account, core.space.Model, {
|
||||
email
|
||||
await txop.createDoc(contact.class.EmployeeAccount, core.space.Model, {
|
||||
email,
|
||||
employee
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user