bring Rosamund back

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov
2021-09-10 17:27:25 +02:00
parent 5e1dc72513
commit 944f8fbef8
6 changed files with 728 additions and 622 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -18,7 +18,7 @@ import { program } from 'commander'
import { MongoClient, Db } from 'mongodb'
import { getAccount, createAccount, assignWorkspace, createWorkspace, ACCOUNT_DB } from '@anticrm/account'
import { createContributingClient } from '@anticrm/contrib'
import core, { TxOperations, TxFactory, DOMAIN_TX } from '@anticrm/core'
import core, { TxOperations } from '@anticrm/core'
import { encode } from 'jwt-simple'
import { Client } from 'minio'
import { initWorkspace } from './workspace'
+237 -207
View File
File diff suppressed because it is too large Load Diff
+15
View File
@@ -15,11 +15,26 @@
//
import { Builder } from '@anticrm/model'
import core, { generateId } from '@anticrm/core'
import contact from '@anticrm/model-contact'
import recruit from '@anticrm/model-recruit'
export function createDemo (builder: Builder): void {
const rosamund = generateId()
builder.createDoc(contact.class.Employee, contact.space.Employee, {
firstName: 'Rosamund',
lastName: 'Chen',
city: 'Mountain View',
channels: []
}, rosamund)
builder.createDoc(contact.class.EmployeeAccount, core.space.Model, {
email: 'rosamund@hc.engineering',
employee: rosamund as any
})
builder.createDoc(recruit.class.Candidate, recruit.space.CandidatesPublic, {
firstName: 'Andrey',
lastName: 'P.',
@@ -38,6 +38,7 @@ async function connect(): Promise<Client | undefined> {
const getClient = await getResource(client.function.GetClient)
const instance = await getClient(token, endpoint)
console.log('logging in as', email)
const me = await instance.findOne(contact.class.EmployeeAccount, { email })
if (me !== undefined) {
console.log('login: employee account', me)
File diff suppressed because it is too large Load Diff