[FE] Improve Read-only field behavior (#10382)

Fixes https://github.com/twentyhq/core-team-issues/issues/235
This commit is contained in:
Weiko
2025-02-21 12:09:52 +01:00
committed by GitHub
parent ec9587414b
commit 29d079babc
4 changed files with 46 additions and 19 deletions

View File

@ -81,17 +81,19 @@ export const Notes = ({
title="All"
notes={notes}
button={
<Button
Icon={IconPlus}
size="small"
variant="secondary"
title="Add note"
onClick={() =>
openCreateActivity({
targetableObjects: [targetableObject],
})
}
></Button>
!hasObjectReadOnlyPermission && (
<Button
Icon={IconPlus}
size="small"
variant="secondary"
title="Add note"
onClick={() =>
openCreateActivity({
targetableObjects: [targetableObject],
})
}
/>
)
}
/>
</StyledNotesContainer>