diff --git a/packages/webapp/src/components/DrawersContainer.tsx b/packages/webapp/src/components/DrawersContainer.tsx index 43b594ff3..88fc83397 100644 --- a/packages/webapp/src/components/DrawersContainer.tsx +++ b/packages/webapp/src/components/DrawersContainer.tsx @@ -23,10 +23,11 @@ import WarehouseTransferDetailDrawer from '@/containers/Drawers/WarehouseTransfe import TaxRateDetailsDrawer from '@/containers/TaxRates/drawers/TaxRateDetailsDrawer/TaxRateDetailsDrawer'; import CategorizeTransactionDrawer from '@/containers/CashFlow/CategorizeTransaction/drawers/CategorizeTransactionDrawer/CategorizeTransactionDrawer'; import ChangeSubscriptionPlanDrawer from '@/containers/Subscriptions/drawers/ChangeSubscriptionPlanDrawer/ChangeSubscriptionPlanDrawer'; +import { InvoiceCustomizeDrawer } from '@/containers/Sales/Invoices/InvoiceCustomize/InvoiceCustomizeDrawer'; +import { EstimateCustomizeDrawer } from '@/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeDrawer'; +import { ReceiptCustomizeDrawer } from '@/containers/Sales/Receipts/ReceiptCustomize/ReceiptCustomizeDrawer'; import { DRAWERS } from '@/constants/drawers'; -import { InvoiceCustomizeDrawer } from '@/containers/Sales/Invoices/InvoiceCustomize/InvoiceCustomizeDrawer'; - /** * Drawers container of the dashboard. */ @@ -67,6 +68,8 @@ export default function DrawersContainer() { + + ); } diff --git a/packages/webapp/src/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeContent.tsx b/packages/webapp/src/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeContent.tsx new file mode 100644 index 000000000..e208e0b2e --- /dev/null +++ b/packages/webapp/src/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeContent.tsx @@ -0,0 +1,3 @@ +export default function EstimateCustomizeContent() { + return

Hello World

; +} diff --git a/packages/webapp/src/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeDrawer.tsx b/packages/webapp/src/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeDrawer.tsx new file mode 100644 index 000000000..6a6042ba8 --- /dev/null +++ b/packages/webapp/src/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeDrawer.tsx @@ -0,0 +1,33 @@ +// @ts-nocheck +import React from 'react'; +import * as R from 'ramda'; +import { Drawer, DrawerSuspense } from '@/components'; +import withDrawers from '@/containers/Drawer/withDrawers'; + +const EstimateCustomizeContent = React.lazy( + () => import('./EstimateCustomizeContent'), +); + +/** + * Estimate customize drawer. + * @returns {React.ReactNode} + */ +function EstimateCustomizeDrawerRoot({ + name, + + // #withDrawer + isOpen, + payload: {}, +}) { + return ( + + + + + + ); +} + +export const EstimateCustomizeDrawer = R.compose(withDrawers())( + EstimateCustomizeDrawerRoot, +); diff --git a/packages/webapp/src/containers/Sales/Estimates/EstimatesLanding/EstimatesActionsBar.tsx b/packages/webapp/src/containers/Sales/Estimates/EstimatesLanding/EstimatesActionsBar.tsx index e035bbcf3..0bc42c5d4 100644 --- a/packages/webapp/src/containers/Sales/Estimates/EstimatesLanding/EstimatesActionsBar.tsx +++ b/packages/webapp/src/containers/Sales/Estimates/EstimatesLanding/EstimatesActionsBar.tsx @@ -7,6 +7,11 @@ import { NavbarGroup, Intent, Alignment, + Menu, + MenuItem, + Popover, + PopoverInteractionKind, + Position, } from '@blueprintjs/core'; import { useHistory } from 'react-router-dom'; @@ -35,6 +40,8 @@ import { useDownloadExportPdf } from '@/hooks/query/FinancialReports/use-export- import { SaleEstimateAction, AbilitySubject } from '@/constants/abilityOption'; import { compose } from '@/utils'; import { DialogsName } from '@/constants/dialogs'; +import withDrawerActions from '@/containers/Drawer/withDrawerActions'; +import { DRAWERS } from '@/constants/drawers'; /** * Estimates list actions bar. @@ -52,6 +59,9 @@ function EstimateActionsBar({ // #withDialogActions openDialog, + // #withDrawerActions + openDrawer, + // #withSettingsActions addSetting, }) { @@ -96,6 +106,10 @@ function EstimateActionsBar({ const handlePrintBtnClick = () => { downloadExportPdf({ resource: 'SaleEstimate' }); }; + // Handle customize button clicl. + const handleCustomizeBtnClick = () => { + openDrawer(DRAWERS.ESTIMATE_CUSTOMIZE); + }; return ( @@ -167,6 +181,25 @@ function EstimateActionsBar({ + + + + } + > +