Skip to content

Commit

Permalink
Company and People fields (#12)
Browse files Browse the repository at this point in the history
* add fields to company and person

* replace person city with address

* disable sync with google
  • Loading branch information
JarWarren authored Oct 6, 2024
1 parent dec7a85 commit 1d207a9
Show file tree
Hide file tree
Showing 25 changed files with 45 additions and 131 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ describe('getDisplayNameFromParticipant', () => {
primaryLinkUrl: '',
primaryLinkLabel: '',
},
city: '',
email: '',
phone: '',
companyId: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const taskTarget = {
id: '89bb825c-171e-4bcc-9cf7-43448d6fb280',
createdAt: '2023-04-26T10:12:42.33625+00:00',
updatedAt: '2023-04-26T10:23:42.33625+00:00',
city: 'City',
name: {
firstName: 'John',
lastName: 'Doe',
Expand Down Expand Up @@ -73,7 +72,6 @@ cache.writeFragment({
id
createdAt
updatedAt
city
name {
firstName
lastName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ xLink
}
id
createdAt
city
email
jobTitle
name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ describe('mapObjectMetadataToGraphQLQuery', () => {
xLink: true,
id: true,
createdAt: true,
city: true,
email: true,
jobTitle: true,
name: true,
Expand All @@ -46,7 +45,6 @@ describe('mapObjectMetadataToGraphQLQuery', () => {
createdAt
avatarUrl
jobTitle
city
id
xLink
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -849,26 +849,6 @@ export const getObjectMetadataItemsMock = () => {
"options": null,
"relationDefinition": null
},
{
"__typename": "field",
"id": "22b21809-4eab-43a9-9ddc-0bbe04daffe3",
"type": "TEXT",
"name": "city",
"label": "City",
"description": "Contact’s city",
"icon": "IconMap",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isNullable": false,
"createdAt": "2024-08-05T16:38:57.285Z",
"updatedAt": "2024-08-05T16:38:57.285Z",
"fromRelationMetadata": null,
"toRelationMetadata": null,
"defaultValue": "''",
"options": null,
"relationDefinition": null
},
{
"__typename": "field",
"id": "4227c9a5-6dd3-4de0-9248-e62572afc92b",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const responseData = {
secondaryLinks: null,
},
createdAt: '',
city: '',
email: '',
jobTitle: '',
name: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const responseData = {
company: {
id: '',
},
city: '',
email: '',
activityTargets: {
edges: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export const query = gql`
id
idealCustomerProfile
}
city
email
activityTargets {
edges {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const basePerson = {
secondaryLinks: null,
},
createdAt: '',
city: '',
email: '',
jobTitle: '',
name: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ const getNextOnboardingStatus = (
currentUser: CurrentUser | null,
currentWorkspace: CurrentWorkspace | null,
) => {
if (currentUser?.onboardingStatus === OnboardingStatus.ProfileCreation) {
return OnboardingStatus.SyncEmail;
}
// Funnelmink - disabled for now
// if (currentUser?.onboardingStatus === OnboardingStatus.ProfileCreation) {
// return OnboardingStatus.SyncEmail;
// }
if (
currentUser?.onboardingStatus === OnboardingStatus.SyncEmail &&
currentUser?.onboardingStatus === OnboardingStatus.ProfileCreation &&
currentWorkspace?.workspaceMembersCount === 1
) {
return OnboardingStatus.InviteTeam;
Expand Down
1 change: 0 additions & 1 deletion packages/twenty-front/src/modules/people/types/Person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export type Person = {
primaryLinkUrl: string;
primaryLinkLabel: string;
};
city: string;
email: string;
phone: string;
companyId?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export const query = gql`
id
idealCustomerProfile
}
city
email
activityTargets {
edges {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const LabelIdentifier: Story = {
export const Text: Story = {
args: {
fieldMetadataItem: mockedPersonObjectMetadataItem.fields.find(
({ name, type }) => name === 'city' && type === FieldMetadataType.Text,
({ name, type }) => name === 'address' && type === FieldMetadataType.Text,
),
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Bertrand',
lastName: 'Voulzy',
},
city: 'Seattle',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: 'asd',
Expand Down Expand Up @@ -176,7 +175,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Madison',
lastName: 'Perez',
},
city: 'Seattle',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -208,7 +206,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Avery',
lastName: 'Carter',
},
city: 'New York',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -240,7 +237,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Ethan',
lastName: 'Mitchell',
},
city: 'Los Angeles',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -272,7 +268,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Elizabeth',
lastName: 'Baker',
},
city: 'New York',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -304,7 +299,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Christopher',
lastName: 'Nelson',
},
city: 'San Francisco',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -402,7 +396,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Christopher',
lastName: 'Gonzalez',
},
city: 'Seattle',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -434,7 +427,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Ashley',
lastName: 'Parker',
},
city: 'Los Angeles',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -617,7 +609,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Isabella',
lastName: 'Scott',
},
city: 'New York',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -649,7 +640,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Matthew',
lastName: 'Green',
},
city: 'Seattle',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -681,7 +671,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Nicholas',
lastName: 'Wright',
},
city: 'Seattle',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -1013,7 +1002,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Lorie',
lastName: 'Vladim',
},
city: 'Seattle',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -1111,7 +1099,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Louis',
lastName: 'Duss',
},
city: 'Seattle',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -1339,7 +1326,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Sylvie',
lastName: 'Palmer',
},
city: 'Los Angeles',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down Expand Up @@ -1371,7 +1357,6 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
firstName: 'Christoph',
lastName: 'Callisto',
},
city: 'Seattle',
updatedAt: '2023-11-23T15:38:03.700Z',
linkedinLink: {
primaryLinkLabel: null,
Expand Down
1 change: 0 additions & 1 deletion packages/twenty-front/src/testing/mock-data/companies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export const companiesQueryResult = {
testUuid: null,
phone: '+33788901234',
createdAt: '2024-06-05T09:00:20.412Z',
city: 'Seattle',
testPhone: '',
jobTitle: 'CTO',
testCurrency: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4466,29 +4466,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
"toRelationMetadata": null
}
},
{
"__typename": "fieldEdge",
"node": {
"__typename": "field",
"id": "a420a3c3-f245-4ab4-9094-bb4cfb7edc9b",
"type": "TEXT",
"name": "city",
"label": "City",
"description": "Contact’s city",
"icon": "IconMap",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isNullable": false,
"createdAt": "2024-08-02T16:00:05.938Z",
"updatedAt": "2024-08-02T16:00:05.938Z",
"defaultValue": "''",
"options": null,
"relationDefinition": null,
"fromRelationMetadata": null,
"toRelationMetadata": null
}
},
{
"__typename": "fieldEdge",
"node": {
Expand Down
Loading

0 comments on commit 1d207a9

Please sign in to comment.