diff --git a/docs/src/ui/SandpackEditor.js b/docs/src/ui/SandpackEditor.js index f1b063d1a6..68fc7aded7 100644 --- a/docs/src/ui/SandpackEditor.js +++ b/docs/src/ui/SandpackEditor.js @@ -46,8 +46,6 @@ root.render( import { lightTheme, darkTheme } from "${availableComponentPaths[0]}"; import { MyComponent } from "./MyComponent.tsx"; -console.log("lightTheme", lightTheme); - export default function App() { return ( diff --git a/front/src/modules/object-record/components/RecordShowPage.tsx b/front/src/modules/object-record/components/RecordShowPage.tsx index 8f0d30daa8..e69e7b4a6f 100644 --- a/front/src/modules/object-record/components/RecordShowPage.tsx +++ b/front/src/modules/object-record/components/RecordShowPage.tsx @@ -35,9 +35,11 @@ export const RecordShowPage = () => { objectMetadataId: string; }>(); - const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem({ - objectNameSingular, - }); + const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem( + { + objectNameSingular, + }, + ); const { favorites, createFavorite, deleteFavorite } = useFavorites({ objectNamePlural: foundObjectMetadataItem?.namePlural, diff --git a/front/src/modules/object-record/components/RecordTableContainer.tsx b/front/src/modules/object-record/components/RecordTableContainer.tsx index 0ba98bf7e6..d4f243bf34 100644 --- a/front/src/modules/object-record/components/RecordTableContainer.tsx +++ b/front/src/modules/object-record/components/RecordTableContainer.tsx @@ -32,9 +32,11 @@ export const RecordTableContainer = ({ }: { objectNamePlural: string; }) => { - const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem({ - objectNamePlural, - }); + const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem( + { + objectNamePlural, + }, + ); const { columnDefinitions } = useComputeDefinitionsFromFieldMetadata( foundObjectMetadataItem, ); diff --git a/front/src/modules/object-record/hooks/useFindManyObjectRecords.ts b/front/src/modules/object-record/hooks/useFindManyObjectRecords.ts index 029a2db70b..a0ade1487f 100644 --- a/front/src/modules/object-record/hooks/useFindManyObjectRecords.ts +++ b/front/src/modules/object-record/hooks/useFindManyObjectRecords.ts @@ -48,11 +48,14 @@ export const useFindManyObjectRecords = < isFetchingMoreObjectsFamilyState(objectNamePlural), ); - const { objectMetadataItem: foundObjectMetadataItem, objectNotFoundInMetadata, findManyQuery } = - useObjectMetadataItem({ - objectNamePlural, - skip, - }); + const { + objectMetadataItem: foundObjectMetadataItem, + objectNotFoundInMetadata, + findManyQuery, + } = useObjectMetadataItem({ + objectNamePlural, + skip, + }); const { enqueueSnackBar } = useSnackBar(); diff --git a/front/src/modules/object-record/hooks/useFindOneObjectRecord.ts b/front/src/modules/object-record/hooks/useFindOneObjectRecord.ts index ec35f22248..6d74718576 100644 --- a/front/src/modules/object-record/hooks/useFindOneObjectRecord.ts +++ b/front/src/modules/object-record/hooks/useFindOneObjectRecord.ts @@ -15,10 +15,13 @@ export const useFindOneObjectRecord = < onCompleted?: (data: ObjectType) => void; skip?: boolean; }) => { - const { objectMetadataItem: foundObjectMetadataItem, objectNotFoundInMetadata, findOneQuery } = - useObjectMetadataItem({ - objectNameSingular, - }); + const { + objectMetadataItem: foundObjectMetadataItem, + objectNotFoundInMetadata, + findOneQuery, + } = useObjectMetadataItem({ + objectNameSingular, + }); const { data, loading, error } = useQuery< { [nameSingular: string]: ObjectType }, diff --git a/front/src/modules/object-record/hooks/useObjectRecordTable.ts b/front/src/modules/object-record/hooks/useObjectRecordTable.ts index 0824ac7737..84106e4bea 100644 --- a/front/src/modules/object-record/hooks/useObjectRecordTable.ts +++ b/front/src/modules/object-record/hooks/useObjectRecordTable.ts @@ -14,9 +14,11 @@ import { useFindManyObjectRecords } from './useFindManyObjectRecords'; export const useObjectRecordTable = () => { const { scopeId: objectNamePlural } = useRecordTable(); - const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem({ - objectNamePlural, - }); + const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem( + { + objectNamePlural, + }, + ); const { registerOptimisticEffect } = useOptimisticEffect({ objectNameSingular: foundObjectMetadataItem?.nameSingular, diff --git a/front/src/modules/object-record/hooks/useRecordTableContextMenuEntries.tsx b/front/src/modules/object-record/hooks/useRecordTableContextMenuEntries.tsx index 01b894a32f..fbd04c1c52 100644 --- a/front/src/modules/object-record/hooks/useRecordTableContextMenuEntries.tsx +++ b/front/src/modules/object-record/hooks/useRecordTableContextMenuEntries.tsx @@ -29,9 +29,11 @@ export const useRecordTableContextMenuEntries = () => { const { scopeId: objectNamePlural, resetTableRowSelection } = useRecordTable(); - const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem({ - objectNamePlural, - }); + const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem( + { + objectNamePlural, + }, + ); const { createFavorite, deleteFavorite, favorites } = useFavorites({ objectNamePlural, diff --git a/front/src/modules/object-record/utils/mapPaginatedObjectsToObjects.ts b/front/src/modules/object-record/utils/mapPaginatedObjectsToObjects.ts index f29669678f..7ba7d8f535 100644 --- a/front/src/modules/object-record/utils/mapPaginatedObjectsToObjects.ts +++ b/front/src/modules/object-record/utils/mapPaginatedObjectsToObjects.ts @@ -15,7 +15,6 @@ export const mapPaginatedObjectsToObjects = < pagedObjects: ObjectTypeQuery | undefined; objectNamePlural: string; }) => { - console.log(objectNamePlural); const formattedObjects: ObjectType[] = pagedObjects?.[objectNamePlural].edges.map((objectEdge: ObjectEdge) => ({ ...objectEdge.node, diff --git a/front/src/modules/people/hooks/useSpreadsheetPersonImport.ts b/front/src/modules/people/hooks/useSpreadsheetPersonImport.ts index 003cda2e51..6954ea43d1 100644 --- a/front/src/modules/people/hooks/useSpreadsheetPersonImport.ts +++ b/front/src/modules/people/hooks/useSpreadsheetPersonImport.ts @@ -1,8 +1,5 @@ -import { v4 as uuidv4 } from 'uuid'; - import { useSpreadsheetImport } from '@/spreadsheet-import/hooks/useSpreadsheetImport'; import { SpreadsheetOptions } from '@/spreadsheet-import/types'; -import { useSnackBar } from '@/ui/feedback/snack-bar/hooks/useSnackBar'; import { fieldsForPerson } from '../utils/fieldsForPerson'; @@ -10,7 +7,6 @@ export type FieldPersonMapping = (typeof fieldsForPerson)[number]['key']; export const useSpreadsheetPersonImport = () => { const { openSpreadsheetImport } = useSpreadsheetImport(); - const { enqueueSnackBar } = useSnackBar(); const openPersonSpreadsheetImport = ( options?: Omit< @@ -20,20 +16,19 @@ export const useSpreadsheetPersonImport = () => { ) => { openSpreadsheetImport({ ...options, - onSubmit: async (data) => { + onSubmit: async (_data) => { // TODO: Add better type checking in spreadsheet import later - const createInputs = data.validData.map((person) => ({ - id: uuidv4(), - firstName: person.firstName as string | undefined, - lastName: person.lastName as string | undefined, - email: person.email as string | undefined, - linkedinUrl: person.linkedinUrl as string | undefined, - xUrl: person.xUrl as string | undefined, - jobTitle: person.jobTitle as string | undefined, - phone: person.phone as string | undefined, - city: person.city as string | undefined, - })); - + // const createInputs = data.validData.map((person) => ({ + // id: uuidv4(), + // firstName: person.firstName as string | undefined, + // lastName: person.lastName as string | undefined, + // email: person.email as string | undefined, + // linkedinUrl: person.linkedinUrl as string | undefined, + // xUrl: person.xUrl as string | undefined, + // jobTitle: person.jobTitle as string | undefined, + // phone: person.phone as string | undefined, + // city: person.city as string | undefined, + // })); // TODO : abstract this part for any object // try { // const result = await createManyPerson({ @@ -42,7 +37,6 @@ export const useSpreadsheetPersonImport = () => { // }, // refetchQueries: 'active', // }); - // if (result.errors) { // throw result.errors; // } diff --git a/front/src/modules/ui/object/field/meta-types/display/content-display/components/ChipDisplay.tsx b/front/src/modules/ui/object/field/meta-types/display/content-display/components/ChipDisplay.tsx deleted file mode 100644 index 69590815a7..0000000000 --- a/front/src/modules/ui/object/field/meta-types/display/content-display/components/ChipDisplay.tsx +++ /dev/null @@ -1,34 +0,0 @@ -type ChipDisplayProps = { - displayName: string; - entityId: string | null; - avatarUrlValue?: string; -}; - -export const ChipDisplay = ({ - displayName, - entityId, - avatarUrlValue, -}: ChipDisplayProps) => { - switch (true) { - // case Entity.Company: { - // return ( - // - // ); - // } - // case Entity.Person: { - // return ( - // - // ); - // } - default: - return <> ; - } -}; diff --git a/front/src/modules/ui/object/record-table/components/RecordTableBody.tsx b/front/src/modules/ui/object/record-table/components/RecordTableBody.tsx index b77a5413f9..54dceec1c3 100644 --- a/front/src/modules/ui/object/record-table/components/RecordTableBody.tsx +++ b/front/src/modules/ui/object/record-table/components/RecordTableBody.tsx @@ -22,9 +22,11 @@ export const RecordTableBody = () => { const { scopeId: objectNamePlural } = useRecordTable(); - const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem({ - objectNamePlural, - }); + const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem( + { + objectNamePlural, + }, + ); const [isFetchingMoreObjects] = useRecoilState( isFetchingMoreObjectsFamilyState(foundObjectMetadataItem?.namePlural), diff --git a/front/src/pages/settings/data-model/SettingsNewObject.tsx b/front/src/pages/settings/data-model/SettingsNewObject.tsx index 62e2544be8..34dcf5560c 100644 --- a/front/src/pages/settings/data-model/SettingsNewObject.tsx +++ b/front/src/pages/settings/data-model/SettingsNewObject.tsx @@ -3,7 +3,6 @@ import { useNavigate } from 'react-router-dom'; import { useObjectMetadataItemForSettings } from '@/object-metadata/hooks/useObjectMetadataItemForSettings'; import { getObjectSlug } from '@/object-metadata/utils/getObjectSlug'; -import { useCreateOneObjectRecord } from '@/object-record/hooks/useCreateOneObjectRecord'; import { SaveAndCancelButtons } from '@/settings/components/SaveAndCancelButtons/SaveAndCancelButtons'; import { SettingsHeaderContainer } from '@/settings/components/SettingsHeaderContainer'; import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer'; @@ -31,10 +30,6 @@ export const SettingsNewObject = () => { disabledObjectMetadataItems: disabledObjects, } = useObjectMetadataItemForSettings(); - const { createOneObject: createOneView } = useCreateOneObjectRecord({ - objectNameSingular: 'view', - }); - const [ selectedStandardObjectMetadataIds, setSelectedStandardObjectMetadataIds, diff --git a/front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeys.tsx b/front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeys.tsx index 8c2d248aab..cec9820752 100644 --- a/front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeys.tsx +++ b/front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeys.tsx @@ -47,9 +47,11 @@ export const SettingsDevelopersApiKeys = () => { const { registerOptimisticEffect } = useOptimisticEffect({ objectNameSingular: 'apiKey', }); - const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem({ - objectNameSingular: 'apiKey', - }); + const { objectMetadataItem: foundObjectMetadataItem } = useObjectMetadataItem( + { + objectNameSingular: 'apiKey', + }, + ); const filter = { revokedAt: { is: 'NULL' } }; useFindManyObjectRecords({ objectNamePlural: 'apiKeys', diff --git a/server/src/core/auth/auth.resolver.ts b/server/src/core/auth/auth.resolver.ts index 88b2cdb298..ae205fd146 100644 --- a/server/src/core/auth/auth.resolver.ts +++ b/server/src/core/auth/auth.resolver.ts @@ -126,7 +126,6 @@ export class AuthResolver { @Args() args: ApiKeyTokenInput, @AuthWorkspace() { id: workspaceId }: Workspace, ): Promise { - console.log('toto'); return await this.tokenService.generateApiKeyToken( workspaceId, args.apiKeyId, diff --git a/server/src/core/auth/services/token.service.ts b/server/src/core/auth/services/token.service.ts index 6aaab72d68..3bc084171d 100644 --- a/server/src/core/auth/services/token.service.ts +++ b/server/src/core/auth/services/token.service.ts @@ -55,8 +55,6 @@ export class TokenService { workspaceId: user.defaultWorkspace.id, }; - console.log(jwtPayload); - return { token: this.jwtService.sign(jwtPayload), expiresAt, @@ -79,12 +77,9 @@ export class TokenService { const refreshToken = this.refreshTokenRepository.create(refreshTokenPayload); - console.log(refreshToken); await this.refreshTokenRepository.save(refreshToken); - console.log('toto'); - return { token: this.jwtService.sign(jwtPayload, { secret, diff --git a/server/src/workspace/workspace-query-runner/workspace-query-runner.service.ts b/server/src/workspace/workspace-query-runner/workspace-query-runner.service.ts index d1e6eaaebe..58cf400324 100644 --- a/server/src/workspace/workspace-query-runner/workspace-query-runner.service.ts +++ b/server/src/workspace/workspace-query-runner/workspace-query-runner.service.ts @@ -101,18 +101,10 @@ export class WorkspaceQueryRunnerService { ): Promise { const { workspaceId, targetTableName } = options; - console.log({ - workspaceId, - targetTableName, - }); const query = this.workspaceQueryBuilderFactory.updateOne(args, options); - console.log({ query }); - const result = await this.execute(query, workspaceId); - console.log('HEY'); - return this.parseResult>( result, targetTableName, @@ -160,12 +152,6 @@ export class WorkspaceQueryRunnerService { $$); `); - console.log( - JSON.stringify({ - results, - }), - ); - return results; } @@ -178,8 +164,6 @@ export class WorkspaceQueryRunnerService { const result = graphqlResult?.[0]?.resolve?.data?.[entityKey]; const errors = graphqlResult?.[0]?.resolve?.errors; - console.log('Result : ', graphqlResult?.[0]?.resolve); - if (Array.isArray(errors) && errors.length > 0) { console.error('GraphQL errors', errors); }