BiG-5: Complete, add switch small and medium table row size.

This commit is contained in:
elforjani13
2021-09-26 21:02:53 +02:00
parent fcace4213c
commit 71f9fa47d4
45 changed files with 337 additions and 196 deletions

View File

@@ -71,7 +71,7 @@ function InvoiceActionsBar({
// Handle table row size change.
const handleTableRowSizeChange = (size) => {
addSetting('invoice', 'tableSize', size);
addSetting('salesInvoices', 'tableSize', size);
};
return (

View File

@@ -16,6 +16,7 @@ import withInvoiceActions from './withInvoiceActions';
import withAlertsActions from 'containers/Alert/withAlertActions';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import withDialogActions from 'containers/Dialog/withDialogActions';
import withSettings from '../../../Settings/withSettings';
import { useInvoicesTableColumns, ActionsMenu } from './components';
import { useInvoicesListContext } from './InvoicesListProvider';
@@ -40,6 +41,9 @@ function InvoicesDataTable({
// #withDialogAction
openDialog,
// #withSettings
invoicesTableSize,
}) {
const history = useHistory();
@@ -135,6 +139,7 @@ function InvoicesDataTable({
onCellClick={handleCellClick}
initialColumnsWidths={initialColumnsWidths}
onColumnResizing={handleColumnResizing}
size={invoicesTableSize}
payload={{
onDelete: handleDeleteInvoice,
onDeliver: handleDeliverInvoice,
@@ -155,4 +160,7 @@ export default compose(
withDrawerActions,
withDialogActions,
withInvoices(({ invoicesTableState }) => ({ invoicesTableState })),
withSettings(({ invoiceSettings }) => ({
invoicesTableSize: invoiceSettings?.tableSize,
})),
)(InvoicesDataTable);

View File

@@ -55,6 +55,7 @@ export const statusAccessor = (row) => {
})}
</span>
<ProgressBar
animate={false}
stripes={false}
intent={Intent.PRIMARY}