Files
erpnext/banking/src/components/features/ActionLog/ActionLogDialog.tsx
Nikhil Kothari 65b87ec045 fix(banking): miscellaneous bug fixes (#55492)
* fix(banking): correct usage of hooks in rule action

* fix(banking): apply ESLint rules for hooks

* fix(banking): add lazy imports and code-splitting
2026-06-01 10:36:48 +00:00

35 lines
1.2 KiB
TypeScript

import { Button } from '@/components/ui/button'
import { DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog'
import _ from '@/lib/translate'
import { Loader2Icon } from 'lucide-react'
import { lazy, Suspense } from 'react'
const ActionLogDialogBody = lazy(() => import('./ActionLogDialogBody'))
const ActionLogDialogFallback = () => (
<div className="flex flex-1 items-center justify-center min-h-[40vh]">
<Loader2Icon className="size-6 animate-spin text-muted-foreground" />
</div>
)
const ActionLogDialog = ({ onClose }: { onClose: () => void }) => {
return (
<DialogContent className='min-w-[90vw]'>
<DialogHeader>
<DialogTitle>{_("Reconciliation History")}</DialogTitle>
<DialogDescription>{_("View all reconciliation actions taken in this session.")}</DialogDescription>
</DialogHeader>
<Suspense fallback={<ActionLogDialogFallback />}>
<ActionLogDialogBody />
</Suspense>
<DialogFooter>
<DialogClose asChild>
<Button variant={'outline'} size='md' onClick={onClose}>{_("Close")}</Button>
</DialogClose>
</DialogFooter>
</DialogContent>
)
}
export default ActionLogDialog