The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fixes before deploy (#1167)
Charles Bochetfb0f9b78075a
diff --git a/front/src/modules/auth/components/Logo.tsx b/front/src/modules/auth/components/Logo.tsxindex 0d60d69bcab..d12b997a088 100644--- a/front/src/modules/auth/components/Logo.tsx+++ b/front/src/modules/auth/components/Logo.tsx@@ -6,40 +6,62 @@ type Props = React.ComponentProps<'div'> & {workspaceLogo?: string | null;};-const StyledLogo = styled.div`+const StyledContainer = styled.div`height: 48px;margin-bottom: ${({ theme }) => theme.spacing(4)};margin-top: ${({ theme }) => theme.spacing(4)};- img {- height: 100%;- width: 100%;- }-position: relative;width: 48px;`;-type StyledWorkspaceLogoProps = {+const StyledTwentyLogo = styled.img`+ border-radius: ${({ theme }) => theme.border.radius.xs};+ height: 24px;+ width: 24px;+`;++const StyledTwentyLogoContainer = styled.div`+ align-items: center;+ background-color: ${({ theme }) => theme.background.primary};+ border-radius: ${({ theme }) => theme.border.radius.sm};+ bottom: ${({ theme }) => `-${theme.spacing(3)}`};+ display: flex;+ height: 28px;+ justify-content: center;++ position: absolute;+ right: ${({ theme }) => `-${theme.spacing(3)}`};+ width: 28px;+`;++type StyledMainLogoProps = {logo?: string | null;};-const StyledWorkspaceLogo = styled.div<StyledWorkspaceLogoProps>`+const StyledMainLogo = styled.div<StyledMainLogoProps>`background: url(${(props) => props.logo});background-size: cover;- border-radius: ${({ theme }) => theme.border.radius.xs};- bottom: ${({ theme }) => `-${theme.spacing(3)}`};- height: ${({ theme }) => theme.spacing(6)};- position: absolute;- right: ${({ theme }) => `-${theme.spacing(3)}`};- width: ${({ theme }) => theme.spacing(6)};+ height: 100%;++ width: 100%;`;export function Logo({ workspaceLogo, ...props }: Props) {+ if (!workspaceLogo) {+ return (+ <StyledContainer {...props}>+ <StyledMainLogo logo="/icons/android/android-launchericon-192-192.png" />+ </StyledContainer>+ );+ }+return (- <StyledLogo {...props}>- <StyledWorkspaceLogo logo={getImageAbsoluteURIOrBase64(workspaceLogo)} />- <img src="/icons/android/android-launchericon-192-192.png" alt="logo" />- </StyledLogo>+ <StyledContainer {...props}>+ <StyledMainLogo logo={getImageAbsoluteURIOrBase64(workspaceLogo)} />+ <StyledTwentyLogoContainer>+ <StyledTwentyLogo src="/icons/android/android-launchericon-192-192.png" />+ </StyledTwentyLogoContainer>+ </StyledContainer>);}diff --git a/front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx b/front/src/modules/auth/sign-in-up/components/SignInUpForm.tsxindex 614893a8d48..489b2b188d9 100644--- a/front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx+++ b/front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx@@ -76,7 +76,7 @@ export function SignInUpForm() {const title = useMemo(() => {if (signInUpMode === SignInUpMode.Invite) {- return `Join ${workspace?.displayName ?? ''} Team`;+ return `Join ${workspace?.displayName ?? ''} team`;}return signInUpMode === SignInUpMode.SignIndiff --git a/front/src/modules/companies/components/CompanyTeam.tsx b/front/src/modules/companies/components/CompanyTeam.tsxindex eb7e057b24d..a65d7e08148 100644--- a/front/src/modules/companies/components/CompanyTeam.tsx+++ b/front/src/modules/companies/components/CompanyTeam.tsx@@ -12,6 +12,7 @@ const StyledContainer = styled.div`display: flex;flex-direction: column;gap: ${({ theme }) => theme.spacing(2)};+ margin-bottom: ${({ theme }) => theme.spacing(2)};`;const StyledTitleContainer = styled.div`@@ -32,7 +33,6 @@ const StyledListContainer = styled.div`border-radius: ${({ theme }) => theme.spacing(1)};display: flex;flex-direction: column;- max-height: ${({ theme }) => theme.spacing(35)};overflow: auto;width: 100%;`;diff --git a/front/src/modules/ui/board/components/EntityBoardColumn.tsx b/front/src/modules/ui/board/components/EntityBoardColumn.tsxindex 1c3202f640b..2bd8ab7bfd4 100644--- a/front/src/modules/ui/board/components/EntityBoardColumn.tsx+++ b/front/src/modules/ui/board/components/EntityBoardColumn.tsx@@ -91,16 +91,13 @@ export function EntityBoardColumn({/></BoardCardIdContext.Provider>))}- <Draggable draggableId={`new-${column.id}`} index={cardIds.length}>+ <Draggable+ draggableId={`new-${column.id}`}+ index={cardIds.length}+ isDragDisabled={true}+ >{(draggableProvided) => (- <div- ref={draggableProvided?.innerRef}- {...{- ...draggableProvided.dragHandleProps,- draggable: false,- }}- {...draggableProvided?.draggableProps}- >+ <div ref={draggableProvided?.innerRef}><StyledNewCardButtonContainer><RecoilScope>{boardOptions.newCardComponent}</RecoilScope></StyledNewCardButtonContainer>diff --git a/front/src/modules/ui/input/checkbox/components/Checkbox.tsx b/front/src/modules/ui/input/checkbox/components/Checkbox.tsxindex 4caec57171d..82c2ed4b3c6 100644--- a/front/src/modules/ui/input/checkbox/components/Checkbox.tsx+++ b/front/src/modules/ui/input/checkbox/components/Checkbox.tsx@@ -38,6 +38,7 @@ const StyledInput = styled.input<{variant: CheckboxVariant;indeterminate?: boolean;shape?: CheckboxShape;+ isChecked: boolean;}>`cursor: pointer;margin: 0;@@ -79,9 +80,11 @@ const StyledInput = styled.input<{width: var(--size);}- &:checked + label:before {- background: ${({ theme }) => theme.color.blue};- border-color: ${({ theme }) => theme.color.blue};+ & + label:before {+ background: ${({ theme, isChecked }) =>+ isChecked ? theme.color.blue : 'inherit'};+ border-color: ${({ theme, isChecked }) =>+ isChecked ? theme.color.blue : 'inherit'};}& + label > svg {@@ -112,7 +115,6 @@ export function Checkbox({React.useEffect(() => {setIsInternalChecked(checked);}, [checked]);-function handleChange(value: boolean) {onChange?.(value);setIsInternalChecked(!isInternalChecked);@@ -130,6 +132,7 @@ export function Checkbox({variant={variant}checkboxSize={size}shape={shape}+ isChecked={isInternalChecked}onChange={(event) => handleChange(event.target.checked)}/><label htmlFor="checkbox">diff --git a/front/src/modules/ui/layout/components/DefaultLayout.tsx b/front/src/modules/ui/layout/components/DefaultLayout.tsxindex 3446cbe3f6c..1a4ded19adc 100644--- a/front/src/modules/ui/layout/components/DefaultLayout.tsx+++ b/front/src/modules/ui/layout/components/DefaultLayout.tsx@@ -19,7 +19,20 @@ const StyledLayout = styled.div`flex-direction: row;height: 100vh;position: relative;+ scrollbar-color: ${({ theme }) => theme.border.color.medium};++ scrollbar-width: 4px;width: 100vw;++ *::-webkit-scrollbar {+ height: 4px;+ width: 4px;+ }++ *::-webkit-scrollbar-thumb {+ background-color: ${({ theme }) => theme.border.color.medium};+ border-radius: ${({ theme }) => theme.border.radius.sm};+ }`;const NAVBAR_WIDTH = '236px';diff --git a/front/src/modules/ui/layout/show-page/components/ShowPageLeftContainer.tsx b/front/src/modules/ui/layout/show-page/components/ShowPageLeftContainer.tsxindex 86313cd8393..762392f0c57 100644--- a/front/src/modules/ui/layout/show-page/components/ShowPageLeftContainer.tsx+++ b/front/src/modules/ui/layout/show-page/components/ShowPageLeftContainer.tsx@@ -14,6 +14,7 @@ export const ShowPageLeftContainer = styled.div`display: flex;flex-direction: column;gap: ${({ theme }) => theme.spacing(3)};+ overflow-y: scroll;padding: 0px ${({ theme }) => theme.spacing(3)};width: ${({ theme }) => {const isMobile = useIsMobile();diff --git a/infra/dev/postgres/init.sql b/infra/dev/postgres/init.sqlindex a1010c86806..406cf8185b2 100644--- a/infra/dev/postgres/init.sql+++ b/infra/dev/postgres/init.sql@@ -6,3 +6,4 @@ CREATE DATABASE "test";-- Create a twenty userCREATE USER twenty PASSWORD 'twenty';+ALTER USER twenty CREATEDB;diff --git a/server/src/database/migrations/20230809143432_add_views_table/migration.sql b/server/src/database/migrations/20230809143432_add_views_table/migration.sqlindex af100b9413c..08c77e595b2 100644--- a/server/src/database/migrations/20230809143432_add_views_table/migration.sql+++ b/server/src/database/migrations/20230809143432_add_views_table/migration.sql@@ -27,12 +27,6 @@ CREATE UNIQUE INDEX "views_workspaceId_type_objectId_name_key" ON "views"("works-- CreateIndexCREATE UNIQUE INDEX "viewFields_workspaceId_viewId_objectName_fieldName_key" ON "viewFields"("workspaceId", "viewId", "objectName", "fieldName");--- AddForeignKey--- ALTER TABLE "pipeline_progresses" ADD CONSTRAINT "pipeline_progresses_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "companies"("id") ON DELETE SET NULL ON UPDATE CASCADE;---- AddForeignKey--- ALTER TABLE "pipeline_progresses" ADD CONSTRAINT "pipeline_progresses_personId_fkey" FOREIGN KEY ("personId") REFERENCES "people"("id") ON DELETE SET NULL ON UPDATE CASCADE;--- AddForeignKeyALTER TABLE "views" ADD CONSTRAINT "views_workspaceId_fkey" FOREIGN KEY ("workspaceId") REFERENCES "workspaces"("id") ON DELETE RESTRICT ON UPDATE CASCADE;diff --git a/server/src/database/schema.prisma b/server/src/database/schema.prismaindex b02c78a93de..24a42be0253 100644--- a/server/src/database/schema.prisma+++ b/server/src/database/schema.prisma@@ -282,7 +282,7 @@ model Person {/// @Validator.IsOptional()avatarUrl String?- company Company? @relation(fields: [companyId], references: [id])+ company Company? @relation(fields: [companyId], references: [id], onDelete: SetNull)companyId String?/// @TypeGraphQL.omit(input: true, output: true)workspace Workspace @relation(fields: [workspaceId], references: [id])@@ -407,10 +407,10 @@ model ActivityTarget {workspaceId StringpersonId String?- person Person? @relation(fields: [personId], references: [id])+ person Person? @relation(fields: [personId], references: [id], onDelete: Cascade)companyId String?- company Company? @relation(fields: [companyId], references: [id])+ company Company? @relation(fields: [companyId], references: [id], onDelete: Cascade)/// @TypeGraphQL.omit(input: true, output: true)deletedAt DateTime?@@ -514,10 +514,10 @@ model PipelineProgress {updatedAt DateTime @updatedAtcompanyId String?- company Company? @relation(fields: [companyId], references: [id])+ company Company? @relation(fields: [companyId], references: [id], onDelete: Cascade)personId String?- person Person? @relation(fields: [personId], references: [id])+ person Person? @relation(fields: [personId], references: [id], onDelete: Cascade)@@map("pipeline_progresses")}