This commit is contained in:
Ahmed Bouhuolia
2025-11-20 23:06:35 +02:00
parent 56e00d254b
commit 43faa45dcf
3 changed files with 8 additions and 13 deletions

View File

@@ -34,12 +34,9 @@ function BulkDeleteDialogContent({
</Tag> </Tag>
<x.div> <x.div>
<T <T
id={'bulk_delete_delete_row_prefix'} id={'bulk_delete_will_be_deleted'}
values={{ resourceSingular: resourceSingularLabel }} values={{ resourceSingular: resourceSingularLabel }}
/>{' '} />{' '}
<x.span fontWeight="semibold" color="danger">
<T id={'bulk_delete_delete_row_status'} />
</x.span>
</x.div> </x.div>
</x.div> </x.div>
@@ -49,12 +46,9 @@ function BulkDeleteDialogContent({
</Tag> </Tag>
<x.div> <x.div>
<T <T
id={'bulk_delete_archive_row_prefix'} id={'bulk_delete_cannot_be_deleted'}
values={{ resourceSingular: resourceSingularLabel }} values={{ resourceSingular: resourceSingularLabel }}
/>{' '} />{' '}
<x.span fontWeight="semibold" color="info">
<T id={'bulk_delete_archive_row_status'} />
</x.span>
</x.div> </x.div>
</x.div> </x.div>

View File

@@ -3,6 +3,7 @@ import { useMutation, useQueryClient } from 'react-query';
import { useRequestQuery } from '../useQueryRequest'; import { useRequestQuery } from '../useQueryRequest';
import useApiRequest from '../useRequest'; import useApiRequest from '../useRequest';
import t from './types'; import t from './types';
import { transformToCamelCase } from '@/utils';
// Transform the account. // Transform the account.
const transformAccount = (response) => { const transformAccount = (response) => {
@@ -187,7 +188,9 @@ export function useValidateBulkDeleteAccounts(props) {
return useMutation( return useMutation(
(ids: number[]) => (ids: number[]) =>
apiRequest.post('accounts/validate-bulk-delete', { ids }), apiRequest
.post('accounts/validate-bulk-delete', { ids })
.then((res) => transformToCamelCase(res.data)),
{ {
...props, ...props,
}, },

View File

@@ -529,10 +529,8 @@
"once_delete_these_invoices_you_will_not_able_restore_them": "Once you delete these invoices, you won't be able to retrieve them later. Are you sure you want to delete them?", "once_delete_these_invoices_you_will_not_able_restore_them": "Once you delete these invoices, you won't be able to retrieve them later. Are you sure you want to delete them?",
"bulk_delete_dialog_title": "Delete {resourcePlural}", "bulk_delete_dialog_title": "Delete {resourcePlural}",
"bulk_delete_selected_summary": "You have selected {count} {resourcePlural} to be deleted:", "bulk_delete_selected_summary": "You have selected {count} {resourcePlural} to be deleted:",
"bulk_delete_delete_row_prefix": "{resourceSingular} will be", "bulk_delete_will_be_deleted": "{resourceSingular} will be deleted",
"bulk_delete_delete_row_status": "Deleted", "bulk_delete_cannot_be_deleted": "{resourceSingular} cannot be deleted",
"bulk_delete_archive_row_prefix": "{resourceSingular} cannot be deleted so it will be",
"bulk_delete_archive_row_status": "Archived",
"bulk_delete_selected_description": "These {resourcePlural} will be removed from any contacts or workflows using them as a default document.", "bulk_delete_selected_description": "These {resourcePlural} will be removed from any contacts or workflows using them as a default document.",
"bulk_delete_note_description": "Deleting {resourcePlural} is permanent and cannot be undone. Archived {resourcePlural} can be restored at any time.", "bulk_delete_note_description": "Deleting {resourcePlural} is permanent and cannot be undone. Archived {resourcePlural} can be restored at any time.",
"resource_invoice_singular": "Invoice", "resource_invoice_singular": "Invoice",