feat: application booting.

This commit is contained in:
a.bouhuolia
2021-09-08 16:27:16 +02:00
parent 7b3d310eab
commit 361aab89e6
93 changed files with 961 additions and 723 deletions

View File

@@ -3,7 +3,7 @@ import { useHistory } from 'react-router-dom';
import { compose } from 'utils';
import { DataTable } from 'components';
import { DataTable, DashboardContentTable } from 'components';
import EstimatesEmptyStatus from './EstimatesEmptyStatus';
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
import TableSkeletonHeader from 'components/Datatable/TableHeaderSkeleton';
@@ -109,35 +109,37 @@ function EstimatesDataTable({
}
return (
<DataTable
columns={columns}
data={estimates}
loading={isEstimatesLoading}
headerLoading={isEstimatesLoading}
progressBarLoading={isEstimatesFetching}
onFetchData={handleFetchData}
noInitialFetch={true}
manualSortBy={true}
selectionColumn={true}
sticky={true}
pagination={true}
manualPagination={true}
pagesCount={pagination.pagesCount}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}
ContextMenu={ActionsMenu}
payload={{
onApprove: handleApproveEstimate,
onEdit: handleEditEstimate,
onReject: handleRejectEstimate,
onDeliver: handleDeliverEstimate,
onDelete: handleDeleteEstimate,
onDrawer: handleDrawerEstimate,
onConvert: handleConvertToInvoice,
onViewDetails: handleViewDetailEstimate,
onPrint: handlePrintEstimate,
}}
/>
<DashboardContentTable>
<DataTable
columns={columns}
data={estimates}
loading={isEstimatesLoading}
headerLoading={isEstimatesLoading}
progressBarLoading={isEstimatesFetching}
onFetchData={handleFetchData}
noInitialFetch={true}
manualSortBy={true}
selectionColumn={true}
sticky={true}
pagination={true}
manualPagination={true}
pagesCount={pagination.pagesCount}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}
ContextMenu={ActionsMenu}
payload={{
onApprove: handleApproveEstimate,
onEdit: handleEditEstimate,
onReject: handleRejectEstimate,
onDeliver: handleDeliverEstimate,
onDelete: handleDeleteEstimate,
onDrawer: handleDrawerEstimate,
onConvert: handleConvertToInvoice,
onViewDetails: handleViewDetailEstimate,
onPrint: handlePrintEstimate,
}}
/>
</DashboardContentTable>
);
}

View File

@@ -42,10 +42,7 @@ function EstimatesList({
<DashboardPageContent>
<EstimatesViewTabs />
<DashboardContentTable>
<EstimatesDataTable />
</DashboardContentTable>
<EstimatesDataTable />
</DashboardPageContent>
<EstimatesAlerts />

View File

@@ -4,7 +4,7 @@ import { useHistory } from 'react-router-dom';
import InvoicesEmptyStatus from './InvoicesEmptyStatus';
import { compose } from 'utils';
import { DataTable } from 'components';
import { DataTable, DashboardContentTable } from 'components';
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
import TableSkeletonHeader from 'components/Datatable/TableHeaderSkeleton';
@@ -108,37 +108,39 @@ function InvoicesDataTable({
}
return (
<DataTable
columns={columns}
data={invoices}
initialState={invoicesTableState}
loading={isInvoicesLoading}
headerLoading={isInvoicesLoading}
progressBarLoading={isInvoicesFetching}
onFetchData={handleDataTableFetchData}
manualSortBy={true}
selectionColumn={true}
noInitialFetch={true}
sticky={true}
pagination={true}
manualPagination={true}
pagesCount={pagination.pagesCount}
autoResetSortBy={false}
autoResetPage={false}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}
ContextMenu={ActionsMenu}
payload={{
onDelete: handleDeleteInvoice,
onDeliver: handleDeliverInvoice,
onEdit: handleEditInvoice,
onDrawer: handleDrawerInvoice,
onQuick: handleQuickPaymentReceive,
onViewDetails: handleViewDetailInvoice,
onPrint: handlePrintInvoice,
baseCurrency,
}}
/>
<DashboardContentTable>
<DataTable
columns={columns}
data={invoices}
initialState={invoicesTableState}
loading={isInvoicesLoading}
headerLoading={isInvoicesLoading}
progressBarLoading={isInvoicesFetching}
onFetchData={handleDataTableFetchData}
manualSortBy={true}
selectionColumn={true}
noInitialFetch={true}
sticky={true}
pagination={true}
manualPagination={true}
pagesCount={pagination.pagesCount}
autoResetSortBy={false}
autoResetPage={false}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}
ContextMenu={ActionsMenu}
payload={{
onDelete: handleDeleteInvoice,
onDeliver: handleDeliverInvoice,
onEdit: handleEditInvoice,
onDrawer: handleDrawerInvoice,
onQuick: handleQuickPaymentReceive,
onViewDetails: handleViewDetailInvoice,
onPrint: handlePrintInvoice,
baseCurrency,
}}
/>
</DashboardContentTable>
);
}

View File

