diff --git a/front/src/modules/sign-in-background-mock/components/SignInBackgroundMockContainer.tsx b/front/src/modules/sign-in-background-mock/components/SignInBackgroundMockContainer.tsx new file mode 100644 index 0000000000..7b48e8828b --- /dev/null +++ b/front/src/modules/sign-in-background-mock/components/SignInBackgroundMockContainer.tsx @@ -0,0 +1,44 @@ +import styled from '@emotion/styled'; + +import { SignInBackgroundMockContainerEffect } from '@/sign-in-background-mock/components/SignInBackgroundMockContainerEffect'; +import { RecordTable } from '@/ui/object/record-table/components/RecordTable'; +import { TableOptionsDropdownId } from '@/ui/object/record-table/constants/TableOptionsDropdownId'; +import { TableOptionsDropdown } from '@/ui/object/record-table/options/components/TableOptionsDropdown'; +import { RecordTableScope } from '@/ui/object/record-table/scopes/RecordTableScope'; +import { ViewBar } from '@/views/components/ViewBar'; +import { ViewScope } from '@/views/scopes/ViewScope'; + +const StyledContainer = styled.div` + display: flex; + flex-direction: column; + height: 100%; + overflow: auto; +`; + +export const SignInBackgroundMockContainer = () => { + const tableScopeId = 'sign-in-background-mock-table'; + const viewScopeId = 'sign-in-background-mock-view'; + + return ( + {}} + onViewFiltersChange={() => {}} + onViewSortsChange={() => {}} + > + + {}} + > + } + optionsDropdownScopeId={TableOptionsDropdownId} + /> + + {}} /> + + + + ); +}; diff --git a/front/src/modules/sign-in-background-mock/components/SignInBackgroundMockContainerEffect.tsx b/front/src/modules/sign-in-background-mock/components/SignInBackgroundMockContainerEffect.tsx new file mode 100644 index 0000000000..cd1a8ebb40 --- /dev/null +++ b/front/src/modules/sign-in-background-mock/components/SignInBackgroundMockContainerEffect.tsx @@ -0,0 +1,98 @@ +import { useEffect } from 'react'; + +import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem'; +import { useRecordTableContextMenuEntries } from '@/object-record/hooks/useRecordTableContextMenuEntries'; +import { filterAvailableTableColumns } from '@/object-record/utils/filterAvailableTableColumns'; +import { signInBackgroundMockCompanies } from '@/sign-in-background-mock/constants/signInBackgroundMockCompanies'; +import { + signInBackgroundMockColumnDefinitions, + signInBackgroundMockFilterDefinitions, + signInBackgroundMockSortDefinitions, +} from '@/sign-in-background-mock/constants/signInBackgroundMockDefinitions'; +import { signInBackgroundMockViewFields } from '@/sign-in-background-mock/constants/signInBackgroundMockViewFields'; +import { useRecordTable } from '@/ui/object/record-table/hooks/useRecordTable'; +import { useView } from '@/views/hooks/useView'; +import { ViewType } from '@/views/types/ViewType'; +import { mapViewFieldsToColumnDefinitions } from '@/views/utils/mapViewFieldsToColumnDefinitions'; + +export const SignInBackgroundMockContainerEffect = () => { + const { + scopeId: objectNamePlural, + setAvailableTableColumns, + setOnEntityCountChange, + setRecordTableData, + setTableColumns, + setObjectMetadataConfig, + } = useRecordTable(); + + const { objectMetadataItem } = useObjectMetadataItem({ + objectNamePlural, + }); + + const { + setAvailableSortDefinitions, + setAvailableFilterDefinitions, + setAvailableFieldDefinitions, + setViewType, + setViewObjectMetadataId, + setEntityCountInCurrentView, + } = useView(); + + useEffect(() => { + setViewObjectMetadataId?.('company-mock-object-metadata-id'); + setViewType?.(ViewType.Table); + + setAvailableSortDefinitions?.(signInBackgroundMockSortDefinitions); + setAvailableFilterDefinitions?.(signInBackgroundMockFilterDefinitions); + setAvailableFieldDefinitions?.(signInBackgroundMockColumnDefinitions); + + const availableTableColumns = signInBackgroundMockColumnDefinitions.filter( + filterAvailableTableColumns, + ); + + setAvailableTableColumns(availableTableColumns); + setRecordTableData(signInBackgroundMockCompanies); + + setTableColumns( + mapViewFieldsToColumnDefinitions( + signInBackgroundMockViewFields, + signInBackgroundMockColumnDefinitions, + ), + ); + }, [ + setViewObjectMetadataId, + setViewType, + setAvailableSortDefinitions, + setAvailableFilterDefinitions, + setAvailableFieldDefinitions, + objectMetadataItem, + setAvailableTableColumns, + setRecordTableData, + setTableColumns, + ]); + + useEffect(() => { + setObjectMetadataConfig?.(mockIdentifier); + }, [setObjectMetadataConfig]); + + const { setActionBarEntries, setContextMenuEntries } = + useRecordTableContextMenuEntries(); + + useEffect(() => { + setActionBarEntries?.(); + setContextMenuEntries?.(); + }, [setActionBarEntries, setContextMenuEntries]); + + useEffect(() => { + setOnEntityCountChange( + () => (entityCount: number) => setEntityCountInCurrentView(entityCount), + ); + }, [setEntityCountInCurrentView, setOnEntityCountChange]); + + return <>; +}; + +const mockIdentifier = { + basePathToShowPage: '/object/company/', + labelIdentifierFieldMetadataId: '20202020-6d30-4111-9f40-b4301906fd3c', +}; diff --git a/front/src/modules/sign-in-background-mock/components/SignInBackgroundMockPage.tsx b/front/src/modules/sign-in-background-mock/components/SignInBackgroundMockPage.tsx new file mode 100644 index 0000000000..a5c29a4bfe --- /dev/null +++ b/front/src/modules/sign-in-background-mock/components/SignInBackgroundMockPage.tsx @@ -0,0 +1,35 @@ +import styled from '@emotion/styled'; + +import { SignInBackgroundMockContainer } from '@/sign-in-background-mock/components/SignInBackgroundMockContainer'; +import { IconBuildingSkyscraper } from '@/ui/display/icon'; +import { PageAddButton } from '@/ui/layout/page/PageAddButton'; +import { PageBody } from '@/ui/layout/page/PageBody'; +import { PageContainer } from '@/ui/layout/page/PageContainer'; +import { PageHeader } from '@/ui/layout/page/PageHeader'; +import { PageHotkeysEffect } from '@/ui/layout/page/PageHotkeysEffect'; +import { RecordTableActionBar } from '@/ui/object/record-table/action-bar/components/RecordTableActionBar'; +import { RecordTableContextMenu } from '@/ui/object/record-table/context-menu/components/RecordTableContextMenu'; + +const StyledTableContainer = styled.div` + display: flex; + height: 100%; + width: 100%; +`; + +export const SignInBackgroundMockPage = () => { + return ( + + + {}} /> + {}} /> + + + + + + + + + + ); +}; diff --git a/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockCompanies.ts b/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockCompanies.ts new file mode 100644 index 0000000000..cf9776cb40 --- /dev/null +++ b/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockCompanies.ts @@ -0,0 +1,1192 @@ +export const signInBackgroundMockCompanies = [ + { + __typename: 'Company', + id: '04b2e9f5-0713-40a5-8216-82802401d33e', + domainName: 'qonto.com', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Qonto', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [ + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '240da2ec-2d40-4e49-8df4-9c6a049190df', + email: 'bertrand.voulzy@google.com', + avatarUrl: + 'person-picture/original/7e4d491e-5482-4c9f-a490-a4d1b62da10f.38', + phone: '+33788901234', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '04b2e9f5-0713-40a5-8216-82802401d33e', + jobTitle: 'zdf', + xLink: { + __typename: 'Link', + label: 'asd', + url: 'asd.com', + }, + name: { + __typename: 'FullName', + firstName: 'Bertrand', + lastName: 'Voulzy', + }, + city: 'Seattle', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: 'asd', + url: 'asd.com', + }, + }, + }, + ], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [ + { + __typename: 'ActivityTargetEdge', + node: { + __typename: 'ActivityTarget', + id: '97114d7e-2a80-4401-af58-36c88e13e852', + activityId: '737a6c31-610a-457b-b087-791ac700fa46', + createdAt: '2023-11-24T13:15:03.523Z', + updatedAt: '2023-11-24T13:15:03.523Z', + companyId: '04b2e9f5-0713-40a5-8216-82802401d33e', + personId: null, + }, + }, + { + __typename: 'ActivityTargetEdge', + node: { + __typename: 'ActivityTarget', + id: 'cb29d37a-3d5e-4efb-afa3-38f4bff69912', + activityId: '3c6ea4a3-f71d-4c31-9dfa-f868a5de4091', + createdAt: '2023-11-24T13:14:57.628Z', + updatedAt: '2023-11-24T13:14:57.628Z', + companyId: '04b2e9f5-0713-40a5-8216-82802401d33e', + personId: null, + }, + }, + ], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: '0d940997-c21e-4ec2-873b-de4264d89025', + domainName: 'google.com', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Google', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [ + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '240da2ec-2d40-4e49-8df4-9c6a049190ef', + email: 'madison.perez@google.com', + avatarUrl: null, + phone: '+33788901234', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '0d940997-c21e-4ec2-873b-de4264d89025', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Madison', + lastName: 'Perez', + }, + city: 'Seattle', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '56955422-5d54-41b7-ba36-f0d20e1417ae', + email: 'avery.carter@airbnb.com', + avatarUrl: null, + phone: '+33786789012', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '0d940997-c21e-4ec2-873b-de4264d89025', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Avery', + lastName: 'Carter', + }, + city: 'New York', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '755035db-623d-41fe-92e7-dd45b7c568e1', + email: 'ethan.mitchell@google.com', + avatarUrl: null, + phone: '+33787890123', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '0d940997-c21e-4ec2-873b-de4264d89025', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Ethan', + lastName: 'Mitchell', + }, + city: 'Los Angeles', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: 'a2e78a5f-338b-46df-8811-fa08c7d19d35', + email: 'elizabeth.baker@airbnb.com', + avatarUrl: null, + phone: '+33784567890', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '0d940997-c21e-4ec2-873b-de4264d89025', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Elizabeth', + lastName: 'Baker', + }, + city: 'New York', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: 'ca1f5bf3-64ad-4b0e-bbfd-e9fd795b7016', + email: 'christopher.nelson@airbnb.com', + avatarUrl: null, + phone: '+33785678901', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '0d940997-c21e-4ec2-873b-de4264d89025', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Christopher', + lastName: 'Nelson', + }, + city: 'San Francisco', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + ], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: '118995f3-5d81-46d6-bf83-f7fd33ea6102', + domainName: 'facebook.com', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Facebook', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [ + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '93c72d2e-f517-42fd-80ae-14173b3b70ae', + email: 'christopher.gonzalez@qonto.com', + avatarUrl: null, + phone: '+33789012345', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '118995f3-5d81-46d6-bf83-f7fd33ea6102', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Christopher', + lastName: 'Gonzalez', + }, + city: 'Seattle', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: 'eeeacacf-eee1-4690-ad2c-8619e5b56a2e', + email: 'ashley.parker@qonto.com', + avatarUrl: null, + phone: '+33780123456', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '118995f3-5d81-46d6-bf83-f7fd33ea6102', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Ashley', + lastName: 'Parker', + }, + city: 'Los Angeles', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + ], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [ + { + __typename: 'OpportunityEdge', + node: { + __typename: 'Opportunity', + id: '53f66647-0543-4cc2-9f96-95cc699960f2', + probability: '0.5', + pipelineStepId: 'd8361722-03fb-4e65-bd4f-ec9e52e5ec0a', + pointOfContactId: '93c72d2e-f517-42fd-80ae-14173b3b70ae', + amount: { + __typename: 'Currency', + amountMicros: 2000000, + currencyCode: 'USD', + }, + createdAt: '2023-11-23T15:38:03.703Z', + closeDate: '2023-11-23T15:38:03.703Z', + personId: '93c72d2e-f517-42fd-80ae-14173b3b70ae', + companyId: '118995f3-5d81-46d6-bf83-f7fd33ea6102', + updatedAt: '2023-11-23T15:38:03.703Z', + }, + }, + ], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: '1d3a1c6e-707e-44dc-a1d2-30030bf1a944', + domainName: 'netflix.com', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Netflix', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: '460b6fb1-ed89-413a-b31a-962986e67bb4', + domainName: 'microsoft.com', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Microsoft', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [ + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '1d151852-490f-4466-8391-733cfd66a0c8', + email: 'isabella.scott@microsoft.com', + avatarUrl: null, + phone: '+33782345678', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Isabella', + lastName: 'Scott', + }, + city: 'New York', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '98406e26-80f1-4dff-b570-a74942528de3', + email: 'matthew.green@microsoft.com', + avatarUrl: null, + phone: '+33783456789', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Matthew', + lastName: 'Green', + }, + city: 'Seattle', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '9b324a88-6784-4449-afdf-dc62cb8702f2', + email: 'nicholas.wright@microsoft.com', + avatarUrl: null, + phone: '+33781234567', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Nicholas', + lastName: 'Wright', + }, + city: 'Seattle', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + ], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [ + { + __typename: 'OpportunityEdge', + node: { + __typename: 'Opportunity', + id: '81ab695d-2f89-406f-90ea-180f433b2445', + probability: '0.5', + pipelineStepId: '30b14887-d592-427d-bd97-6e670158db02', + pointOfContactId: '9b324a88-6784-4449-afdf-dc62cb8702f2', + amount: { + __typename: 'Currency', + amountMicros: 300000, + currencyCode: 'USD', + }, + createdAt: '2023-11-23T15:38:03.703Z', + closeDate: '2023-11-23T15:38:03.703Z', + personId: '9b324a88-6784-4449-afdf-dc62cb8702f2', + companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4', + updatedAt: '2023-11-23T15:38:03.703Z', + }, + }, + { + __typename: 'OpportunityEdge', + node: { + __typename: 'Opportunity', + id: '9b059852-35b1-4045-9cde-42f715148954', + probability: '0.5', + pipelineStepId: '30b14887-d592-427d-bd97-6e670158db02', + pointOfContactId: '98406e26-80f1-4dff-b570-a74942528de3', + amount: { + __typename: 'Currency', + amountMicros: 4000000, + currencyCode: 'USD', + }, + createdAt: '2023-11-23T15:38:03.703Z', + closeDate: '2023-11-23T15:38:03.703Z', + personId: '98406e26-80f1-4dff-b570-a74942528de3', + companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4', + updatedAt: '2023-11-23T15:38:03.703Z', + }, + }, + ], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: '7a93d1e5-3f74-492d-a101-2a70f50a1645', + domainName: 'libeo.io', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Libeo', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: '89bb825c-171e-4bcc-9cf7-43448d6fb278', + domainName: 'airbnb.com', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Airbnb', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: '9d162de6-cfbf-4156-a790-e39854dcd4eb', + domainName: 'claap.io', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Claap', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: 'a674fa6c-1455-4c57-afaf-dd5dc086361d', + domainName: 'algolia.com', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Algolia', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [ + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '240da2ec-2d40-4e49-8df4-9c6a049191df', + email: 'lorie.vladim@google.com', + avatarUrl: null, + phone: '+33788901235', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: 'a674fa6c-1455-4c57-afaf-dd5dc086361d', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Lorie', + lastName: 'Vladim', + }, + city: 'Seattle', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + ], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: 'a7bc68d5-f79e-40dd-bd06-c36e6abb4678', + domainName: 'samsung.com', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Samsung', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [ + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '240da2ec-2d40-4e49-8df4-9c6a049191de', + email: 'louis.duss@google.com', + avatarUrl: null, + phone: '+33788901234', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: 'a7bc68d5-f79e-40dd-bd06-c36e6abb4678', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Louis', + lastName: 'Duss', + }, + city: 'Seattle', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + ], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: 'aaffcfbd-f86b-419f-b794-02319abe8637', + domainName: 'hasura.io', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Hasura', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: 'f33dc242-5518-4553-9433-42d8eb82834b', + domainName: 'wework.com', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Wework', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, + { + __typename: 'Company', + id: 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408', + domainName: 'linkedin.com', + updatedAt: '2023-11-23T15:38:03.699Z', + employees: null, + name: 'Linkedin', + favorites: { + __typename: 'FavoriteConnection', + edges: [], + }, + address: '', + accountOwner: null, + people: { + __typename: 'PersonConnection', + edges: [ + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '0aa00beb-ac73-4797-824e-87a1f5aea9e0', + email: 'sylvie.palmer@linkedin.com', + avatarUrl: null, + phone: '+33780123456', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408', + jobTitle: '', + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Sylvie', + lastName: 'Palmer', + }, + city: 'Los Angeles', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + { + __typename: 'PersonEdge', + node: { + __typename: 'Person', + id: '86083141-1c0e-494c-a1b6-85b1c6fefaa5', + email: 'christoph.calisto@linkedin.com', + avatarUrl: null, + phone: '+33789012345', + createdAt: '2023-11-23T15:38:03.700Z', + companyId: 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408', + jobTitle: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + name: { + __typename: 'FullName', + firstName: 'Christoph', + lastName: 'Callisto', + }, + city: 'Seattle', + updatedAt: '2023-11-23T15:38:03.700Z', + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + }, + }, + ], + }, + attachments: { + __typename: 'AttachmentConnection', + edges: [], + }, + createdAt: '2023-11-23T15:38:03.699Z', + idealCustomerProfile: null, + linkedinLink: { + __typename: 'Link', + label: null, + url: null, + }, + opportunities: { + __typename: 'OpportunityConnection', + edges: [ + { + __typename: 'OpportunityEdge', + node: { + __typename: 'Opportunity', + id: '7c887ee3-be10-412b-a663-16bd3c2228e1', + probability: '0.5', + pipelineStepId: '6edf4ead-006a-46e1-9c6d-228f1d0143c9', + pointOfContactId: '86083141-1c0e-494c-a1b6-85b1c6fefaa5', + amount: { + __typename: 'Currency', + amountMicros: 100000, + currencyCode: 'USD', + }, + createdAt: '2023-11-23T15:38:03.703Z', + closeDate: '2023-11-23T15:38:03.703Z', + personId: '86083141-1c0e-494c-a1b6-85b1c6fefaa5', + companyId: 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408', + updatedAt: '2023-11-23T15:38:03.703Z', + }, + }, + ], + }, + accountOwnerId: null, + xLink: { + __typename: 'Link', + label: null, + url: null, + }, + activityTargets: { + __typename: 'ActivityTargetConnection', + edges: [], + }, + annualRecurringRevenue: { + __typename: 'Currency', + amountMicros: null, + currencyCode: null, + }, + }, +]; diff --git a/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockDefinitions.ts b/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockDefinitions.ts new file mode 100644 index 0000000000..586ab4ba95 --- /dev/null +++ b/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockDefinitions.ts @@ -0,0 +1,344 @@ +import { FilterDefinition } from '@/ui/object/object-filter-dropdown/types/FilterDefinition'; +import { SortDefinition } from '@/ui/object/object-sort-dropdown/types/SortDefinition'; +import { ColumnDefinition } from '@/ui/object/record-table/types/ColumnDefinition'; + +export const signInBackgroundMockColumnDefinitions = [ + { + position: 0, + fieldMetadataId: '20202020-5e4e-4007-a630-8a2617914889', + label: 'Domain Name', + size: 100, + type: 'TEXT', + metadata: { + fieldName: 'domainName', + placeHolder: 'Domain Name', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconLink', + isVisible: true, + }, + { + position: 1, + fieldMetadataId: '20202020-7fbd-41ad-b64d-25a15ff62f04', + label: 'Employees', + size: 100, + type: 'NUMBER', + metadata: { + fieldName: 'employees', + placeHolder: 'Employees', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconUsers', + isVisible: true, + }, + { + position: 2, + fieldMetadataId: '20202020-6d30-4111-9f40-b4301906fd3c', + label: 'Name', + size: 100, + type: 'TEXT', + metadata: { + fieldName: 'name', + placeHolder: 'Name', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconBuildingSkyscraper', + isVisible: true, + }, + { + position: 3, + fieldMetadataId: '20202020-e7c8-4771-8cc4-ce0e8c36a3c0', + label: 'Favorites', + size: 100, + type: 'RELATION', + metadata: { + fieldName: 'favorites', + placeHolder: 'Favorites', + relationType: 'FROM_MANY_OBJECTS', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconHeart', + isVisible: true, + }, + { + position: 4, + fieldMetadataId: '20202020-ad10-4117-a039-3f04b7a5f939', + label: 'Address', + size: 100, + type: 'TEXT', + metadata: { + fieldName: 'address', + placeHolder: 'Address', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconMap', + isVisible: true, + }, + { + position: 5, + fieldMetadataId: '20202020-0739-495d-8e70-c0807f6b2268', + label: 'Account Owner', + size: 100, + type: 'RELATION', + metadata: { + fieldName: 'accountOwner', + placeHolder: 'Account Owner', + relationType: 'TO_ONE_OBJECT', + relationObjectMetadataNameSingular: 'workspaceMember', + relationObjectMetadataNamePlural: 'workspaceMembers', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconUserCircle', + isVisible: true, + }, + { + position: 6, + fieldMetadataId: '20202020-68b4-4c8e-af19-738eba2a42a5', + label: 'People', + size: 100, + type: 'RELATION', + metadata: { + fieldName: 'people', + placeHolder: 'People', + relationType: 'FROM_MANY_OBJECTS', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconUsers', + isVisible: true, + }, + { + position: 7, + fieldMetadataId: '20202020-61af-4ffd-b79b-baed6db8ad11', + label: 'Attachments', + size: 100, + type: 'RELATION', + metadata: { + fieldName: 'attachments', + placeHolder: 'Attachments', + relationType: 'FROM_MANY_OBJECTS', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconFileImport', + isVisible: true, + }, + { + position: 8, + fieldMetadataId: '20202020-4dc2-47c9-bb15-6e6f19ba9e46', + label: 'Creation date', + size: 100, + type: 'DATE_TIME', + metadata: { + fieldName: 'createdAt', + placeHolder: 'Creation date', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconCalendar', + isVisible: true, + }, + { + position: 9, + fieldMetadataId: '20202020-9e9f-4235-98b2-c76f3e2d281e', + label: 'ICP', + size: 100, + type: 'BOOLEAN', + metadata: { + fieldName: 'idealCustomerProfile', + placeHolder: 'ICP', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconTarget', + isVisible: true, + }, + { + position: 10, + fieldMetadataId: '20202020-a61d-4b78-b998-3fd88b4f73a1', + label: 'Linkedin', + size: 100, + type: 'LINK', + metadata: { + fieldName: 'linkedinLink', + placeHolder: 'Linkedin', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconBrandLinkedin', + isVisible: true, + }, + { + position: 11, + fieldMetadataId: '20202020-e3fc-46ff-b552-3e757843f06e', + label: 'Opportunities', + size: 100, + type: 'RELATION', + metadata: { + fieldName: 'opportunities', + placeHolder: 'Opportunities', + relationType: 'FROM_MANY_OBJECTS', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconTargetArrow', + isVisible: true, + }, + { + position: 12, + fieldMetadataId: '20202020-46e3-479a-b8f4-77137c74daa6', + label: 'X', + size: 100, + type: 'LINK', + metadata: { + fieldName: 'xLink', + placeHolder: 'X', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconBrandX', + isVisible: true, + }, + { + position: 13, + fieldMetadataId: '20202020-4a2e-4b41-8562-279963e8947e', + label: 'Activities', + size: 100, + type: 'RELATION', + metadata: { + fieldName: 'activityTargets', + placeHolder: 'Activities', + relationType: 'FROM_MANY_OBJECTS', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconCheckbox', + isVisible: true, + }, + { + position: 14, + fieldMetadataId: '20202020-4a5a-466f-92d9-c3870d9502a9', + label: 'ARR', + size: 100, + type: 'CURRENCY', + metadata: { + fieldName: 'annualRecurringRevenue', + placeHolder: 'ARR', + relationObjectMetadataNameSingular: '', + relationObjectMetadataNamePlural: '', + objectMetadataNameSingular: 'company', + }, + iconName: 'IconMoneybag', + isVisible: true, + }, +] as ColumnDefinition[]; + +export const signInBackgroundMockFilterDefinitions = [ + { + fieldMetadataId: '20202020-5e4e-4007-a630-8a2617914889', + label: 'Domain Name', + iconName: 'IconLink', + type: 'TEXT', + }, + { + fieldMetadataId: '20202020-7fbd-41ad-b64d-25a15ff62f04', + label: 'Employees', + iconName: 'IconUsers', + type: 'NUMBER', + }, + { + fieldMetadataId: '20202020-6d30-4111-9f40-b4301906fd3c', + label: 'Name', + iconName: 'IconBuildingSkyscraper', + type: 'TEXT', + }, + { + fieldMetadataId: '20202020-ad10-4117-a039-3f04b7a5f939', + label: 'Address', + iconName: 'IconMap', + type: 'TEXT', + }, + { + fieldMetadataId: '20202020-0739-495d-8e70-c0807f6b2268', + label: 'Account Owner', + iconName: 'IconUserCircle', + relationObjectMetadataNamePlural: 'workspaceMembers', + relationObjectMetadataNameSingular: 'workspaceMember', + type: 'RELATION', + }, + { + fieldMetadataId: '20202020-4dc2-47c9-bb15-6e6f19ba9e46', + label: 'Creation date', + iconName: 'IconCalendar', + type: 'DATE_TIME', + }, + { + fieldMetadataId: '20202020-a61d-4b78-b998-3fd88b4f73a1', + label: 'Linkedin', + iconName: 'IconBrandLinkedin', + type: 'LINK', + }, + { + fieldMetadataId: '20202020-46e3-479a-b8f4-77137c74daa6', + label: 'X', + iconName: 'IconBrandX', + type: 'LINK', + }, + { + fieldMetadataId: '20202020-4a5a-466f-92d9-c3870d9502a9', + label: 'ARR', + iconName: 'IconMoneybag', + type: 'CURRENCY', + }, +] as FilterDefinition[]; + +export const signInBackgroundMockSortDefinitions = [ + { + fieldMetadataId: '20202020-5e4e-4007-a630-8a2617914889', + label: 'Domain Name', + iconName: 'IconLink', + }, + { + fieldMetadataId: '20202020-7fbd-41ad-b64d-25a15ff62f04', + label: 'Employees', + iconName: 'IconUsers', + }, + { + fieldMetadataId: '20202020-6d30-4111-9f40-b4301906fd3c', + label: 'Name', + iconName: 'IconBuildingSkyscraper', + }, + { + fieldMetadataId: '20202020-ad10-4117-a039-3f04b7a5f939', + label: 'Address', + iconName: 'IconMap', + }, + { + fieldMetadataId: '20202020-4dc2-47c9-bb15-6e6f19ba9e46', + label: 'Creation date', + iconName: 'IconCalendar', + }, + { + fieldMetadataId: '20202020-9e9f-4235-98b2-c76f3e2d281e', + label: 'ICP', + iconName: 'IconTarget', + }, +] as SortDefinition[]; diff --git a/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockMetadataItems.ts b/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockMetadataItems.ts new file mode 100644 index 0000000000..00e7cf7b55 --- /dev/null +++ b/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockMetadataItems.ts @@ -0,0 +1,400 @@ +export const metadataItem = { + __typename: 'object', + id: '20202020-480c-434e-b4c7-e22408b97047', + dataSourceId: '20202020-7f63-47a9-b1b3-6c7290ca9fb1', + nameSingular: 'company', + namePlural: 'companies', + labelSingular: 'Company', + labelPlural: 'Companies', + description: 'A company', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: false, + createdAt: '2023-11-23T15:38:02.187Z', + updatedAt: '2023-11-23T15:38:02.187Z', + fields: [ + { + __typename: 'field', + id: '20202020-5e4e-4007-a630-8a2617914889', + type: 'TEXT', + name: 'domainName', + label: 'Domain Name', + description: + 'The company website URL. We use this url to fetch the company icon', + icon: 'IconLink', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-64b8-41bf-a01c-be6a806e8b70', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-7fbd-41ad-b64d-25a15ff62f04', + type: 'NUMBER', + name: 'employees', + label: 'Employees', + description: 'Number of employees in the company', + icon: 'IconUsers', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-6d30-4111-9f40-b4301906fd3c', + type: 'TEXT', + name: 'name', + label: 'Name', + description: 'The company name', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-e7c8-4771-8cc4-ce0e8c36a3c0', + type: 'RELATION', + name: 'favorites', + label: 'Favorites', + description: 'Favorites linked to the company', + icon: 'IconHeart', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: { + __typename: 'relation', + id: '73d9610a-a196-4186-b5b2-9a1da2d3bede', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '20202020-90e4-4701-a350-8ab75e23e3b8', + dataSourceId: '20202020-7f63-47a9-b1b3-6c7290ca9fb1', + nameSingular: 'favorite', + namePlural: 'favorites', + }, + toFieldMetadataId: '20202020-09e1-4384-ae3e-39e7956396ff', + }, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-ad10-4117-a039-3f04b7a5f939', + type: 'TEXT', + name: 'address', + label: 'Address', + description: 'The company address', + icon: 'IconMap', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-0739-495d-8e70-c0807f6b2268', + type: 'RELATION', + name: 'accountOwner', + label: 'Account Owner', + description: + 'Your team member responsible for managing the company account', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '729283e1-8134-494d-9df5-24a44e92c38b', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '20202020-b550-40bb-a96b-9ab54b664753', + dataSourceId: '20202020-7f63-47a9-b1b3-6c7290ca9fb1', + nameSingular: 'workspaceMember', + namePlural: 'workspaceMembers', + }, + fromFieldMetadataId: '20202020-41bb-4c17-8979-40fa915df9e1', + }, + }, + { + __typename: 'field', + id: '20202020-68b4-4c8e-af19-738eba2a42a5', + type: 'RELATION', + name: 'people', + label: 'People', + description: 'People linked to the company.', + icon: 'IconUsers', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: { + __typename: 'relation', + id: '8256c11a-710d-48b5-bc86-f607895abec4', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '20202020-c64b-44bc-bd2c-502c99f49dca', + dataSourceId: '20202020-7f63-47a9-b1b3-6c7290ca9fb1', + nameSingular: 'person', + namePlural: 'people', + }, + toFieldMetadataId: '20202020-64e1-4080-b6ad-db03c3809885', + }, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-61af-4ffd-b79b-baed6db8ad11', + type: 'RELATION', + name: 'attachments', + label: 'Attachments', + description: 'Attachments linked to the company.', + icon: 'IconFileImport', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: { + __typename: 'relation', + id: '54c7c707-09f8-4ce0-b2f6-0161443fffa8', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '20202020-5f98-4317-915d-3779bb821be2', + dataSourceId: '20202020-7f63-47a9-b1b3-6c7290ca9fb1', + nameSingular: 'attachment', + namePlural: 'attachments', + }, + toFieldMetadataId: '20202020-5463-4d03-9124-1775b9b7f955', + }, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-4dc2-47c9-bb15-6e6f19ba9e46', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: false, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-9e9f-4235-98b2-c76f3e2d281e', + type: 'BOOLEAN', + name: 'idealCustomerProfile', + label: 'ICP', + description: + 'Ideal Customer Profile: Indicates whether the company is the most suitable and valuable customer for you', + icon: 'IconTarget', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-8169-44a3-9e0b-6bad1ac50f87', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-a61d-4b78-b998-3fd88b4f73a1', + type: 'LINK', + name: 'linkedinLink', + label: 'Linkedin', + description: 'The company Linkedin account', + icon: 'IconBrandLinkedin', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-e3fc-46ff-b552-3e757843f06e', + type: 'RELATION', + name: 'opportunities', + label: 'Opportunities', + description: 'Opportunities linked to the company.', + icon: 'IconTargetArrow', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: { + __typename: 'relation', + id: '831b6b14-125c-4563-83a3-99d5e07c0a85', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '20202020-cae9-4ff4-9579-f7d9fe44c937', + dataSourceId: '20202020-7f63-47a9-b1b3-6c7290ca9fb1', + nameSingular: 'opportunity', + namePlural: 'opportunities', + }, + toFieldMetadataId: '20202020-31d5-4af5-b016-c61c1c265706', + }, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-0b9e-4b9e-8b0a-5b0b5b0b5b0b', + type: 'UUID', + name: 'accountOwnerId', + label: 'Account Owner ID (foreign key)', + description: 'Foreign key for account owner', + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-46e3-479a-b8f4-77137c74daa6', + type: 'LINK', + name: 'xLink', + label: 'X', + description: 'The company Twitter/X account', + icon: 'IconBrandX', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-4a2e-4b41-8562-279963e8947e', + type: 'RELATION', + name: 'activityTargets', + label: 'Activities', + description: 'Activities tied to the company', + icon: 'IconCheckbox', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: { + __typename: 'relation', + id: '56e2ab44-4718-4c05-b61c-a7f978d7bdd1', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '20202020-439a-4a41-83a3-3cda03d01d38', + dataSourceId: '20202020-7f63-47a9-b1b3-6c7290ca9fb1', + nameSingular: 'activityTarget', + namePlural: 'activityTargets', + }, + toFieldMetadataId: '20202020-9408-4cc0-9fe1-51467edb530b', + }, + toRelationMetadata: null, + }, + { + __typename: 'field', + id: '20202020-4a5a-466f-92d9-c3870d9502a9', + type: 'CURRENCY', + name: 'annualRecurringRevenue', + label: 'ARR', + description: + 'Annual Recurring Revenue: The actual or estimated annual revenue of the company', + icon: 'IconMoneybag', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-11-23T15:38:02.292Z', + updatedAt: '2023-11-23T15:38:02.292Z', + fromRelationMetadata: null, + toRelationMetadata: null, + }, + ], +}; diff --git a/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockViewFields.ts b/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockViewFields.ts new file mode 100644 index 0000000000..ac927950ce --- /dev/null +++ b/front/src/modules/sign-in-background-mock/constants/signInBackgroundMockViewFields.ts @@ -0,0 +1,86 @@ +import { ViewField } from '@/views/types/ViewField'; + +export const signInBackgroundMockViewFields = [ + { + __typename: 'ViewField', + id: '5168be09-f200-40f5-9e04-29d607de06e5', + fieldMetadataId: '20202020-7fbd-41ad-b64d-25a15ff62f04', + size: 150, + createdAt: '2023-11-23T15:38:03.706Z', + viewId: '20202020-2441-4424-8163-4002c523d415', + position: 4, + isVisible: true, + updatedAt: '2023-11-23T15:38:03.706Z', + }, + { + __typename: 'ViewField', + id: '5ece850b-76fd-4135-9b99-06d49cad14ae', + fieldMetadataId: '20202020-a61d-4b78-b998-3fd88b4f73a1', + size: 170, + createdAt: '2023-11-23T15:38:03.706Z', + viewId: '20202020-2441-4424-8163-4002c523d415', + position: 5, + isVisible: true, + updatedAt: '2023-11-23T15:38:03.706Z', + }, + { + __typename: 'ViewField', + id: '604dbdbb-df01-4e47-921b-f9963109f912', + fieldMetadataId: '20202020-0739-495d-8e70-c0807f6b2268', + size: 150, + createdAt: '2023-11-23T15:38:03.706Z', + viewId: '20202020-2441-4424-8163-4002c523d415', + position: 2, + isVisible: true, + updatedAt: '2023-11-23T15:38:03.706Z', + }, + { + __typename: 'ViewField', + id: '7cbc36c8-37c6-4561-8c46-ddb316ddd121', + fieldMetadataId: '20202020-4dc2-47c9-bb15-6e6f19ba9e46', + size: 150, + createdAt: '2023-11-23T15:38:03.706Z', + viewId: '20202020-2441-4424-8163-4002c523d415', + position: 3, + isVisible: true, + updatedAt: '2023-11-23T15:38:03.706Z', + }, + { + __typename: 'ViewField', + id: 'a7d19be3-1ce9-479b-9453-2930a381e07c', + fieldMetadataId: '20202020-5e4e-4007-a630-8a2617914889', + size: 100, + createdAt: '2023-11-23T15:38:03.706Z', + viewId: '20202020-2441-4424-8163-4002c523d415', + position: 1, + isVisible: true, + updatedAt: '2023-11-23T15:38:03.706Z', + }, + { + __typename: 'ViewField', + id: 'cafacdc8-cbfc-4545-8242-94787f144ace', + fieldMetadataId: '20202020-6d30-4111-9f40-b4301906fd3c', + size: 180, + createdAt: '2023-11-23T15:38:03.706Z', + viewId: '20202020-2441-4424-8163-4002c523d415', + position: 0, + isVisible: true, + updatedAt: '2023-11-23T15:38:03.706Z', + }, + { + __typename: 'ViewField', + id: 'f0cc50c9-b9b6-405b-a1c0-23f7698ea731', + fieldMetadataId: '20202020-ad10-4117-a039-3f04b7a5f939', + size: 170, + createdAt: '2023-11-23T15:38:03.706Z', + viewId: '20202020-2441-4424-8163-4002c523d415', + position: 6, + isVisible: true, + updatedAt: '2023-11-23T15:38:03.706Z', + }, +] as (ViewField & { + __typename: string; + createdAt: string; + viewId: string; + updatedAt: string; +})[]; diff --git a/front/src/modules/ui/layout/page/DefaultLayout.tsx b/front/src/modules/ui/layout/page/DefaultLayout.tsx index 80755a03f5..b390e677f1 100644 --- a/front/src/modules/ui/layout/page/DefaultLayout.tsx +++ b/front/src/modules/ui/layout/page/DefaultLayout.tsx @@ -7,10 +7,10 @@ import { useOnboardingStatus } from '@/auth/hooks/useOnboardingStatus'; import { OnboardingStatus } from '@/auth/utils/getOnboardingStatus'; import { CommandMenu } from '@/command-menu/components/CommandMenu'; import { KeyboardShortcutMenu } from '@/keyboard-shortcut-menu/components/KeyboardShortcutMenu'; +import { SignInBackgroundMockPage } from '@/sign-in-background-mock/components/SignInBackgroundMockPage'; import { NavbarAnimatedContainer } from '@/ui/navigation/navbar/components/NavbarAnimatedContainer'; import { MOBILE_VIEWPORT } from '@/ui/theme/constants/theme'; import { AppNavbar } from '~/AppNavbar'; -import { CompaniesMockMode } from '~/pages/companies/CompaniesMockMode'; import { isNavbarOpenedState } from '../states/isNavbarOpenedState'; @@ -66,7 +66,7 @@ export const DefaultLayout = ({ children }: DefaultLayoutProps) => { {onboardingStatus && onboardingStatus !== OnboardingStatus.Completed ? ( <> - + {children} diff --git a/front/src/modules/ui/object/record-board/components/RecordBoardColumnDropdownMenu.tsx b/front/src/modules/ui/object/record-board/components/RecordBoardColumnDropdownMenu.tsx index 32aaf762b4..b463fc715b 100644 --- a/front/src/modules/ui/object/record-board/components/RecordBoardColumnDropdownMenu.tsx +++ b/front/src/modules/ui/object/record-board/components/RecordBoardColumnDropdownMenu.tsx @@ -3,9 +3,6 @@ import styled from '@emotion/styled'; import { Key } from 'ts-key-enum'; import { IconArrowLeft, IconArrowRight, IconPencil } from '@/ui/display/icon'; -import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; -import { relationPickerSearchFilterScopedState } from '@/ui/input/relation-picker/states/relationPickerSearchFilterScopedState'; -import { EntityForSelect } from '@/ui/input/relation-picker/types/EntityForSelect'; import { RelationPickerHotkeyScope } from '@/ui/input/relation-picker/types/RelationPickerHotkeyScope'; import { DropdownMenu } from '@/ui/layout/dropdown/components/DropdownMenu'; import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer'; @@ -13,8 +10,6 @@ import { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem'; import { usePreviousHotkeyScope } from '@/ui/utilities/hotkey/hooks/usePreviousHotkeyScope'; import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys'; import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside'; -import { useRecoilScopedState } from '@/ui/utilities/recoil-scope/hooks/useRecoilScopedState'; -import { logError } from '~/utils/logError'; import { BoardColumnContext } from '../contexts/BoardColumnContext'; import { useBoardColumns } from '../hooks/useBoardColumns'; @@ -48,28 +43,8 @@ export const RecordBoardColumnDropdownMenu = ({ const boardColumnMenuRef = useRef(null); - const { enqueueSnackBar } = useSnackBar(); const { handleMoveBoardColumn } = useBoardColumns(); - const handleCompanySelected = ( - selectedCompany: EntityForSelect | null | undefined, - ) => { - if (!selectedCompany?.id) { - enqueueSnackBar( - 'There was a problem with the company selection, please retry.', - { - variant: 'error', - }, - ); - - logError('There was a problem with the company selection, please retry.'); - return; - } - - //createCompanyProgress(selectedCompany.id, stageId); - closeMenu(); - }; - const { setHotkeyScopeAndMemorizePreviousScope, goBackToPreviousHotkeyScope, @@ -88,12 +63,6 @@ export const RecordBoardColumnDropdownMenu = ({ } setCurrentMenu(menu); }; - const [relationPickerSearchFilter] = useRecoilScopedState( - relationPickerSearchFilterScopedState, - ); - // const companies = useFilteredSearchCompanyQuery({ - // searchFilter: relationPickerSearchFilter, - // }); useListenClickOutside({ refs: [boardColumnMenuRef], diff --git a/front/src/modules/views/components/ViewsDropdownButton.tsx b/front/src/modules/views/components/ViewsDropdownButton.tsx index 36a80548d2..7631afe9d7 100644 --- a/front/src/modules/views/components/ViewsDropdownButton.tsx +++ b/front/src/modules/views/components/ViewsDropdownButton.tsx @@ -138,7 +138,7 @@ export const ViewsDropdownButton = ({ clickableComponent={ - {currentView?.name} + {currentView?.name ?? 'All'} ยท {entityCountInCurrentView}{' '} diff --git a/front/src/pages/companies/CompaniesMockMode.tsx b/front/src/pages/companies/CompaniesMockMode.tsx deleted file mode 100644 index f7d276c473..0000000000 --- a/front/src/pages/companies/CompaniesMockMode.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import styled from '@emotion/styled'; - -import { IconBuildingSkyscraper } from '@/ui/display/icon'; -import { PageBody } from '@/ui/layout/page/PageBody'; -import { PageContainer } from '@/ui/layout/page/PageContainer'; -import { PageHeader } from '@/ui/layout/page/PageHeader'; - -const StyledTableContainer = styled.div` - display: flex; - width: 100%; -`; - -export const CompaniesMockMode = () => { - return ( - - - - - - - ); -}; diff --git a/front/src/pages/not-found/NotFound.tsx b/front/src/pages/not-found/NotFound.tsx index 535888dc9d..5be23a23d2 100644 --- a/front/src/pages/not-found/NotFound.tsx +++ b/front/src/pages/not-found/NotFound.tsx @@ -1,11 +1,10 @@ import { useNavigate } from 'react-router-dom'; import styled from '@emotion/styled'; +import { SignInBackgroundMockPage } from '@/sign-in-background-mock/components/SignInBackgroundMockPage'; import { MainButton } from '@/ui/input/button/components/MainButton'; import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile'; -import { CompaniesMockMode } from '../companies/CompaniesMockMode'; - const StyledBackDrop = styled.div` align-items: center; backdrop-filter: ${({ theme }) => theme.blur.light}; @@ -64,7 +63,7 @@ export const NotFound = () => { /> - + ); };