The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix missing trash x off icon (#12699)
Weikod98f5a241fde
diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/constants/settingsRoleObjectPermissionIconConfig.ts b/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/constants/settingsRoleObjectPermissionIconConfig.tsindex c5e23960a61..756c6aa0604 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/constants/settingsRoleObjectPermissionIconConfig.ts+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/constants/settingsRoleObjectPermissionIconConfig.ts@@ -7,6 +7,7 @@ import {IconTrash,IconTrashOff,IconTrashX,+ IconTrashXOff,} from 'twenty-ui/display';type SettingsRoleObjectPermissionIconConfig = {@@ -38,6 +39,6 @@ export const SETTINGS_ROLE_OBJECT_PERMISSION_ICON_CONFIG: Record<},canDestroyObjectRecords: {Icon: IconTrashX,- IconForbidden: IconTrashX,+ IconForbidden: IconTrashXOff,},};diff --git a/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRole.tsx b/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRole.tsxindex 38676760d52..a510dd1fd70 100644--- a/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRole.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRole.tsx@@ -1,3 +1,4 @@+import { useAuth } from '@/auth/hooks/useAuth';import { SaveAndCancelButtons } from '@/settings/components/SaveAndCancelButtons/SaveAndCancelButtons';import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';import { GET_ROLES } from '@/settings/roles/graphql/queries/getRolesQuery';@@ -82,6 +83,8 @@ export const SettingsRole = ({ roleId, isCreateMode }: SettingsRoleProps) => {settingsPersistedRoleFamilyState(roleId),);+ const { loadCurrentUser } = useAuth();+const { enqueueSnackBar } = useSnackBar();if (!isDefined(settingsRolesIsLoading)) {@@ -268,6 +271,8 @@ export const SettingsRole = ({ roleId, isCreateMode }: SettingsRoleProps) => {});}}++ await loadCurrentUser();};return (diff --git a/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleCreateEffect.tsx b/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleCreateEffect.tsxindex 215351e9422..99d046b61e4 100644--- a/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleCreateEffect.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleCreateEffect.tsx@@ -32,7 +32,7 @@ export const SettingsRoleCreateEffect = ({const newRole = {id: roleId,- label: t`Role name`,+ label: t`Untitled role`,description: '',icon: 'IconUser',canUpdateAllSettings: true,diff --git a/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleLabelContainer.tsx b/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleLabelContainer.tsxindex 2899561adc1..d161fd633a6 100644--- a/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleLabelContainer.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleLabelContainer.tsx@@ -3,6 +3,7 @@ import { useRecoilState } from 'recoil';import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';import { TitleInput } from '@/ui/input/components/TitleInput';import styled from '@emotion/styled';+import { t } from '@lingui/core/macro';const ROLE_LABEL_EDIT_HOTKEY_SCOPE = 'role-label-edit';@@ -42,7 +43,7 @@ export const SettingsRoleLabelContainer = ({sizeVariant="md"value={settingsDraftRole.label}onChange={handleChange}- placeholder="Role name"+ placeholder={t`Role name`}hotkeyScope={ROLE_LABEL_EDIT_HOTKEY_SCOPE}/></StyledHeaderTitle>diff --git a/packages/twenty-ui/src/assets/icons/trash-x-off.svg b/packages/twenty-ui/src/assets/icons/trash-x-off.svgnew file mode 100644index 00000000000..24e730edf33--- /dev/null+++ b/packages/twenty-ui/src/assets/icons/trash-x-off.svg@@ -0,0 +1,7 @@+<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-trash-x ">+ <path d="M3 3l18 18"></path>+ <path d="M4 7h16"></path>+ <path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path>+ <path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>+ <path d="M10 12l4 4m0 -4l-4 4"></path>+</svg>\ No newline at end of filediff --git a/packages/twenty-ui/src/display/icon/components/IconTrashXOff.tsx b/packages/twenty-ui/src/display/icon/components/IconTrashXOff.tsxnew file mode 100644index 00000000000..8092fa01451--- /dev/null+++ b/packages/twenty-ui/src/display/icon/components/IconTrashXOff.tsx@@ -0,0 +1,14 @@+import { useTheme } from '@emotion/react';++import IconTrashXOffRaw from '@assets/icons/trash-x-off.svg?react';+import { IconComponentProps } from '@ui/display/icon/types/IconComponent';++type IconTrashXOffProps = Pick<IconComponentProps, 'size' | 'stroke'>;++export const IconTrashXOff = (props: IconTrashXOffProps) => {+ const theme = useTheme();+ const size = props.size ?? theme.icon.size.lg;+ const stroke = props.stroke ?? theme.icon.stroke.md;++ return <IconTrashXOffRaw height={size} width={size} strokeWidth={stroke} />;+};diff --git a/packages/twenty-ui/src/display/index.ts b/packages/twenty-ui/src/display/index.tsindex 12b95a0b871..c547b740e13 100644--- a/packages/twenty-ui/src/display/index.ts+++ b/packages/twenty-ui/src/display/index.ts@@ -35,6 +35,7 @@ export { IconMicrosoft } from './icon/components/IconMicrosoft';export { IconMicrosoftCalendar } from './icon/components/IconMicrosoftCalendar';export { IconMicrosoftOutlook } from './icon/components/IconMicrosoftOutlook';export { IconRelationManyToOne } from './icon/components/IconRelationManyToOne';+export { IconTrashXOff } from './icon/components/IconTrashXOff';export { IconTwentyStar } from './icon/components/IconTwentyStar';export { IconTwentyStarFilled } from './icon/components/IconTwentyStarFilled';export { IllustrationIconArray } from './icon/components/IllustrationIconArray';