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
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
6 changed files with 728 additions and 622 deletions

File diff suppressed because it is too large Load Diff

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'

File diff suppressed because it is too large Load Diff

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.',

View File

@ -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