Cash Bank Detail Table
This commit is contained in:
@@ -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>
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user