@openmrs/esm-billing-app 1.0.2-pre.786 → 1.0.2-pre.793

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.
@@ -71,9 +71,9 @@
71
71
  "initial": false,
72
72
  "entry": false,
73
73
  "recorded": false,
74
- "size": 1174566,
74
+ "size": 1173460,
75
75
  "sizes": {
76
- "javascript": 1174524,
76
+ "javascript": 1173418,
77
77
  "consume-shared": 42
78
78
  },
79
79
  "names": [],
@@ -87,7 +87,7 @@
87
87
  "auxiliaryFiles": [
88
88
  "942.js.map"
89
89
  ],
90
- "hash": "df6eba76d10cbba0",
90
+ "hash": "aff6c4786ba5c020",
91
91
  "childrenByOrder": {}
92
92
  },
93
93
  {
@@ -1209,10 +1209,10 @@
1209
1209
  "initial": true,
1210
1210
  "entry": true,
1211
1211
  "recorded": false,
1212
- "size": 5472396,
1212
+ "size": 5471290,
1213
1213
  "sizes": {
1214
1214
  "consume-shared": 210,
1215
- "javascript": 5449741,
1215
+ "javascript": 5448635,
1216
1216
  "share-init": 336,
1217
1217
  "runtime": 22109
1218
1218
  },
@@ -1229,7 +1229,7 @@
1229
1229
  "auxiliaryFiles": [
1230
1230
  "main.js.map"
1231
1231
  ],
1232
- "hash": "e97d3163f7776c90",
1232
+ "hash": "107ca2c0e902d4db",
1233
1233
  "childrenByOrder": {}
1234
1234
  },
1235
1235
  {
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":"editBillLineItemModal","online":true,"offline":true}],"modals":[{"name":"add-cash-point-modal","component":"addCashPointModal"},{"name":"add-payment-mode-modal","component":"addPaymentModeModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"edit-bill-item-modal","component":"editBillLineItemModal"},{"name":"edit-billable-service-modal","component":"editBillableServiceModal"},{"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.786"}
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":"editBillLineItemModal","online":true,"offline":true}],"modals":[{"name":"add-cash-point-modal","component":"addCashPointModal"},{"name":"add-payment-mode-modal","component":"addPaymentModeModal"},{"name":"delete-payment-mode-modal","component":"deletePaymentModeModal"},{"name":"edit-bill-item-modal","component":"editBillLineItemModal"},{"name":"edit-billable-service-modal","component":"editBillableServiceModal"},{"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.793"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-billing-app",
3
- "version": "1.0.2-pre.786",
3
+ "version": "1.0.2-pre.793",
4
4
  "description": "O3 frontend module for handling billing concerns in healthcare settings",
5
5
  "browser": "dist/openmrs-esm-billing-app.js",
6
6
  "main": "src/index.ts",
@@ -5,25 +5,25 @@
5
5
  .invoiceBreakdown {
6
6
  display: grid;
7
7
  grid-template-columns: 1fr 1fr;
8
- align-items: flex-end;
9
- margin: layout.$spacing-02 0;
8
+ align-items: center;
9
+ margin: layout.$spacing-03 0;
10
10
  }
11
11
 
12
12
  .label {
13
- @include type.type-style('heading-03');
13
+ @include type.type-style('body-compact-01');
14
14
  color: colors.$gray-100;
15
- text-align: end;
15
+ text-align: left;
16
16
  }
17
17
 
18
18
  .value {
19
- @extend .label;
20
- font-weight: bold;
19
+ @include type.type-style('body-compact-01');
20
+ color: colors.$gray-100;
21
+ text-align: left;
21
22
  margin-left: layout.$spacing-03;
22
- text-align: start;
23
23
  }
24
24
 
25
25
  .extendedLabel {
26
- @extend .label;
27
- font-weight: bold;
26
+ @include type.type-style('heading-compact-01');
28
27
  color: crimson;
28
+ text-align: left;
29
29
  }
