mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 16:56:07 +00: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 { MongoClient, Db } from 'mongodb'
|
||||||
import { getAccount, createAccount, assignWorkspace, createWorkspace, ACCOUNT_DB } from '@anticrm/account'
|
import { getAccount, createAccount, assignWorkspace, createWorkspace, ACCOUNT_DB } from '@anticrm/account'
|
||||||
import { createContributingClient } from '@anticrm/contrib'
|
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 { encode } from 'jwt-simple'
|
||||||
import { Client } from 'minio'
|
import { Client } from 'minio'
|
||||||
import { initWorkspace } from './workspace'
|
import { initWorkspace } from './workspace'
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -15,11 +15,26 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import { Builder } from '@anticrm/model'
|
import { Builder } from '@anticrm/model'
|
||||||
|
import core, { generateId } from '@anticrm/core'
|
||||||
|
|
||||||
import contact from '@anticrm/model-contact'
|
import contact from '@anticrm/model-contact'
|
||||||
import recruit from '@anticrm/model-recruit'
|
import recruit from '@anticrm/model-recruit'
|
||||||
|
|
||||||
export function createDemo (builder: Builder): void {
|
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, {
|
builder.createDoc(recruit.class.Candidate, recruit.space.CandidatesPublic, {
|
||||||
firstName: 'Andrey',
|
firstName: 'Andrey',
|
||||||
lastName: 'P.',
|
lastName: 'P.',
|
||||||
|
@ -38,6 +38,7 @@ async function connect(): Promise<Client | undefined> {
|
|||||||
|
|
||||||
const getClient = await getResource(client.function.GetClient)
|
const getClient = await getResource(client.function.GetClient)
|
||||||
const instance = await getClient(token, endpoint)
|
const instance = await getClient(token, endpoint)
|
||||||
|
console.log('logging in as', email)
|
||||||
const me = await instance.findOne(contact.class.EmployeeAccount, { email })
|
const me = await instance.findOne(contact.class.EmployeeAccount, { email })
|
||||||
if (me !== undefined) {
|
if (me !== undefined) {
|
||||||
console.log('login: employee account', me)
|
console.log('login: employee account', me)
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user