From d67783a37d20810e7968287090ab093a189e45fa Mon Sep 17 00:00:00 2001 From: Munyua123 Date: Tue, 17 Dec 2024 15:33:35 +0300 Subject: [PATCH] (fix) Add the payment mode module --- packages/esm-billing-app/src/index.ts | 5 +- .../payment-mode-dashboard.component.tsx | 14 +- .../payment-modes/payment-mode.workspace.tsx | 228 +++++++----------- packages/esm-billing-app/src/routes.json | 4 + 4 files changed, 98 insertions(+), 153 deletions(-) diff --git a/packages/esm-billing-app/src/index.ts b/packages/esm-billing-app/src/index.ts index e02430c..7359957 100644 --- a/packages/esm-billing-app/src/index.ts +++ b/packages/esm-billing-app/src/index.ts @@ -13,7 +13,7 @@ import VisitAttributeTags from './invoice/payments/visit-tags/visit-attribute.co import ServiceMetrics from './billable-services/dashboard/service-metrics.component'; import appMenu from './billable-services/billable-services-menu-item/item.component'; -import DrugOrder from './billable-services/billable-item/drug-order/drug-order.component'; +// import DrugOrder from './billable-services/billable-item/drug-order/drug-order.component'; import LabOrder from './billable-services/billable-item/test-order/lab-order.component'; import ProcedureOrder from './billable-services/billable-item/test-order/procedure-order.component'; import PriceInfoOrder from './billable-services/billable-item/test-order/price-info-order.componet'; @@ -21,6 +21,8 @@ import PriceInfoOrder from './billable-services/billable-item/test-order/price-i import { BulkImportBillableServices } from './billable-services/bulk-import-billable-service.modal'; import { CreatePaymentPoint } from './payment-points/create-payment-point.component'; +import CreatePaymentMode from './payment-modes/payment-mode.workspace'; + import { ClockIn } from './payment-points/payment-point/clock-in.component'; import { ClockOut } from './payment-points/payment-point/clock-out.component'; import DeletePaymentModeModal from './payment-modes/delete-payment-mode.modal'; @@ -104,6 +106,7 @@ export const visitAttributeTags = getSyncLifecycle(VisitAttributeTags, options); export const billableServicesAppMenuItem = getSyncLifecycle(appMenu, options); export const createPaymentPoint = getSyncLifecycle(CreatePaymentPoint, options); +export const createPaymentMode = getSyncLifecycle(CreatePaymentMode, options) // export const drugOrder = getSyncLifecycle(DrugOrder, options); export const labOrder = getSyncLifecycle(LabOrder, options); diff --git a/packages/esm-billing-app/src/payment-modes/payment-mode-dashboard.component.tsx b/packages/esm-billing-app/src/payment-modes/payment-mode-dashboard.component.tsx index 493ab2e..0287b66 100644 --- a/packages/esm-billing-app/src/payment-modes/payment-mode-dashboard.component.tsx +++ b/packages/esm-billing-app/src/payment-modes/payment-mode-dashboard.component.tsx @@ -55,6 +55,12 @@ const PaymentModeDashboard: React.FC = () => { }); }; + const createPaymentModeModal = () => { + const dispose = showModal('create-payment-mode', { + closeModal: () => dispose(), + }); + } + if (isLoading) { return ; } @@ -106,13 +112,7 @@ const PaymentModeDashboard: React.FC = () => {
- {attributeTypeFields.map((field, index) => ( - - ))} - -
- - - - - - +
+ Create Payment Mode + + ( + + )} + /> + ( + + )} + /> + + + + + +
); }; -export default PaymentModeWorkspace; +export default CreatePaymentMode; diff --git a/packages/esm-billing-app/src/routes.json b/packages/esm-billing-app/src/routes.json index aeeed79..f0d6f76 100644 --- a/packages/esm-billing-app/src/routes.json +++ b/packages/esm-billing-app/src/routes.json @@ -166,6 +166,10 @@ { "name": "paid-bill-receipt-print-preview-modal", "component": "paidBillReceiptPrintPreviewModal" + }, + { + "name": "create-payment-mode", + "component": "createPaymentMode" } ] }