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

@@ -73,7 +73,7 @@ function PaymentMadeActionsBar({
// Handle table row size change.
const handleTableRowSizeChange = (size) => {
addSetting('payment_made', 'tableSize', size);
addSetting('billPayments', 'tableSize', size);
};
return (

View File

@@ -16,6 +16,7 @@ import withCurrentOrganization from 'containers/Organization/withCurrentOrganiza
import withAlertsActions from 'containers/Alert/withAlertActions';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import withSettings from '../../../Settings/withSettings';
import { usePaymentMadesTableColumns, ActionsMenu } from './components';
import { usePaymentMadesListContext } from './PaymentMadesListProvider';
@@ -36,6 +37,9 @@ function PaymentMadesTable({
// #withDrawerActions
openDrawer,
// #withSettings
paymentMadesTableSize,
}) {
// Payment mades table columns.
const columns = usePaymentMadesTableColumns();
@@ -114,6 +118,7 @@ function PaymentMadesTable({
onCellClick={handleCellClick}
initialColumnsWidths={initialColumnsWidths}
onColumnResizing={handleColumnResizing}
size={paymentMadesTableSize}
payload={{
onEdit: handleEditPaymentMade,
onDelete: handleDeletePaymentMade,
@@ -130,4 +135,7 @@ export default compose(
withAlertsActions,
withDrawerActions,
withCurrentOrganization(),
withSettings(({ billPaymentSettings }) => ({
paymentMadesTableSize: billPaymentSettings?.tableSize,
})),
)(PaymentMadesTable);