import React from 'react'; import intl, { init } from 'react-intl-universal'; import FinancialSheet from 'components/FinancialSheet'; import { DataTable } from 'components'; import { useInventoryValuationContext } from './InventoryValuationProvider'; import { useInventoryValuationTableColumns } from './components'; /** * inventory valuation data table. */ export default function InventoryValuationTable({ //#ownProps companyName, }) { // inventory valuation context. const { inventoryValuation: { tableRows }, isLoading, } = useInventoryValuationContext(); // inventory valuation table columns. const columns = useInventoryValuationTableColumns(); const rowClassNames = (row) => { const { original } = row; const rowTypes = Array.isArray(original.rowType) ? original.rowType : [original.rowType]; return { ...rowTypes.reduce((acc, rowType) => { acc[`row_type--${rowType}`] = rowType; return acc; }, {}), }; }; return ( ); }