Cash Bank Detail Table

This commit is contained in:
efrilm
2025-09-10 19:42:26 +07:00
parent 2c754d96fd
commit e267a50946
8 changed files with 747 additions and 8 deletions
+6 -5
View File
@@ -13,6 +13,9 @@ import Select from '@mui/material/Select'
import MenuItem from '@mui/material/MenuItem'
import CashBankCard from './CashBankCard' // Adjust import path as needed
import CustomTextField from '@/@core/components/mui/TextField'
import { getLocalizedUrl } from '@/utils/i18n'
import { Locale } from '@/configs/i18n'
import { useParams } from 'next/navigation'
// Types
interface BankAccount {
@@ -247,12 +250,10 @@ const DebouncedInput = ({
}
const CashBankList = () => {
const [searchQuery, setSearchQuery] = useState('')
const { lang: locale } = useParams()
// Handle button clicks
const handleAccountAction = (accountId: string, action: string) => {
console.log(`Action: ${action} for account: ${accountId}`)
// Implement your action logic here
}
const handleAccountAction = () => {}
// Filter and search logic
const filteredAccounts = useMemo(() => {
@@ -295,7 +296,7 @@ const CashBankList = () => {
chartColor={account.chartColor}
currency={account.currency}
showButton={account.accountType !== 'cash'}
onButtonClick={() => handleAccountAction(account.id, account.accountType || 'default')}
href={getLocalizedUrl(`/apps/cash-bank/${account.accountNumber}/detail`, locale as Locale)}
/>
</Grid>
))