@@ -44,10 +44,7 @@ function InvoicesList({
<DashboardPageContent>
<InvoiceViewTabs />
<DashboardContentTable>
<InvoicesDataTable />
</DashboardContentTable>
<InvoicesDataTable />
</DashboardPageContent>
<InvoicesAlerts />

View File

@@ -42,10 +42,7 @@ function PaymentReceiveList({
<DashboardPageContent>
<PaymentReceiveViewTabs />
<DashboardContentTable>
<PaymentReceivesTable />
</DashboardContentTable>
<PaymentReceivesTable />
</DashboardPageContent>
<PaymentReceiveAlerts />

View File

@@ -3,8 +3,8 @@ import { useHistory } from 'react-router-dom';
import { compose } from 'utils';
import { DataTable, DashboardContentTable } from 'components';
import PaymentReceivesEmptyStatus from './PaymentReceivesEmptyStatus';
import { DataTable } from 'components';
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
import TableSkeletonHeader from 'components/Datatable/TableHeaderSkeleton';
@@ -85,32 +85,34 @@ function PaymentReceivesDataTable({
}
return (
<DataTable
columns={columns}
data={paymentReceives}
initialState={paymentReceivesTableState}
loading={isPaymentReceivesLoading}
headerLoading={isPaymentReceivesLoading}
progressBarLoading={isPaymentReceivesFetching}
onFetchData={handleDataTableFetchData}
manualSortBy={true}
selectionColumn={true}
noInitialFetch={true}
sticky={true}
autoResetSortBy={false}
autoResetPage={false}
pagination={true}
pagesCount={pagination.pagesCount}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}
ContextMenu={ActionsMenu}
payload={{
onDelete: handleDeletePaymentReceive,
onEdit: handleEditPaymentReceive,
onDrawer: handleDrawerPaymentReceive,
onViewDetails: handleViewDetailPaymentReceive,
}}
/>
<DashboardContentTable>
<DataTable
columns={columns}
data={paymentReceives}
initialState={paymentReceivesTableState}
loading={isPaymentReceivesLoading}
headerLoading={isPaymentReceivesLoading}
progressBarLoading={isPaymentReceivesFetching}
onFetchData={handleDataTableFetchData}
manualSortBy={true}
selectionColumn={true}
noInitialFetch={true}
sticky={true}
autoResetSortBy={false}
autoResetPage={false}
pagination={true}
pagesCount={pagination.pagesCount}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}
ContextMenu={ActionsMenu}
payload={{
onDelete: handleDeletePaymentReceive,
onEdit: handleEditPaymentReceive,
onDrawer: handleDrawerPaymentReceive,
onViewDetails: handleViewDetailPaymentReceive,
}}
/>
</DashboardContentTable>
);
}

View File

@@ -43,10 +43,7 @@ function ReceiptsList({
<DashboardPageContent>
<ReceiptViewTabs />
<DashboardContentTable>
<ReceiptsTable />
</DashboardContentTable>
<ReceiptsTable />
</DashboardPageContent>
<ReceiptsAlerts />

View File

@@ -2,7 +2,7 @@ import React, { useCallback } from 'react';
import { useHistory } from 'react-router-dom';
import { compose } from 'utils';
import { DataTable } from 'components';
import { DataTable, DashboardContentTable } from 'components';
import ReceiptsEmptyStatus from './ReceiptsEmptyStatus';
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
@@ -101,36 +101,38 @@ function ReceiptsDataTable({
}
return (
<DataTable
columns={columns}
data={receipts}
initialState={receiptTableState}
loading={isReceiptsLoading}
headerLoading={isReceiptsLoading}
progressBarLoading={isReceiptsFetching}
onFetchData={handleDataTableFetchData}
manualSortBy={true}
selectionColumn={true}
noInitialFetch={true}
sticky={true}
pagination={true}
pagesCount={pagination.pagesCount}
manualPagination={true}
autoResetSortBy={false}
autoResetPage={false}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}
ContextMenu={ActionsMenu}
payload={{
onEdit: handleEditReceipt,
onDelete: handleDeleteReceipt,
onClose: handleCloseReceipt,
onDrawer: handleDrawerReceipt,
onViewDetails: handleViewDetailReceipt,
onPrint: handlePrintInvoice,
baseCurrency,
}}
/>
<DashboardContentTable>
<DataTable
columns={columns}
data={receipts}
initialState={receiptTableState}
loading={isReceiptsLoading}
headerLoading={isReceiptsLoading}
progressBarLoading={isReceiptsFetching}
onFetchData={handleDataTableFetchData}
manualSortBy={true}
selectionColumn={true}
noInitialFetch={true}
sticky={true}
pagination={true}
pagesCount={pagination.pagesCount}
manualPagination={true}
autoResetSortBy={false}
autoResetPage={false}
TableLoadingRenderer={TableSkeletonRows}
TableHeaderSkeletonRenderer={TableSkeletonHeader}
ContextMenu={ActionsMenu}
payload={{
onEdit: handleEditReceipt,
onDelete: handleDeleteReceipt,
onClose: handleCloseReceipt,
onDrawer: handleDrawerReceipt,
onViewDetails: handleViewDetailReceipt,
onPrint: handlePrintInvoice,
baseCurrency,
}}
/>
</DashboardContentTable>
);
}