@@ -26,13 +26,20 @@ const PaymentForm: React.FC<PaymentFormProps> = ({ disablePayment, isSingleLineI
26
26
  const [isFormVisible, setIsFormVisible] = useState(isSingleLineItem);
27
27
 
28
28
  useEffect(() => {
29
- if (isSingleLineItem) {
29
+ if (isSingleLineItem && !disablePayment) {
30
30
  setIsFormVisible(true);
31
31
  if (fields.length === 0) {
32
32
  append(DEFAULT_PAYMENT);
33
33
  }
34
34
  }
35
- }, [isSingleLineItem, append, fields.length]);
35
+ }, [isSingleLineItem, append, fields.length, disablePayment]);
36
+
37
+ useEffect(() => {
38
+ if (disablePayment) {
39
+ setIsFormVisible(false);
40
+ remove();
41
+ }
42
+ }, [disablePayment, remove]);
36
43
 
37
44
  const handleAppendPaymentMode = useCallback(() => {
38
45
  setIsFormVisible(true);
@@ -63,7 +70,7 @@ const PaymentForm: React.FC<PaymentFormProps> = ({ disablePayment, isSingleLineI
63
70
  name={`payment.${index}.method`}
64
71
  render={({ field }) => (
65
72
  <Dropdown
66
- id="paymentMethod"
73
+ id={`paymentMethod-${fieldItem.id}`}
67
74
  onChange={({ selectedItem }) => field.onChange(selectedItem?.uuid)}
68
75
  titleText={t('paymentMethod', 'Payment method')}
69
76
  label={t('selectPaymentMethod', 'Select payment method')}
@@ -82,7 +89,7 @@ const PaymentForm: React.FC<PaymentFormProps> = ({ disablePayment, isSingleLineI
82
89
  allowEmpty
83
90
  disableWheel
84
91
  hideSteppers
85
- id="paymentAmount"
92
+ id={`paymentAmount-${fieldItem.id}`}
86
93
  invalid={!!errors?.payment?.[index]?.amount}
87
94
  invalidText={errors?.payment?.[index]?.amount?.message}
88
95
  label={t('amount', 'Amount')}
@@ -100,7 +107,7 @@ const PaymentForm: React.FC<PaymentFormProps> = ({ disablePayment, isSingleLineI
100
107
  control={control}
101
108
  render={({ field }) => (
102
109
  <TextInput
103
- id="paymentReferenceCode"
110
+ id={`paymentReferenceCode-${fieldItem.id}`}
104
111
  labelText={t('referenceNumber', 'Reference number')}
105
112
  name={field.name}
106
113
  onBlur={field.onBlur}
@@ -88,7 +88,7 @@ const Payments: React.FC<PaymentProps> = ({ bill, mutate }) => {
88
88
  if (currentVisit) {
89
89
  updateBillVisitAttribute(currentVisit);
90
90
  }
91
- methods.reset({ payment: [{ method: '', amount: undefined, referenceCode: '' }] });
91
+ methods.reset({ payment: [{ method: '', amount: null, referenceCode: '' }] });
92
92
  mutate();
93
93
  } catch (error) {
94
94
  showSnackbar({
@@ -32,14 +32,15 @@
32
32
  }
33
33
 
34
34
  .paymentTotals {
35
- margin: layout.$spacing-05 0;
35
+ margin: layout.$spacing-05 auto;
36
36
  padding: layout.$spacing-07 layout.$spacing-05;
37
+ max-width: 90%;
37
38
  }
38
39
 
39
40
  .processPayments {
40
41
  display: flex;
41
42
  justify-content: flex-end;
42
- margin: layout.$spacing-05;
43
+ margin: layout.$spacing-05 0;
43
44
  padding-top: layout.$spacing-05;
44
45
  column-gap: layout.$spacing-04;
45
46
  border-top: 1px solid colors.$cool-gray-40;