12c68fd77f
### Description 1. We've created another PR [here](https://github.com/twentyhq/placeholder-images/pull/1) here that adds the placeholder images to the `placeholder-images` repo 2. For now, [pages](https://github.com/twentyhq/placeholder-images/settings/pages) is deploying to the `TWNTY-3514` on `placeholder-images`. If the PR is merged, we'll need to update [pages](https://github.com/twentyhq/placeholder-images/settings/pages) to deploy from `main` ### Refs - #3514 - https://github.com/twentyhq/placeholder-images/pull/1 ### Demo https://github.com/twentyhq/twenty/assets/140154534/88fa6cc1-a84d-48d4-9b17-e3a29bd9d1d0 Fixes #3514 --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: RubensRafael <rubensrafael2@live.com> Co-authored-by: Charles Bochet <charles@twenty.com>
69 lines
1.7 KiB
TypeScript
69 lines
1.7 KiB
TypeScript
import { EntityManager } from 'typeorm';
|
|
|
|
export const personPrefillData = async (
|
|
entityManager: EntityManager,
|
|
schemaName: string,
|
|
) => {
|
|
await entityManager
|
|
.createQueryBuilder()
|
|
.insert()
|
|
.into(`${schemaName}.person`, [
|
|
'nameFirstName',
|
|
'nameLastName',
|
|
'city',
|
|
'email',
|
|
'avatarUrl',
|
|
'position',
|
|
])
|
|
.orIgnore()
|
|
.values([
|
|
{
|
|
nameFirstName: 'Brian',
|
|
nameLastName: 'Chesky',
|
|
city: 'San Francisco',
|
|
email: 'chesky@airbnb.com',
|
|
avatarUrl:
|
|
'https://twentyhq.github.io/placeholder-images/people/image-3.png',
|
|
position: 1,
|
|
},
|
|
{
|
|
nameFirstName: 'Alexandre',
|
|
nameLastName: 'Prot',
|
|
city: 'Paris',
|
|
email: 'prot@qonto.com',
|
|
avatarUrl:
|
|
'https://twentyhq.github.io/placeholder-images/people/image-89.png',
|
|
position: 2,
|
|
},
|
|
{
|
|
nameFirstName: 'Patrick',
|
|
nameLastName: 'Collison',
|
|
city: 'San Francisco',
|
|
email: 'collison@stripe.com',
|
|
avatarUrl:
|
|
'https://twentyhq.github.io/placeholder-images/people/image-47.png',
|
|
position: 3,
|
|
},
|
|
{
|
|
nameFirstName: 'Dylan',
|
|
nameLastName: 'Field',
|
|
city: 'San Francisco',
|
|
email: 'field@figma.com',
|
|
avatarUrl:
|
|
'https://twentyhq.github.io/placeholder-images/people/image-40.png',
|
|
position: 4,
|
|
},
|
|
{
|
|
nameFirstName: 'Ivan',
|
|
nameLastName: 'Zhao',
|
|
city: 'San Francisco',
|
|
email: 'zhao@notion.com',
|
|
avatarUrl:
|
|
'https://twentyhq.github.io/placeholder-images/people/image-68.png',
|
|
position: 5,
|
|
},
|
|
])
|
|
.returning('*')
|
|
.execute();
|
|
};
|