feat: update

This commit is contained in:
efrilm 2025-09-12 19:19:43 +07:00
parent 9cbb41c2ad
commit 5a0d96ee43

View File

@ -5,7 +5,6 @@ import { useState, useEffect } from 'react'
import Button from '@mui/material/Button' import Button from '@mui/material/Button'
import Drawer from '@mui/material/Drawer' import Drawer from '@mui/material/Drawer'
import IconButton from '@mui/material/IconButton' import IconButton from '@mui/material/IconButton'
import MenuItem from '@mui/material/MenuItem'
import Typography from '@mui/material/Typography' import Typography from '@mui/material/Typography'
import Box from '@mui/material/Box' import Box from '@mui/material/Box'
@ -51,18 +50,6 @@ type FormValidateType = {
parentAccount?: string parentAccount?: string
} }
// Fallback categories (used when API data is not available)
const fallbackAccountCategories = [
'Kas & Bank',
'Piutang',
'Persediaan',
'Aset Tetap',
'Hutang',
'Ekuitas',
'Pendapatan',
'Beban'
]
// Parent accounts (dummy data for dropdown) // Parent accounts (dummy data for dropdown)
const parentAccounts = [ const parentAccounts = [
{ id: 1, code: '1-10001', name: 'Kas' }, { id: 1, code: '1-10001', name: 'Kas' },
@ -103,12 +90,7 @@ const AccountFormDrawer = (props: Props) => {
code: type.code, code: type.code,
description: type.description description: type.description
})) }))
: fallbackAccountCategories.map(category => ({ : []
id: category.toLowerCase().replace(/\s+/g, '_'),
name: category,
code: category,
description: category
}))
// Hooks // Hooks
const { const {