mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-23 05:53:09 +03:00
bring Rosamund back
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
5e1dc72513
commit
944f8fbef8
File diff suppressed because it is too large
Load Diff
@ -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
@ -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
Loading…
Reference in New Issue
Block a user