feat(branches& warehouses): fix EmptyStatus.

This commit is contained in:
elforjani13
2022-02-08 16:05:40 +02:00
parent 287939e093
commit 781dd9457e
8 changed files with 58 additions and 36 deletions

View File

@@ -1,7 +1,9 @@
import React from 'react';
import styled from 'styled-components';
import { DataTable } from 'components';
import 'style/pages/Preferences/branchesList.scss';
import { DataTable, Card } from 'components';
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
import BranchesEmptyStatus from './BranchesEmptyStatus';
import { useBranchesTableColumns, ActionsMenu } from './components';
@@ -43,23 +45,27 @@ function BranchesDataTable({
}
return (
<BranchesTable
columns={columns}
data={branches}
loading={isBranchesLoading}
headerLoading={isBranchesLoading}
progressBarLoading={isBranchesFetching}
TableLoadingRenderer={TableSkeletonRows}
noInitialFetch={true}
ContextMenu={ActionsMenu}
payload={{
onEdit: handleEditBranch,
onDelete: handleDeleteBranch,
}}
/>
<BranchesTableCard>
<DataTable
columns={columns}
data={branches}
loading={isBranchesLoading}
headerLoading={isBranchesLoading}
progressBarLoading={isBranchesFetching}
TableLoadingRenderer={TableSkeletonRows}
noInitialFetch={true}
ContextMenu={ActionsMenu}
payload={{
onEdit: handleEditBranch,
onDelete: handleDeleteBranch,
}}
/>
</BranchesTableCard>
);
}
export default compose(withDialogActions, withAlertActions)(BranchesDataTable);
const BranchesTable = styled(DataTable)``;
const BranchesTableCard = styled(Card)`
padding: 0;
`;