The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix active navigation tab + quick workflows fixes (#8567)
Thomas Trompettecdf0240ccb24
diff --git a/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerItemForObjectMetadataItem.tsx b/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerItemForObjectMetadataItem.tsxindex 2d35e2d4a23..94581966a8a 100644--- a/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerItemForObjectMetadataItem.tsx+++ b/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerItemForObjectMetadataItem.tsx@@ -39,7 +39,10 @@ export const NavigationDrawerItemForObjectMetadataItem = ({viewId ? `?view=${viewId}` : ''}`;- const isActive = currentPath === `/objects/${objectMetadataItem.namePlural}`;+ const isActive =+ currentPath === `/objects/${objectMetadataItem.namePlural}` ||+ currentPath.includes(`object/${objectMetadataItem.nameSingular}/`);+const shouldSubItemsBeDisplayed = isActive && objectMetadataViews.length > 1;const sortedObjectMetadataViews = [...objectMetadataViews].sort(diff --git a/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerOpenedSection.tsx b/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerOpenedSection.tsxindex b17ad4c310e..915b882fe77 100644--- a/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerOpenedSection.tsx+++ b/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerOpenedSection.tsx@@ -14,17 +14,22 @@ export const NavigationDrawerOpenedSection = () => {const loading = useIsPrefetchLoading();- const currentObjectNamePlural = useParams().objectNamePlural;-const { activeObjectMetadataItems: workspaceFavoritesObjectMetadataItems } =useFilteredObjectMetadataItemsForWorkspaceFavorites();- if (!currentObjectNamePlural) {+ const {+ objectNamePlural: currentObjectNamePlural,+ objectNameSingular: currentObjectNameSingular,+ } = useParams();++ if (!currentObjectNamePlural && !currentObjectNameSingular) {return;}const objectMetadataItem = filteredActiveObjectMetadataItems.find(- (item) => item.namePlural === currentObjectNamePlural,+ (item) =>+ item.namePlural === currentObjectNamePlural ||+ item.nameSingular === currentObjectNameSingular,);if (!objectMetadataItem) {diff --git a/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerSectionForObjectMetadataItems.tsx b/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerSectionForObjectMetadataItems.tsxindex f90a160b57c..97f2a74523f 100644--- a/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerSectionForObjectMetadataItems.tsx+++ b/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerSectionForObjectMetadataItems.tsx@@ -21,7 +21,6 @@ const StyledObjectsMetaDataItemsWrapper = styled.div`flex-direction: column;gap: ${({ theme }) => theme.betweenSiblingsGap};width: 100%;- margin-bottom: ${({ theme }) => theme.spacing(3)};flex: 1;overflow-y: auto;`;diff --git a/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowContainerTabs.ts b/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowContainerTabs.tsindex 0e2cdf95e0d..3917de656be 100644--- a/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowContainerTabs.ts+++ b/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowContainerTabs.ts@@ -131,7 +131,7 @@ export const useRecordShowContainerTabs = (},[CoreObjectNameSingular.Workflow]: {workflow: {- title: 'Workflow',+ title: 'Flow',position: 0,Icon: IconSettings,cards: [{ type: CardType.WorkflowCard }],@@ -144,6 +144,7 @@ export const useRecordShowContainerTabs = (ifRelationsMissing: [],},},+ timeline: null,},[CoreObjectNameSingular.WorkflowVersion]: {workflowVersion: {@@ -160,6 +161,7 @@ export const useRecordShowContainerTabs = (ifRelationsMissing: [],},},+ timeline: null,},[CoreObjectNameSingular.WorkflowRun]: {workflowRunOutput: {@@ -190,6 +192,7 @@ export const useRecordShowContainerTabs = (ifRelationsMissing: [],},},+ timeline: null,},};diff --git a/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts b/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.tsindex cea8c47dbc1..0590a26164e 100644--- a/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts+++ b/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts@@ -141,7 +141,7 @@ export const useRecordShowPagePagination = (const rankFoundInFiew = rankInView > -1;- const objectLabel = capitalize(objectMetadataItem.namePlural);+ const objectLabel = capitalize(objectMetadataItem.labelPlural);const totalCount = Math.max(1, totalCountBefore, totalCountAfter);diff --git a/packages/twenty-front/src/modules/workflow/components/WorkflowEditActionFormSendEmail.tsx b/packages/twenty-front/src/modules/workflow/components/WorkflowEditActionFormSendEmail.tsxindex 9a1389c19ec..a59a2259049 100644--- a/packages/twenty-front/src/modules/workflow/components/WorkflowEditActionFormSendEmail.tsx+++ b/packages/twenty-front/src/modules/workflow/components/WorkflowEditActionFormSendEmail.tsx@@ -204,7 +204,7 @@ export const WorkflowEditActionFormSendEmail = ({<VariableTagInputinputId="email-input"label="Email"- placeholder="Enter receiver email (use {{variable}} for dynamic content)"+ placeholder="Enter receiver email"value={field.value}onChange={(email) => {field.onChange(email);@@ -220,7 +220,7 @@ export const WorkflowEditActionFormSendEmail = ({<VariableTagInputinputId="email-subject-input"label="Subject"- placeholder="Enter email subject (use {{variable}} for dynamic content)"+ placeholder="Enter email subject"value={field.value}onChange={(email) => {field.onChange(email);@@ -236,7 +236,7 @@ export const WorkflowEditActionFormSendEmail = ({<VariableTagInputinputId="email-body-input"label="Body"- placeholder="Enter email body (use {{variable}} for dynamic content)"+ placeholder="Enter email body"value={field.value}onChange={(email) => {field.onChange(email);diff --git a/packages/twenty-front/src/modules/workflow/components/WorkflowEditActionFormServerlessFunction.tsx b/packages/twenty-front/src/modules/workflow/components/WorkflowEditActionFormServerlessFunction.tsxindex 9025788cdf5..56a8b9e740a 100644--- a/packages/twenty-front/src/modules/workflow/components/WorkflowEditActionFormServerlessFunction.tsx+++ b/packages/twenty-front/src/modules/workflow/components/WorkflowEditActionFormServerlessFunction.tsx@@ -187,7 +187,7 @@ export const WorkflowEditActionFormServerlessFunction = ({key={pathKey}inputId={`input-${inputKey}`}label={inputKey}- placeholder="Enter value (use {{variable}} for dynamic content)"+ placeholder="Enter value"value={`${inputValue || ''}`}onChange={(value) => handleInputChange(value, currentPath)}/>