feat: refacotor ui
This commit is contained in:
@@ -8,7 +8,6 @@ import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
// MUI Imports
|
||||
import Button from '@mui/material/Button'
|
||||
import Card from '@mui/material/Card'
|
||||
import CardHeader from '@mui/material/CardHeader'
|
||||
import Checkbox from '@mui/material/Checkbox'
|
||||
import Chip from '@mui/material/Chip'
|
||||
import Divider from '@mui/material/Divider'
|
||||
@@ -36,12 +35,12 @@ import OptionMenu from '@core/components/option-menu'
|
||||
// Style Imports
|
||||
import tableStyles from '@core/styles/table.module.css'
|
||||
import { Box, CircularProgress } from '@mui/material'
|
||||
import AddStockDrawer from './AddStockDrawer'
|
||||
import ConfirmDeleteDialog from '../../../../../components/dialogs/confirm-delete'
|
||||
import Loading from '../../../../../components/layout/shared/Loading'
|
||||
import { useInventoriesMutation } from '../../../../../services/mutations/inventories'
|
||||
import { useInventories } from '../../../../../services/queries/inventories'
|
||||
import { Inventory } from '../../../../../types/services/inventory'
|
||||
import AddStockDrawer from './AddStockDrawer'
|
||||
|
||||
declare module '@tanstack/table-core' {
|
||||
interface FilterFns {
|
||||
@@ -165,14 +164,6 @@ const StockListTable = () => {
|
||||
header: 'Product',
|
||||
cell: ({ row }) => <Typography>{row.original.product_id}</Typography>
|
||||
}),
|
||||
columnHelper.accessor('quantity', {
|
||||
header: 'Quantity',
|
||||
cell: ({ row }) => <Typography>{row.original.quantity}</Typography>
|
||||
}),
|
||||
columnHelper.accessor('reorder_level', {
|
||||
header: 'Reorder Level',
|
||||
cell: ({ row }) => <Typography>{row.original.reorder_level}</Typography>
|
||||
}),
|
||||
columnHelper.accessor('is_low_stock', {
|
||||
header: 'Status',
|
||||
cell: ({ row }) => (
|
||||
@@ -184,6 +175,14 @@ const StockListTable = () => {
|
||||
/>
|
||||
)
|
||||
}),
|
||||
columnHelper.accessor('quantity', {
|
||||
header: 'Quantity',
|
||||
cell: ({ row }) => <Typography>{row.original.quantity}</Typography>
|
||||
}),
|
||||
columnHelper.accessor('reorder_level', {
|
||||
header: 'Reorder Level',
|
||||
cell: ({ row }) => <Typography>{row.original.reorder_level}</Typography>
|
||||
}),
|
||||
columnHelper.accessor('actions', {
|
||||
header: 'Actions',
|
||||
cell: ({ row }) => (
|
||||
@@ -239,8 +238,6 @@ const StockListTable = () => {
|
||||
return (
|
||||
<>
|
||||
<Card>
|
||||
<CardHeader title='Filters' />
|
||||
{/* <TableFilters setData={() => {}} productData={[]} /> */}
|
||||
<Divider />
|
||||
<div className='flex flex-wrap justify-between gap-4 p-6'>
|
||||
<DebouncedInput
|
||||
|
||||
Reference in New Issue
Block a user