Fix missing New Note / New Task button (#12513)
New Note button was missing because of the wrong condition being applied to display it <img width="492" alt="Capture d’écran 2025-06-10 à 10 26 57" src="https://github.com/user-attachments/assets/dafd10e3-b3a8-497c-9a00-c395f20cecbb" />
This commit is contained in:
@ -129,7 +129,7 @@ export const Attachments = ({
|
||||
title="All"
|
||||
attachments={attachments ?? []}
|
||||
button={
|
||||
!hasObjectUpdatePermissions && (
|
||||
hasObjectUpdatePermissions && (
|
||||
<Button
|
||||
Icon={IconPlus}
|
||||
size="small"
|
||||
|
||||
@ -68,7 +68,7 @@ export const Notes = ({
|
||||
There are no associated notes with this record.
|
||||
</AnimatedPlaceholderEmptySubTitle>
|
||||
</AnimatedPlaceholderEmptyTextContainer>
|
||||
{!hasObjectUpdatePermissions && (
|
||||
{hasObjectUpdatePermissions && (
|
||||
<Button
|
||||
Icon={IconPlus}
|
||||
title="New note"
|
||||
|
||||
@ -7,6 +7,7 @@ import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableE
|
||||
import { Task } from '@/activities/types/Task';
|
||||
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
import { useObjectPermissionsForObject } from '@/object-record/hooks/useObjectPermissionsForObject';
|
||||
import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import groupBy from 'lodash.groupby';
|
||||
@ -22,7 +23,6 @@ import {
|
||||
} from 'twenty-ui/layout';
|
||||
import { AddTaskButton } from './AddTaskButton';
|
||||
import { TaskList } from './TaskList';
|
||||
import { useObjectPermissionsForObject } from '@/object-record/hooks/useObjectPermissionsForObject';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
display: flex;
|
||||
@ -83,7 +83,7 @@ export const TaskGroups = ({ targetableObject }: TaskGroupsProps) => {
|
||||
All tasks addressed. Maintain the momentum.
|
||||
</AnimatedPlaceholderEmptySubTitle>
|
||||
</AnimatedPlaceholderEmptyTextContainer>
|
||||
{!hasObjectUpdatePermissions && (
|
||||
{hasObjectUpdatePermissions && (
|
||||
<Button
|
||||
Icon={IconPlus}
|
||||
title="New task"
|
||||
|
||||
Reference in New Issue
Block a user