Revert company address field type (#4737)

## Context
A new ADDRESS field type has been introduced and the company object has
been updated to use this new type however this introduced a few
regressions.
The good strategy would be to introduce a new field and rename the old
one.

This PR revert that change to fix the issue.
This commit is contained in:
Weiko
2024-04-02 11:11:14 +02:00
committed by GitHub
parent dc8ab5d95a
commit a3a15957f4
4 changed files with 616 additions and 602 deletions

View File

@ -29,6 +29,7 @@ export const seedCompanies = async (
'id', 'id',
'name', 'name',
'domainName', 'domainName',
'address',
'position', 'position',
]) ])
.orIgnore() .orIgnore()
@ -37,78 +38,91 @@ export const seedCompanies = async (
id: DEV_SEED_COMPANY_IDS.LINKEDIN, id: DEV_SEED_COMPANY_IDS.LINKEDIN,
name: 'Linkedin', name: 'Linkedin',
domainName: 'linkedin.com', domainName: 'linkedin.com',
address: '',
position: 1, position: 1,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.FACEBOOK, id: DEV_SEED_COMPANY_IDS.FACEBOOK,
name: 'Facebook', name: 'Facebook',
domainName: 'facebook.com', domainName: 'facebook.com',
address: '',
position: 2, position: 2,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.QONTO, id: DEV_SEED_COMPANY_IDS.QONTO,
name: 'Qonto', name: 'Qonto',
domainName: 'qonto.com', domainName: 'qonto.com',
address: '',
position: 3, position: 3,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.MICROSOFT, id: DEV_SEED_COMPANY_IDS.MICROSOFT,
name: 'Microsoft', name: 'Microsoft',
domainName: 'microsoft.com', domainName: 'microsoft.com',
address: '',
position: 4, position: 4,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.AIRBNB, id: DEV_SEED_COMPANY_IDS.AIRBNB,
name: 'Airbnb', name: 'Airbnb',
domainName: 'airbnb.com', domainName: 'airbnb.com',
address: '',
position: 5, position: 5,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.GOOGLE, id: DEV_SEED_COMPANY_IDS.GOOGLE,
name: 'Google', name: 'Google',
domainName: 'google.com', domainName: 'google.com',
address: '',
position: 6, position: 6,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.NETFLIX, id: DEV_SEED_COMPANY_IDS.NETFLIX,
name: 'Netflix', name: 'Netflix',
domainName: 'netflix.com', domainName: 'netflix.com',
address: '',
position: 7, position: 7,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.LIBEO, id: DEV_SEED_COMPANY_IDS.LIBEO,
name: 'Libeo', name: 'Libeo',
domainName: 'libeo.io', domainName: 'libeo.io',
address: '',
position: 8, position: 8,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.CLAAP, id: DEV_SEED_COMPANY_IDS.CLAAP,
name: 'Claap', name: 'Claap',
domainName: 'claap.io', domainName: 'claap.io',
address: '',
position: 9, position: 9,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.HASURA, id: DEV_SEED_COMPANY_IDS.HASURA,
name: 'Hasura', name: 'Hasura',
domainName: 'hasura.io', domainName: 'hasura.io',
address: '',
position: 10, position: 10,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.WEWORK, id: DEV_SEED_COMPANY_IDS.WEWORK,
name: 'Wework', name: 'Wework',
domainName: 'wework.com', domainName: 'wework.com',
address: '',
position: 11, position: 11,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.SAMSUNG, id: DEV_SEED_COMPANY_IDS.SAMSUNG,
name: 'Samsung', name: 'Samsung',
domainName: 'samsung.com', domainName: 'samsung.com',
address: '',
position: 12, position: 12,
}, },
{ {
id: DEV_SEED_COMPANY_IDS.ALGOLIA, id: DEV_SEED_COMPANY_IDS.ALGOLIA,
name: 'Algolia', name: 'Algolia',
domainName: 'algolia.com', domainName: 'algolia.com',
address: '',
position: 13, position: 13,
}, },
]) ])

View File

@ -12,7 +12,7 @@ export const companyPrefillDemoData = async (
.into(`${schemaName}.company`, [ .into(`${schemaName}.company`, [
'name', 'name',
'domainName', 'domainName',
'addressAddressCity', 'address',
'employees', 'employees',
'linkedinLinkUrl', 'linkedinLinkUrl',
'position', 'position',

View File

@ -51,7 +51,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.address, standardId: companyStandardFieldIds.address,
type: FieldMetadataType.ADDRESS, type: FieldMetadataType.TEXT,
label: 'Address', label: 'Address',
description: 'The company address', description: 'The company address',
icon: 'IconMap', icon: 'IconMap',