Update wording to indicate how to restore records (#10686)
This commit is contained in:
@ -16,8 +16,10 @@ import { getRecordIndexIdFromObjectNamePluralAndViewId } from '@/object-record/u
|
||||
import { useHasObjectReadOnlyPermission } from '@/settings/roles/hooks/useHasObjectReadOnlyPermission';
|
||||
import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { useCallback, useState } from 'react';
|
||||
import { isDefined } from 'twenty-shared';
|
||||
import { getOsControlSymbol } from 'twenty-ui';
|
||||
|
||||
export const useDeleteMultipleRecordsAction: ActionHookWithObjectMetadataItem =
|
||||
({ objectMetadataItem }) => {
|
||||
@ -108,12 +110,14 @@ export const useDeleteMultipleRecordsAction: ActionHookWithObjectMetadataItem =
|
||||
setIsDeleteRecordsModalOpen(true);
|
||||
};
|
||||
|
||||
const osControlSymbol = getOsControlSymbol();
|
||||
|
||||
const confirmationModal = (
|
||||
<ConfirmationModal
|
||||
isOpen={isDeleteRecordsModalOpen}
|
||||
setIsOpen={setIsDeleteRecordsModalOpen}
|
||||
title={'Delete Records'}
|
||||
subtitle={`Are you sure you want to delete these records? They can be recovered from the Options menu.`}
|
||||
subtitle={t`Are you sure you want to delete these records? They can be recovered from the Command menu (${osControlSymbol} + K).`}
|
||||
onConfirmClick={handleDeleteClick}
|
||||
confirmButtonText={'Delete Records'}
|
||||
/>
|
||||
|
||||
@ -9,10 +9,12 @@ import { useRecordTable } from '@/object-record/record-table/hooks/useRecordTabl
|
||||
import { useHasObjectReadOnlyPermission } from '@/settings/roles/hooks/useHasObjectReadOnlyPermission';
|
||||
import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';
|
||||
import { useRightDrawer } from '@/ui/layout/right-drawer/hooks/useRightDrawer';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { isNull } from '@sniptt/guards';
|
||||
import { useCallback, useContext, useState } from 'react';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { isDefined } from 'twenty-shared';
|
||||
import { getOsControlSymbol } from 'twenty-ui';
|
||||
|
||||
export const useDeleteSingleRecordAction: ActionHookWithObjectMetadataItem = ({
|
||||
objectMetadataItem,
|
||||
@ -76,6 +78,8 @@ export const useDeleteSingleRecordAction: ActionHookWithObjectMetadataItem = ({
|
||||
setIsDeleteRecordsModalOpen(true);
|
||||
};
|
||||
|
||||
const osControlSymbol = getOsControlSymbol();
|
||||
|
||||
return {
|
||||
shouldBeRegistered,
|
||||
onClick,
|
||||
@ -84,9 +88,7 @@ export const useDeleteSingleRecordAction: ActionHookWithObjectMetadataItem = ({
|
||||
isOpen={isDeleteRecordsModalOpen}
|
||||
setIsOpen={setIsDeleteRecordsModalOpen}
|
||||
title={'Delete Record'}
|
||||
subtitle={
|
||||
'Are you sure you want to delete this record? It can be recovered from the Options menu.'
|
||||
}
|
||||
subtitle={t`Are you sure you want to delete this record? It can be recovered from the Command menu (${osControlSymbol} + K).`}
|
||||
onConfirmClick={() => {
|
||||
handleDeleteClick();
|
||||
if (isInRightDrawer) {
|
||||
|
||||
Reference in New Issue
Block a user