Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) Fix adding a bill in the billing form workspace. #46

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
'@openmrs/esm-framework': '@openmrs/esm-framework/mock',
'^dexie$': require.resolve('dexie'),
'^lodash-es/(.*)$': 'lodash/$1',
'^lodash-es$': 'lodash',
'^react-i18next$': path.resolve(__dirname, '__mocks__', 'react-i18next.js'),
'^uuid$': path.resolve(__dirname, 'node_modules', 'uuid', 'dist', 'index.js'),
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"swr": "2.x"
},
"devDependencies": {
"@openmrs/esm-framework": "^5.5.1-pre.1745",
"@openmrs/esm-framework": "next",
"@openmrs/esm-patient-common-lib": "next",
"@playwright/test": "^1.41.1",
"@swc/cli": "^0.3.2",
Expand Down Expand Up @@ -99,7 +99,7 @@
"jest-environment-jsdom": "^29.7.0",
"lerna": "^8.0.2",
"lodash": "^4.17.21",
"openmrs": "^5.5.1-pre.1745",
"openmrs": "next",
"pinst": "^3.0.0",
"prettier": "^3.2.4",
"pretty-quick": "^4.0.0",
Expand Down
24 changes: 5 additions & 19 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
import { configSchema } from './config-schema';
import { createDashboardLink, registerWorkspace } from '@openmrs/esm-patient-common-lib';
import { createDashboardLink } from '@openmrs/esm-patient-common-lib';
import { createLeftPanelLink } from './left-panel-link.component';
import { dashboardMeta } from './dashboard.meta';
import {
defineConfigSchema,
getAsyncLifecycle,
getSyncLifecycle,
registerFeatureFlag,
translateFrom,
} from '@openmrs/esm-framework';
import { defineConfigSchema, getAsyncLifecycle, getSyncLifecycle, registerFeatureFlag } from '@openmrs/esm-framework';
import BillableServiceHome from './billable-services/billable-services-home.component';
import BillableServicesCardLink from './billable-services-admin-card-link.component';
import BillHistory from './bill-history/bill-history.component';
import BillingCheckInForm from './billing-form/billing-checkin-form.component';
import RequirePaymentModal from './modal/require-payment-modal.component';
import RootComponent from './root.component';
import VisitAttributeTags from './invoice/payments/visit-tags/visit-attribute.component';
import BillableServicesDashboard from './billable-services/dashboard/dashboard.component';
import ServiceMetrics from './billable-services/dashboard/service-metrics.component';
import appMenu from './billable-services/billable-services-menu-item/item.component';

Expand Down Expand Up @@ -46,16 +39,6 @@ export const importTranslation = require.context('../translations', false, /.jso

export function startupApp() {
defineConfigSchema(moduleName, configSchema);

// t('billingForm', 'Billing form')
registerWorkspace({
name: 'billing-form-workspace',
title: translateFrom(moduleName, 'billingForm', 'Billing form'),
load: getAsyncLifecycle(() => import('./billing-form/billing-form.component'), options),
type: 'billing',
canHide: false,
width: 'wider',
});
}

export const billingSummaryDashboardLink = getSyncLifecycle(
Expand All @@ -77,3 +60,6 @@ export const editBillLineItemDialog = getAsyncLifecycle(() => import('./bill-ite
featureName: 'edit bill line item',
moduleName,
});

// t('billingForm', 'Billing form')
export const billingFormWorkspace = getAsyncLifecycle(() => import('./billing-form/billing-form.component'), options);
8 changes: 8 additions & 0 deletions src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,13 @@
"online": true,
"offline": true
}
],
"workspaces": [
{
"name": "billing-form-workspace",
"title": "billingForm",
"component": "billingFormWorkspace",
"type": "form"
}
]
}
Loading
Loading