@openmrs/esm-billing-app 1.0.2-pre.681 → 1.0.2-pre.683
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/8638.js +1 -1
- package/dist/8638.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-billing-app.js.buildmanifest.json +6 -6
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/bill-history/bill-history.component.tsx +11 -13
- package/src/bill-history/bill-history.scss +4 -94
|
@@ -1236,9 +1236,9 @@
|
|
|
1236
1236
|
"initial": false,
|
|
1237
1237
|
"entry": false,
|
|
1238
1238
|
"recorded": false,
|
|
1239
|
-
"size":
|
|
1239
|
+
"size": 1084459,
|
|
1240
1240
|
"sizes": {
|
|
1241
|
-
"javascript":
|
|
1241
|
+
"javascript": 1084417,
|
|
1242
1242
|
"consume-shared": 42
|
|
1243
1243
|
},
|
|
1244
1244
|
"names": [],
|
|
@@ -1252,7 +1252,7 @@
|
|
|
1252
1252
|
"auxiliaryFiles": [
|
|
1253
1253
|
"8638.js.map"
|
|
1254
1254
|
],
|
|
1255
|
-
"hash": "
|
|
1255
|
+
"hash": "2f05e231d6f881bd",
|
|
1256
1256
|
"childrenByOrder": {}
|
|
1257
1257
|
},
|
|
1258
1258
|
{
|
|
@@ -1260,10 +1260,10 @@
|
|
|
1260
1260
|
"initial": true,
|
|
1261
1261
|
"entry": true,
|
|
1262
1262
|
"recorded": false,
|
|
1263
|
-
"size":
|
|
1263
|
+
"size": 5409949,
|
|
1264
1264
|
"sizes": {
|
|
1265
1265
|
"consume-shared": 210,
|
|
1266
|
-
"javascript":
|
|
1266
|
+
"javascript": 5387296,
|
|
1267
1267
|
"share-init": 336,
|
|
1268
1268
|
"runtime": 22107
|
|
1269
1269
|
},
|
|
@@ -1280,7 +1280,7 @@
|
|
|
1280
1280
|
"auxiliaryFiles": [
|
|
1281
1281
|
"main.js.map"
|
|
1282
1282
|
],
|
|
1283
|
-
"hash": "
|
|
1283
|
+
"hash": "e5d8d93fd0371708",
|
|
1284
1284
|
"childrenByOrder": {}
|
|
1285
1285
|
},
|
|
1286
1286
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.24.0","fhir2":">=1.2"},"pages":[{"component":"billableServicesHome","route":"billable-services"}],"extensions":[{"component":"billingDashboardLink","name":"billing-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"billing","title":"billing","slot":"billing-dashboard-slot"},"featureFlag":"billing"},{"component":"root","name":"billing-dashboard-root","slot":"billing-dashboard-slot"},{"name":"billing-patient-summary","component":"billingPatientSummary","slot":"patient-chart-billing-dashboard-slot","order":10,"meta":{"columnSpan":4}},{"name":"billing-summary-dashboard-link","component":"billingSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-billing-dashboard-slot","path":"Billing history"},"featureFlag":"billing"},{"name":"billable-services-app-menu-item","component":"billableServicesAppMenuItem","slot":"app-menu-item-slot","meta":{"name":"Billable Services"}},{"name":"billing-checkin-form","slot":"extra-visit-attribute-slot","component":"billingCheckInForm","featureFlag":"billing"},{"slot":"system-admin-page-card-link-slot","component":"billableServicesCardLink","name":"billable-services-admin-card-link"},{"name":"patient-banner-billing-tags","component":"visitAttributeTags","slot":"patient-banner-tags-slot","order":2},{"name":"billing-home-tiles-ext","slot":"billing-home-tiles-slot","component":"serviceMetrics"},{"name":"edit-bill-line-item-dialog","component":"editBillLineItemDialog","online":true,"offline":true}],"modals":[{"name":"require-billing-modal","component":"requirePaymentModal"}],"workspaces":[{"name":"billing-form-workspace","title":"billingForm","component":"billingFormWorkspace","type":"form"}],"featureFlags":[{"flagName":"billing","label":"Billing module","description":"This feature introduces navigation links on the patient chart and home page to allow accessing the billing module features"}],"version":"1.0.2-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.24.0","fhir2":">=1.2"},"pages":[{"component":"billableServicesHome","route":"billable-services"}],"extensions":[{"component":"billingDashboardLink","name":"billing-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"billing","title":"billing","slot":"billing-dashboard-slot"},"featureFlag":"billing"},{"component":"root","name":"billing-dashboard-root","slot":"billing-dashboard-slot"},{"name":"billing-patient-summary","component":"billingPatientSummary","slot":"patient-chart-billing-dashboard-slot","order":10,"meta":{"columnSpan":4}},{"name":"billing-summary-dashboard-link","component":"billingSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":11,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-billing-dashboard-slot","path":"Billing history"},"featureFlag":"billing"},{"name":"billable-services-app-menu-item","component":"billableServicesAppMenuItem","slot":"app-menu-item-slot","meta":{"name":"Billable Services"}},{"name":"billing-checkin-form","slot":"extra-visit-attribute-slot","component":"billingCheckInForm","featureFlag":"billing"},{"slot":"system-admin-page-card-link-slot","component":"billableServicesCardLink","name":"billable-services-admin-card-link"},{"name":"patient-banner-billing-tags","component":"visitAttributeTags","slot":"patient-banner-tags-slot","order":2},{"name":"billing-home-tiles-ext","slot":"billing-home-tiles-slot","component":"serviceMetrics"},{"name":"edit-bill-line-item-dialog","component":"editBillLineItemDialog","online":true,"offline":true}],"modals":[{"name":"require-billing-modal","component":"requirePaymentModal"}],"workspaces":[{"name":"billing-form-workspace","title":"billingForm","component":"billingFormWorkspace","type":"form"}],"featureFlags":[{"flagName":"billing","label":"Billing module","description":"This feature introduces navigation links on the patient chart and home page to allow accessing the billing module features"}],"version":"1.0.2-pre.683"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
Tile,
|
|
20
20
|
} from '@carbon/react';
|
|
21
21
|
import { Add } from '@carbon/react/icons';
|
|
22
|
-
import {
|
|
22
|
+
import { launchWorkspace, useConfig, usePagination } from '@openmrs/esm-framework';
|
|
23
23
|
import { CardHeader, EmptyDataIllustration, ErrorState, usePaginationInfo } from '@openmrs/esm-patient-common-lib';
|
|
24
24
|
import { convertToCurrency } from '../helpers';
|
|
25
25
|
import { useBills } from '../billing.resource';
|
|
@@ -33,11 +33,9 @@ interface BillHistoryProps {
|
|
|
33
33
|
const BillHistory: React.FC<BillHistoryProps> = ({ patientUuid }) => {
|
|
34
34
|
const { t } = useTranslation();
|
|
35
35
|
const { bills, isLoading, error } = useBills(patientUuid);
|
|
36
|
-
const layout = useLayoutType();
|
|
37
|
-
const responsiveSize = isDesktop(layout) ? 'sm' : 'lg';
|
|
38
36
|
const { paginated, goTo, results, currentPage } = usePagination(bills);
|
|
39
37
|
const { pageSize, defaultCurrency } = useConfig();
|
|
40
|
-
const [currentPageSize, setCurrentPageSize] =
|
|
38
|
+
const [currentPageSize, setCurrentPageSize] = useState(pageSize);
|
|
41
39
|
const { pageSizes } = usePaginationInfo(pageSize, bills?.length, currentPage, results?.length);
|
|
42
40
|
|
|
43
41
|
const headerData = [
|
|
@@ -74,7 +72,7 @@ const BillHistory: React.FC<BillHistoryProps> = ({ patientUuid }) => {
|
|
|
74
72
|
if (isLoading) {
|
|
75
73
|
return (
|
|
76
74
|
<div className={styles.loaderContainer}>
|
|
77
|
-
<DataTableSkeleton showHeader={false} showToolbar={false} zebra size=
|
|
75
|
+
<DataTableSkeleton showHeader={false} showToolbar={false} zebra size="md" />
|
|
78
76
|
</div>
|
|
79
77
|
);
|
|
80
78
|
}
|
|
@@ -113,15 +111,15 @@ const BillHistory: React.FC<BillHistoryProps> = ({ patientUuid }) => {
|
|
|
113
111
|
</Button>
|
|
114
112
|
</CardHeader>
|
|
115
113
|
<div className={styles.billHistoryContainer}>
|
|
116
|
-
<DataTable isSortable rows={rowData} headers={headerData} size=
|
|
114
|
+
<DataTable isSortable rows={rowData} headers={headerData} size="md" useZebraStyles>
|
|
117
115
|
{({
|
|
118
|
-
rows,
|
|
119
|
-
headers,
|
|
120
116
|
getExpandHeaderProps,
|
|
121
|
-
getTableProps,
|
|
122
|
-
getTableContainerProps,
|
|
123
117
|
getHeaderProps,
|
|
124
118
|
getRowProps,
|
|
119
|
+
getTableContainerProps,
|
|
120
|
+
getTableProps,
|
|
121
|
+
headers,
|
|
122
|
+
rows,
|
|
125
123
|
}) => (
|
|
126
124
|
<TableContainer {...getTableContainerProps}>
|
|
127
125
|
<Table className={styles.table} {...getTableProps()} aria-label="Bill list">
|
|
@@ -153,7 +151,7 @@ const BillHistory: React.FC<BillHistoryProps> = ({ patientUuid }) => {
|
|
|
153
151
|
))}
|
|
154
152
|
</TableExpandRow>
|
|
155
153
|
{row.isExpanded ? (
|
|
156
|
-
<TableExpandedRow
|
|
154
|
+
<TableExpandedRow colSpan={headers.length + 1}>
|
|
157
155
|
<div className={styles.container} key={i}>
|
|
158
156
|
<InvoiceTable bill={currentBill} />
|
|
159
157
|
</div>
|
|
@@ -178,7 +176,7 @@ const BillHistory: React.FC<BillHistoryProps> = ({ patientUuid }) => {
|
|
|
178
176
|
pageSizes={pageSizes}
|
|
179
177
|
totalItems={bills.length}
|
|
180
178
|
className={styles.pagination}
|
|
181
|
-
size=
|
|
179
|
+
size="md"
|
|
182
180
|
onChange={({ page: newPage, pageSize }) => {
|
|
183
181
|
if (newPage !== currentPage) {
|
|
184
182
|
goTo(newPage);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
4
|
|
|
5
5
|
.container {
|
|
6
|
-
margin: layout.$spacing-
|
|
6
|
+
margin: layout.$spacing-03 0;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.emptyStateContainer,
|
|
@@ -21,27 +21,8 @@
|
|
|
21
21
|
padding-bottom: 0;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
justify-content: space-between;
|
|
27
|
-
align-items: center;
|
|
28
|
-
padding: layout.$spacing-04 0 layout.$spacing-04 layout.$spacing-05;
|
|
29
|
-
background-color: $ui-02;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.backgroundDataFetchingIndicator {
|
|
33
|
-
align-items: center;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex: 1 1 0%;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.tableContainer section {
|
|
40
|
-
position: relative;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.tableContainer a {
|
|
44
|
-
text-decoration: none;
|
|
24
|
+
.errorContainer {
|
|
25
|
+
@extend .container;
|
|
45
26
|
}
|
|
46
27
|
|
|
47
28
|
.pagination {
|
|
@@ -56,34 +37,6 @@
|
|
|
56
37
|
display: none;
|
|
57
38
|
}
|
|
58
39
|
|
|
59
|
-
.emptyRow {
|
|
60
|
-
padding: 0 layout.$spacing-05;
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.visitSummaryContainer {
|
|
66
|
-
width: 100%;
|
|
67
|
-
max-width: 768px;
|
|
68
|
-
margin: layout.$spacing-05 auto;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.expandedActiveVisitRow > td > div {
|
|
72
|
-
max-height: max-content !important;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.expandedActiveVisitRow td {
|
|
76
|
-
padding: 0 layout.$spacing-07;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.expandedActiveVisitRow th[colspan] td[colspan] > div:first-child {
|
|
80
|
-
padding: 0 layout.$spacing-05;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.action {
|
|
84
|
-
margin-bottom: layout.$spacing-03;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
40
|
.illo {
|
|
88
41
|
margin-top: layout.$spacing-05;
|
|
89
42
|
}
|
|
@@ -95,55 +48,11 @@
|
|
|
95
48
|
margin-bottom: layout.$spacing-03;
|
|
96
49
|
}
|
|
97
50
|
|
|
98
|
-
.desktopHeading,
|
|
99
|
-
.tabletHeading {
|
|
100
|
-
text-align: left;
|
|
101
|
-
text-transform: capitalize;
|
|
102
|
-
|
|
103
|
-
h4 {
|
|
104
|
-
@include type.type-style('heading-compact-02');
|
|
105
|
-
color: $text-02;
|
|
106
|
-
|
|
107
|
-
&:after {
|
|
108
|
-
content: '';
|
|
109
|
-
display: block;
|
|
110
|
-
width: layout.$spacing-07;
|
|
111
|
-
padding-top: 3px;
|
|
112
|
-
border-bottom: 0.375rem solid;
|
|
113
|
-
@include brand-03(border-bottom-color);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
51
|
.tile {
|
|
119
52
|
text-align: center;
|
|
120
53
|
border: 1px solid $ui-03;
|
|
121
54
|
}
|
|
122
55
|
|
|
123
|
-
.filterEmptyState {
|
|
124
|
-
display: flex;
|
|
125
|
-
justify-content: center;
|
|
126
|
-
align-items: center;
|
|
127
|
-
padding: layout.$spacing-05;
|
|
128
|
-
margin: layout.$spacing-09;
|
|
129
|
-
text-align: center;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.filterEmptyStateTile {
|
|
133
|
-
margin: auto;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.filterEmptyStateContent {
|
|
137
|
-
@include type.type-style('heading-compact-02');
|
|
138
|
-
color: $text-02;
|
|
139
|
-
margin-bottom: 0.5rem;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.filterEmptyStateHelper {
|
|
143
|
-
@include type.type-style('body-compact-01');
|
|
144
|
-
color: $text-02;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
56
|
.table {
|
|
148
57
|
width: 100%;
|
|
149
58
|
table-layout: fixed; // This helps with uniform column sizing
|
|
@@ -156,6 +65,7 @@
|
|
|
156
65
|
text-overflow: unset;
|
|
157
66
|
}
|
|
158
67
|
}
|
|
68
|
+
|
|
159
69
|
:global(tr.cds--parent-row.cds--expandable-row + tr[data-child-row]) td {
|
|
160
70
|
padding-left: layout.$spacing-05;
|
|
161
71
|
}
|