@openmrs/esm-stock-management-app 3.0.1-pre.853 → 3.0.1-pre.855
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/.husky/pre-commit +1 -4
- package/__mocks__/react-i18next.js +9 -8
- package/dist/10.js +1 -1
- package/dist/10.js.map +1 -1
- package/dist/119.js +1 -1
- package/dist/119.js.map +1 -1
- package/dist/14.js +1 -1
- package/dist/14.js.map +1 -1
- package/dist/172.js +1 -1
- package/dist/172.js.map +1 -1
- package/dist/20.js +1 -1
- package/dist/20.js.map +1 -1
- package/dist/290.js +1 -1
- package/dist/290.js.map +1 -1
- package/dist/467.js +1 -1
- package/dist/467.js.map +1 -1
- package/dist/574.js +1 -1
- package/dist/606.js +1 -1
- package/dist/606.js.map +1 -1
- package/dist/627.js +1 -0
- package/dist/627.js.map +1 -0
- package/dist/642.js +1 -1
- package/dist/642.js.map +1 -1
- package/dist/675.js +1 -1
- package/dist/675.js.map +1 -1
- package/dist/727.js +1 -1
- package/dist/727.js.map +1 -1
- package/dist/842.js +1 -1
- package/dist/842.js.map +1 -1
- package/dist/93.js +1 -1
- package/dist/93.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-stock-management-app.js.buildmanifest.json +70 -70
- package/dist/routes.json +1 -1
- package/jest.config.js +3 -6
- package/package.json +1 -1
- package/src/core/components/table/table.component.tsx +2 -2
- package/src/index.ts +5 -5
- package/src/stock-items/add-bulk-stock-item/add-stock-items-bulk-import-action-button.component.tsx +3 -3
- package/src/stock-items/add-bulk-stock-item/{stock-items-bulk-import.modal.tsx → stock-items-bulk-import.component.tsx} +19 -20
- package/src/stock-items/add-bulk-stock-item/stock-items-bulk-import.resource.ts +1 -1
- package/src/stock-items/add-bulk-stock-item/stock-items-bulk-import.test.tsx +59 -59
- package/src/stock-items/add-stock-item/add-stock-action-button.component.tsx +6 -6
- package/src/stock-items/add-stock-item/add-stock-item.component.tsx +4 -6
- package/src/stock-items/add-stock-item/add-stock-item.scss +0 -5
- package/src/stock-items/add-stock-item/add-stock-item.test.tsx +43 -28
- package/src/stock-items/add-stock-item/packaging-units/packaging-units-delete-modal.component.tsx +4 -3
- package/src/stock-items/add-stock-item/packaging-units/packaging-units.component.tsx +10 -9
- package/src/stock-items/add-stock-item/packaging-units/packaging-units.scss +4 -4
- package/src/stock-items/add-stock-item/stock-item-details/stock-item-details.component.tsx +19 -27
- package/src/stock-items/add-stock-item/stock-item-references/stock-item-references.scss +4 -4
- package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rules.component.tsx +9 -15
- package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rules.scss +0 -1
- package/src/stock-items/add-stock-item/stock-item-rules/delete-stock-rule-modal.component.tsx +1 -2
- package/src/stock-items/add-stock-item/stock-item-rules/stock-item-rules.component.tsx +16 -14
- package/src/stock-items/add-stock-item/stock-item-rules/stock-item-rules.scss +3 -7
- package/src/stock-items/add-stock-item/transactions/printout/transactions-print-bincard-preview.modal.tsx +6 -14
- package/src/stock-items/add-stock-item/transactions/printout/transactions-print-stockcard-preview.modal.tsx +8 -14
- package/src/stock-items/edit-stock-item/edit-stock-item-action-menu.component.tsx +2 -2
- package/src/stock-items/stock-item.utils.tsx +5 -3
- package/src/stock-items/stock-items-table.component.tsx +45 -47
- package/src/stock-items/stock-items-table.resource.ts +2 -2
- package/src/stock-items/stock-items-table.scss +1 -5
- package/src/stock-items/stock-items-table.test.tsx +65 -106
- package/src/stock-locations/location-admin-form.component.tsx +4 -5
- package/src/stock-locations/stock-locations-table.component.tsx +8 -10
- package/src/stock-lookups/stock-lookups.resource.ts +2 -3
- package/src/stock-operations/stock-operations-dialog/stock-operations-dialog.component.tsx +2 -2
- package/src/stock-operations/stock-operations-forms/input-components/batch-no-selector.component.tsx +11 -11
- package/src/stock-operations/stock-operations-forms/input-components/batch-no-selector.test.tsx +25 -115
- package/src/stock-operations/stock-operations-forms/input-components/qty-uim-selector.test.tsx +65 -107
- package/src/stock-operations/stock-operations-forms/input-components/quantity-uom-selector.component.tsx +9 -9
- package/src/stock-operations/stock-operations-forms/input-components/stock-operation-reason-selector.test.tsx +153 -35
- package/src/stock-operations/stock-operations-forms/input-components/user-selector.test.tsx +29 -82
- package/src/stock-operations/stock-operations-forms/step1.test.tsx +69 -204
- package/src/stock-operations/stock-operations-forms/step2.test.tsx +63 -140
- package/src/stock-operations/stock-operations-forms/step3.test.tsx +60 -79
- package/src/stock-operations/stock-operations-forms/steps/stock-operation-items-form-step.component.tsx +5 -6
- package/src/stock-operations/stock-operations-forms/steps/stock-operation-submission-form-step.component.tsx +11 -12
- package/src/stock-operations/stock-operations-forms/stock-item-form/stock-item-form.scss +0 -1
- package/src/stock-operations/stock-operations-forms/stock-item-form/stock-item-form.workspace.tsx +12 -20
- package/src/stock-operations/stock-operations-forms/stock-operation-form.scss +0 -1
- package/src/stock-operations/stock-operations-forms/stock-operation-stepper/stepper.scss +3 -1
- package/src/stock-operations/stock-operations-forms/stock-operation-stepper/stock-operation-stepper.component.tsx +1 -2
- package/src/stock-reports/generate-report/create-stock-report.scss +2 -3
- package/src/stock-reports/generate-report/create-stock-report.workspace.tsx +25 -32
- package/src/stock-reports/report-list/stock-report-parameters.component.tsx +1 -1
- package/src/stock-reports/report-list/stock-report-status.component.tsx +1 -1
- package/src/stock-reports/report-list/stock-reports.component.tsx +25 -24
- package/src/stock-reports/report-list/stock-reports.scss +2 -10
- package/src/stock-sources/add-stock-sources/add-stock-sources.scss +4 -11
- package/src/stock-sources/add-stock-sources/add-stock-sources.test.tsx +36 -38
- package/src/stock-sources/add-stock-sources/add-stock-sources.workspace.tsx +30 -35
- package/src/stock-sources/delete-stock-modal.component.tsx +1 -2
- package/src/stock-sources/stock-sources-delete/stock-sources-delete.test.tsx +36 -27
- package/src/stock-sources/stock-sources-filter/stock-sources-filter.component.tsx +21 -33
- package/src/stock-sources/stock-sources-items-table.component.tsx +17 -16
- package/src/stock-sources/stock-sources-items-table.resource.ts +6 -8
- package/src/stock-sources/stock-sources-items-table.test.tsx +37 -60
- package/src/stock-sources/stock-sources.scss +2 -6
- package/src/stock-user-role-scopes/add-stock-user-scope/add-stock-user-role-scope.scss +13 -5
- package/src/stock-user-role-scopes/add-stock-user-scope/add-stock-user-role-scope.workspace.tsx +2 -2
- package/src/stock-user-role-scopes/delete-stock-user-scope-modal.component.tsx +1 -2
- package/translations/en.json +6 -5
- package/tsconfig.json +0 -4
- package/dist/33.js +0 -1
- package/dist/33.js.map +0 -1
@@ -6,9 +6,9 @@
|
|
6
6
|
"entry": false,
|
7
7
|
"recorded": false,
|
8
8
|
"reason": "split chunk (cache group: default)",
|
9
|
-
"size":
|
9
|
+
"size": 48639,
|
10
10
|
"sizes": {
|
11
|
-
"javascript":
|
11
|
+
"javascript": 48639
|
12
12
|
},
|
13
13
|
"names": [],
|
14
14
|
"idHints": [],
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"auxiliaryFiles": [
|
23
23
|
"10.js.map"
|
24
24
|
],
|
25
|
-
"hash": "
|
25
|
+
"hash": "aa1317c5b64cf010",
|
26
26
|
"childrenByOrder": {}
|
27
27
|
},
|
28
28
|
{
|
@@ -30,9 +30,9 @@
|
|
30
30
|
"initial": false,
|
31
31
|
"entry": false,
|
32
32
|
"recorded": false,
|
33
|
-
"size":
|
33
|
+
"size": 1232855,
|
34
34
|
"sizes": {
|
35
|
-
"javascript":
|
35
|
+
"javascript": 1232687,
|
36
36
|
"consume-shared": 168
|
37
37
|
},
|
38
38
|
"names": [],
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"auxiliaryFiles": [
|
47
47
|
"14.js.map"
|
48
48
|
],
|
49
|
-
"hash": "
|
49
|
+
"hash": "e3d190d1b7ec20b4",
|
50
50
|
"childrenByOrder": {}
|
51
51
|
},
|
52
52
|
{
|
@@ -54,9 +54,9 @@
|
|
54
54
|
"initial": false,
|
55
55
|
"entry": false,
|
56
56
|
"recorded": false,
|
57
|
-
"size":
|
57
|
+
"size": 15456,
|
58
58
|
"sizes": {
|
59
|
-
"javascript":
|
59
|
+
"javascript": 15456
|
60
60
|
},
|
61
61
|
"names": [],
|
62
62
|
"idHints": [],
|
@@ -70,7 +70,7 @@
|
|
70
70
|
"auxiliaryFiles": [
|
71
71
|
"20.js.map"
|
72
72
|
],
|
73
|
-
"hash": "
|
73
|
+
"hash": "46616b23364c05c8",
|
74
74
|
"childrenByOrder": {}
|
75
75
|
},
|
76
76
|
{
|
@@ -105,33 +105,9 @@
|
|
105
105
|
"initial": false,
|
106
106
|
"entry": false,
|
107
107
|
"recorded": false,
|
108
|
-
"size":
|
108
|
+
"size": 42268,
|
109
109
|
"sizes": {
|
110
|
-
"javascript":
|
111
|
-
},
|
112
|
-
"names": [],
|
113
|
-
"idHints": [],
|
114
|
-
"runtime": [
|
115
|
-
"@openmrs/esm-stock-management-app",
|
116
|
-
"main"
|
117
|
-
],
|
118
|
-
"files": [
|
119
|
-
"33.js"
|
120
|
-
],
|
121
|
-
"auxiliaryFiles": [
|
122
|
-
"33.js.map"
|
123
|
-
],
|
124
|
-
"hash": "2bf9136ba0abb4d8",
|
125
|
-
"childrenByOrder": {}
|
126
|
-
},
|
127
|
-
{
|
128
|
-
"rendered": true,
|
129
|
-
"initial": false,
|
130
|
-
"entry": false,
|
131
|
-
"recorded": false,
|
132
|
-
"size": 42642,
|
133
|
-
"sizes": {
|
134
|
-
"javascript": 42642
|
110
|
+
"javascript": 42268
|
135
111
|
},
|
136
112
|
"names": [],
|
137
113
|
"idHints": [],
|
@@ -145,7 +121,7 @@
|
|
145
121
|
"auxiliaryFiles": [
|
146
122
|
"93.js.map"
|
147
123
|
],
|
148
|
-
"hash": "
|
124
|
+
"hash": "6197ebfe2195c4fc",
|
149
125
|
"childrenByOrder": {}
|
150
126
|
},
|
151
127
|
{
|
@@ -153,9 +129,9 @@
|
|
153
129
|
"initial": false,
|
154
130
|
"entry": false,
|
155
131
|
"recorded": false,
|
156
|
-
"size":
|
132
|
+
"size": 66887,
|
157
133
|
"sizes": {
|
158
|
-
"javascript":
|
134
|
+
"javascript": 66887
|
159
135
|
},
|
160
136
|
"names": [],
|
161
137
|
"idHints": [],
|
@@ -169,7 +145,7 @@
|
|
169
145
|
"auxiliaryFiles": [
|
170
146
|
"119.js.map"
|
171
147
|
],
|
172
|
-
"hash": "
|
148
|
+
"hash": "e76277fbf5cfe6d7",
|
173
149
|
"childrenByOrder": {}
|
174
150
|
},
|
175
151
|
{
|
@@ -220,7 +196,7 @@
|
|
220
196
|
"auxiliaryFiles": [
|
221
197
|
"152.js.map"
|
222
198
|
],
|
223
|
-
"hash": "
|
199
|
+
"hash": "bc44194427fe5313",
|
224
200
|
"childrenByOrder": {}
|
225
201
|
},
|
226
202
|
{
|
@@ -228,9 +204,9 @@
|
|
228
204
|
"initial": false,
|
229
205
|
"entry": false,
|
230
206
|
"recorded": false,
|
231
|
-
"size":
|
207
|
+
"size": 31419,
|
232
208
|
"sizes": {
|
233
|
-
"javascript":
|
209
|
+
"javascript": 31419
|
234
210
|
},
|
235
211
|
"names": [],
|
236
212
|
"idHints": [],
|
@@ -244,7 +220,7 @@
|
|
244
220
|
"auxiliaryFiles": [
|
245
221
|
"172.js.map"
|
246
222
|
],
|
247
|
-
"hash": "
|
223
|
+
"hash": "910ab2a037928771",
|
248
224
|
"childrenByOrder": {}
|
249
225
|
},
|
250
226
|
{
|
@@ -252,10 +228,10 @@
|
|
252
228
|
"initial": true,
|
253
229
|
"entry": true,
|
254
230
|
"recorded": false,
|
255
|
-
"size":
|
231
|
+
"size": 5609400,
|
256
232
|
"sizes": {
|
257
233
|
"consume-shared": 210,
|
258
|
-
"javascript":
|
234
|
+
"javascript": 5587870,
|
259
235
|
"share-init": 210,
|
260
236
|
"runtime": 21110
|
261
237
|
},
|
@@ -272,7 +248,7 @@
|
|
272
248
|
"auxiliaryFiles": [
|
273
249
|
"main.js.map"
|
274
250
|
],
|
275
|
-
"hash": "
|
251
|
+
"hash": "4cd3aac1ddd4c0bc",
|
276
252
|
"childrenByOrder": {}
|
277
253
|
},
|
278
254
|
{
|
@@ -296,7 +272,7 @@
|
|
296
272
|
"auxiliaryFiles": [
|
297
273
|
"235.js.map"
|
298
274
|
],
|
299
|
-
"hash": "
|
275
|
+
"hash": "2f80e9b1e356bafa",
|
300
276
|
"childrenByOrder": {}
|
301
277
|
},
|
302
278
|
{
|
@@ -326,9 +302,9 @@
|
|
326
302
|
"initial": false,
|
327
303
|
"entry": false,
|
328
304
|
"recorded": false,
|
329
|
-
"size":
|
305
|
+
"size": 31491,
|
330
306
|
"sizes": {
|
331
|
-
"javascript":
|
307
|
+
"javascript": 31491
|
332
308
|
},
|
333
309
|
"names": [],
|
334
310
|
"idHints": [],
|
@@ -342,7 +318,7 @@
|
|
342
318
|
"auxiliaryFiles": [
|
343
319
|
"290.js.map"
|
344
320
|
],
|
345
|
-
"hash": "
|
321
|
+
"hash": "22ba51aad2322773",
|
346
322
|
"childrenByOrder": {}
|
347
323
|
},
|
348
324
|
{
|
@@ -418,9 +394,9 @@
|
|
418
394
|
"initial": false,
|
419
395
|
"entry": false,
|
420
396
|
"recorded": false,
|
421
|
-
"size":
|
397
|
+
"size": 58795,
|
422
398
|
"sizes": {
|
423
|
-
"javascript":
|
399
|
+
"javascript": 58795
|
424
400
|
},
|
425
401
|
"names": [],
|
426
402
|
"idHints": [],
|
@@ -434,7 +410,7 @@
|
|
434
410
|
"auxiliaryFiles": [
|
435
411
|
"467.js.map"
|
436
412
|
],
|
437
|
-
"hash": "
|
413
|
+
"hash": "64c9d3b132182845",
|
438
414
|
"childrenByOrder": {}
|
439
415
|
},
|
440
416
|
{
|
@@ -466,9 +442,9 @@
|
|
466
442
|
"initial": false,
|
467
443
|
"entry": false,
|
468
444
|
"recorded": false,
|
469
|
-
"size":
|
445
|
+
"size": 13486,
|
470
446
|
"sizes": {
|
471
|
-
"javascript":
|
447
|
+
"javascript": 13486
|
472
448
|
},
|
473
449
|
"names": [],
|
474
450
|
"idHints": [],
|
@@ -480,7 +456,7 @@
|
|
480
456
|
"574.js"
|
481
457
|
],
|
482
458
|
"auxiliaryFiles": [],
|
483
|
-
"hash": "
|
459
|
+
"hash": "18315afc0aa1e0c7",
|
484
460
|
"childrenByOrder": {}
|
485
461
|
},
|
486
462
|
{
|
@@ -488,9 +464,9 @@
|
|
488
464
|
"initial": false,
|
489
465
|
"entry": false,
|
490
466
|
"recorded": false,
|
491
|
-
"size":
|
467
|
+
"size": 16573,
|
492
468
|
"sizes": {
|
493
|
-
"javascript":
|
469
|
+
"javascript": 16573
|
494
470
|
},
|
495
471
|
"names": [],
|
496
472
|
"idHints": [],
|
@@ -504,7 +480,31 @@
|
|
504
480
|
"auxiliaryFiles": [
|
505
481
|
"606.js.map"
|
506
482
|
],
|
507
|
-
"hash": "
|
483
|
+
"hash": "181c2aa16d7cb6e8",
|
484
|
+
"childrenByOrder": {}
|
485
|
+
},
|
486
|
+
{
|
487
|
+
"rendered": true,
|
488
|
+
"initial": false,
|
489
|
+
"entry": false,
|
490
|
+
"recorded": false,
|
491
|
+
"size": 9345,
|
492
|
+
"sizes": {
|
493
|
+
"javascript": 9345
|
494
|
+
},
|
495
|
+
"names": [],
|
496
|
+
"idHints": [],
|
497
|
+
"runtime": [
|
498
|
+
"@openmrs/esm-stock-management-app",
|
499
|
+
"main"
|
500
|
+
],
|
501
|
+
"files": [
|
502
|
+
"627.js"
|
503
|
+
],
|
504
|
+
"auxiliaryFiles": [
|
505
|
+
"627.js.map"
|
506
|
+
],
|
507
|
+
"hash": "32663bf91f830cc9",
|
508
508
|
"childrenByOrder": {}
|
509
509
|
},
|
510
510
|
{
|
@@ -536,9 +536,9 @@
|
|
536
536
|
"initial": false,
|
537
537
|
"entry": false,
|
538
538
|
"recorded": false,
|
539
|
-
"size":
|
539
|
+
"size": 215097,
|
540
540
|
"sizes": {
|
541
|
-
"javascript":
|
541
|
+
"javascript": 215097
|
542
542
|
},
|
543
543
|
"names": [],
|
544
544
|
"idHints": [],
|
@@ -552,7 +552,7 @@
|
|
552
552
|
"auxiliaryFiles": [
|
553
553
|
"642.js.map"
|
554
554
|
],
|
555
|
-
"hash": "
|
555
|
+
"hash": "923f8e8456707ef2",
|
556
556
|
"childrenByOrder": {}
|
557
557
|
},
|
558
558
|
{
|
@@ -581,9 +581,9 @@
|
|
581
581
|
"initial": false,
|
582
582
|
"entry": false,
|
583
583
|
"recorded": false,
|
584
|
-
"size":
|
584
|
+
"size": 27379,
|
585
585
|
"sizes": {
|
586
|
-
"javascript":
|
586
|
+
"javascript": 27379
|
587
587
|
},
|
588
588
|
"names": [],
|
589
589
|
"idHints": [],
|
@@ -597,7 +597,7 @@
|
|
597
597
|
"auxiliaryFiles": [
|
598
598
|
"675.js.map"
|
599
599
|
],
|
600
|
-
"hash": "
|
600
|
+
"hash": "9e006777df7009f1",
|
601
601
|
"childrenByOrder": {}
|
602
602
|
},
|
603
603
|
{
|
@@ -621,7 +621,7 @@
|
|
621
621
|
"auxiliaryFiles": [
|
622
622
|
"703.js.map"
|
623
623
|
],
|
624
|
-
"hash": "
|
624
|
+
"hash": "93bd35de49275fd4",
|
625
625
|
"childrenByOrder": {}
|
626
626
|
},
|
627
627
|
{
|
@@ -653,9 +653,9 @@
|
|
653
653
|
"initial": false,
|
654
654
|
"entry": false,
|
655
655
|
"recorded": false,
|
656
|
-
"size":
|
656
|
+
"size": 330688,
|
657
657
|
"sizes": {
|
658
|
-
"javascript":
|
658
|
+
"javascript": 330688
|
659
659
|
},
|
660
660
|
"names": [],
|
661
661
|
"idHints": [],
|
@@ -669,7 +669,7 @@
|
|
669
669
|
"auxiliaryFiles": [
|
670
670
|
"727.js.map"
|
671
671
|
],
|
672
|
-
"hash": "
|
672
|
+
"hash": "5155c0c66fe346b0",
|
673
673
|
"childrenByOrder": {}
|
674
674
|
},
|
675
675
|
{
|
@@ -810,7 +810,7 @@
|
|
810
810
|
"auxiliaryFiles": [
|
811
811
|
"842.js.map"
|
812
812
|
],
|
813
|
-
"hash": "
|
813
|
+
"hash": "9cdbc856f54ca6bc",
|
814
814
|
"childrenByOrder": {}
|
815
815
|
},
|
816
816
|
{
|
package/dist/routes.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.24.0"},"extensions":[{"name":"stock-nav-menu","slot":"stock-sidebar-slot","component":"stockNavMenu","online":true,"offline":true},{"name":"overview-db-link","slot":"stock-page-dashboard-slot","component":"stockOverviewLink","meta":{"name":"overview","slot":"overview-dashboard-slot","title":"overview"},"order":0,"online":true,"offline":true},{"name":"stock-overview-db","slot":"overview-dashboard-slot","component":"stockOverview"},{"name":"operations-db-link","slot":"stock-page-dashboard-slot","component":"stockOperationsLink","meta":{"name":"operations","slot":"operations-dashboard-slot","title":"operations"},"order":2,"online":true,"offline":true},{"name":"stock-operations-db","slot":"operations-dashboard-slot","component":"stockOperations"},{"name":"items-db-link","slot":"stock-page-dashboard-slot","component":"stockItemsLink","meta":{"name":"items","slot":"items-dashboard-slot","title":"items"},"order":1,"online":true,"offline":true},{"name":"stock-items-db","slot":"items-dashboard-slot","component":"stockItems"},{"name":"user-scopes-db-link","slot":"stock-page-dashboard-slot","component":"stockUserScopesLink","meta":{"name":"user-scopes","slot":"user-scopes-dashboard-slot","title":"user-scopes"},"order":3,"online":true,"offline":true},{"name":"stock-user-scopes-db","slot":"user-scopes-dashboard-slot","component":"stockUserScopes"},{"name":"sources-db-link","slot":"stock-page-dashboard-slot","component":"stockSourcesLink","meta":{"name":"sources","slot":"sources-dashboard-slot","title":"Sources"},"order":2,"online":true,"offline":true},{"name":"stock-sources-db","slot":"sources-dashboard-slot","component":"stockSources"},{"name":"reports-db-link","slot":"stock-page-dashboard-slot","component":"stockReportsLink","meta":{"name":"reports","slot":"reports-dashboard-slot","title":"Reports"},"order":5,"online":true,"offline":true},{"name":"stock-reports-db","slot":"reports-dashboard-slot","component":"stockReports"},{"name":"settings-db-link","slot":"stock-page-dashboard-slot","component":"stockSettingsLink","meta":{"name":"settings","slot":"settings-dashboard-slot","title":"Settings"},"order":6,"online":true,"offline":true},{"name":"stock-settings-db","slot":"settings-dashboard-slot","component":"stockSettings"},{"name":"stock-management-admin-card-link","slot":"system-admin-page-card-link-slot","component":"stockManagementAdminCardLink"},{"name":"stock-management-app-menu-item","component":"stockManagementAppMenuItem","slot":"app-menu-item-slot","meta":{"name":" Stock Management"}},{"name":"delete-packaging-unit-button","component":"deletePackagingUnitButton"}],"modals":[{"name":"delete-stock-modal","component":"deleteStockModal"},{"name":"delete-stock-user-scope-modal","component":"deleteUserScopeModal"},{"name":"delete-stock-rule-modal","component":"deleteStockRuleModal"},{"name":"delete-packaging-unit-modal","component":"deletePackagingUnitModal"},{"name":"expired-stock-modal","component":"expiredStockModal"},{"name":"import-bulk-stock-items","component":"importBulkStockItemsModal"},{"name":"receiving-stock-modal","component":"receivingStockModal"},{"name":"stock-operation-dialog","component":"stockOperationModal"},{"name":"transactions-print-bincard-preview-modal","component":"transactionBincardPrintPreviewModal"},{"name":"transactions-print-stockcard-preview-modal","component":"transactionStockcardPrintPreviewModal"}],"workspaces":[{"name":"stock-operation-form-workspace","component":"stockOperationFormWorkspace","title":"Stock Operation","type":"form","canMaximize":true,"width":"extra-wide"},{"name":"stock-item-rules-form-workspace","component":"stockItemRulesFormWorkspace","title":"Stock Item Rules","type":"form"},{"name":"stock-item-form-workspace","component":"stockItemFormWorkspace","title":"Stock Items","type":"form","canMaximize":true,"width":"extra-wide"},{"name":"stock-sources-form-workspace","component":"stockSourcesFormWorkspace","title":"Stock Sources","type":"form","canMaximize":true,"width":"extra-wide"},{"name":"stock-location-form-workspace","component":"stockLocationsFormWorkspace","title":"Stock Locations","type":"form","canMaximize":true,"width":"extra-wide"},{"name":"stock-user-role-scopes-form-workspace","component":"stockUserScopesFormWorkspace","title":"User Role Scopes","type":"form","canMaximize":true,"width":"extra-wide"},{"name":"stock-reports-form-workspace","component":"stockReportsFormWorkspace","title":"Reports","type":"form","canMaximize":true,"width":"extra-wide"}],"pages":[{"component":"root","route":"stock-management"}],"version":"3.0.1-pre.
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.24.0"},"extensions":[{"name":"stock-nav-menu","slot":"stock-sidebar-slot","component":"stockNavMenu","online":true,"offline":true},{"name":"overview-db-link","slot":"stock-page-dashboard-slot","component":"stockOverviewLink","meta":{"name":"overview","slot":"overview-dashboard-slot","title":"overview"},"order":0,"online":true,"offline":true},{"name":"stock-overview-db","slot":"overview-dashboard-slot","component":"stockOverview"},{"name":"operations-db-link","slot":"stock-page-dashboard-slot","component":"stockOperationsLink","meta":{"name":"operations","slot":"operations-dashboard-slot","title":"operations"},"order":2,"online":true,"offline":true},{"name":"stock-operations-db","slot":"operations-dashboard-slot","component":"stockOperations"},{"name":"items-db-link","slot":"stock-page-dashboard-slot","component":"stockItemsLink","meta":{"name":"items","slot":"items-dashboard-slot","title":"items"},"order":1,"online":true,"offline":true},{"name":"stock-items-db","slot":"items-dashboard-slot","component":"stockItems"},{"name":"user-scopes-db-link","slot":"stock-page-dashboard-slot","component":"stockUserScopesLink","meta":{"name":"user-scopes","slot":"user-scopes-dashboard-slot","title":"user-scopes"},"order":3,"online":true,"offline":true},{"name":"stock-user-scopes-db","slot":"user-scopes-dashboard-slot","component":"stockUserScopes"},{"name":"sources-db-link","slot":"stock-page-dashboard-slot","component":"stockSourcesLink","meta":{"name":"sources","slot":"sources-dashboard-slot","title":"Sources"},"order":2,"online":true,"offline":true},{"name":"stock-sources-db","slot":"sources-dashboard-slot","component":"stockSources"},{"name":"reports-db-link","slot":"stock-page-dashboard-slot","component":"stockReportsLink","meta":{"name":"reports","slot":"reports-dashboard-slot","title":"Reports"},"order":5,"online":true,"offline":true},{"name":"stock-reports-db","slot":"reports-dashboard-slot","component":"stockReports"},{"name":"settings-db-link","slot":"stock-page-dashboard-slot","component":"stockSettingsLink","meta":{"name":"settings","slot":"settings-dashboard-slot","title":"Settings"},"order":6,"online":true,"offline":true},{"name":"stock-settings-db","slot":"settings-dashboard-slot","component":"stockSettings"},{"name":"stock-management-admin-card-link","slot":"system-admin-page-card-link-slot","component":"stockManagementAdminCardLink"},{"name":"stock-management-app-menu-item","component":"stockManagementAppMenuItem","slot":"app-menu-item-slot","meta":{"name":" Stock Management"}},{"name":"delete-packaging-unit-button","component":"deletePackagingUnitButton"}],"modals":[{"name":"delete-stock-modal","component":"deleteStockModal"},{"name":"delete-stock-user-scope-modal","component":"deleteUserScopeModal"},{"name":"delete-stock-rule-modal","component":"deleteStockRuleModal"},{"name":"delete-packaging-unit-modal","component":"deletePackagingUnitModal"},{"name":"expired-stock-modal","component":"expiredStockModal"},{"name":"import-bulk-stock-items","component":"importBulkStockItemsModal"},{"name":"receiving-stock-modal","component":"receivingStockModal"},{"name":"stock-operation-dialog","component":"stockOperationModal"},{"name":"transactions-print-bincard-preview-modal","component":"transactionBincardPrintPreviewModal"},{"name":"transactions-print-stockcard-preview-modal","component":"transactionStockcardPrintPreviewModal"}],"workspaces":[{"name":"stock-operation-form-workspace","component":"stockOperationFormWorkspace","title":"Stock Operation","type":"form","canMaximize":true,"width":"extra-wide"},{"name":"stock-item-rules-form-workspace","component":"stockItemRulesFormWorkspace","title":"Stock Item Rules","type":"form"},{"name":"stock-item-form-workspace","component":"stockItemFormWorkspace","title":"Stock Items","type":"form","canMaximize":true,"width":"extra-wide"},{"name":"stock-sources-form-workspace","component":"stockSourcesFormWorkspace","title":"Stock Sources","type":"form","canMaximize":true,"width":"extra-wide"},{"name":"stock-location-form-workspace","component":"stockLocationsFormWorkspace","title":"Stock Locations","type":"form","canMaximize":true,"width":"extra-wide"},{"name":"stock-user-role-scopes-form-workspace","component":"stockUserScopesFormWorkspace","title":"User Role Scopes","type":"form","canMaximize":true,"width":"extra-wide"},{"name":"stock-reports-form-workspace","component":"stockReportsFormWorkspace","title":"Reports","type":"form","canMaximize":true,"width":"extra-wide"}],"pages":[{"component":"root","route":"stock-management"}],"version":"3.0.1-pre.855"}
|
package/jest.config.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
const path = require('path');
|
2
|
-
|
3
1
|
/** @type {import('jest').Config} */
|
2
|
+
|
4
3
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
4
|
+
const path = require('path');
|
5
|
+
|
5
6
|
module.exports = {
|
6
7
|
clearMocks: true,
|
7
8
|
collectCoverageFrom: ['**/src/**/*.component.tsx', '!**/node_modules/**', '!**/src/declarations.d.ts', '!**/e2e/**'],
|
@@ -14,10 +15,6 @@ module.exports = {
|
|
14
15
|
'\\.(s?css)$': 'identity-obj-proxy',
|
15
16
|
'^lodash-es/(.*)$': 'lodash/$1',
|
16
17
|
'^lodash-es$': 'lodash',
|
17
|
-
'^@tools$': path.resolve(__dirname, 'tools'),
|
18
|
-
'^@tools/(.*)$': path.resolve(__dirname, 'tools', '$1'),
|
19
|
-
'^@mocks$': path.resolve(__dirname, '__mocks__'),
|
20
|
-
'^@mocks/(.*)$': path.resolve(__dirname, '__mocks__', '$1'),
|
21
18
|
'^dexie$': require.resolve('dexie'),
|
22
19
|
'^react-i18next$': path.resolve(__dirname, '__mocks__', 'react-i18next.js'),
|
23
20
|
},
|
package/package.json
CHANGED
@@ -76,10 +76,10 @@ const DataList: React.FC<ListProps> = ({ columns, data, children, totalItems, go
|
|
76
76
|
};
|
77
77
|
const handleExport = (object) => {
|
78
78
|
const csvString = convertToCSV(list, columns);
|
79
|
-
if (object.currentTarget.innerText
|
79
|
+
if (object.currentTarget.innerText == 'Download As CSV') {
|
80
80
|
const blob = new Blob([csvString], { type: 'text/csv;charset=utf-8' });
|
81
81
|
saveAs(blob, 'data.csv');
|
82
|
-
} else if (object.currentTarget.innerText
|
82
|
+
} else if (object.currentTarget.innerText == 'Download As Json') {
|
83
83
|
const jsonBlob = new Blob([csvString], { type: 'application/json' });
|
84
84
|
saveAs(jsonBlob, 'data.json');
|
85
85
|
}
|
package/src/index.ts
CHANGED
@@ -15,8 +15,8 @@ import StockReports from './stock-reports/report-list/stock-reports.component';
|
|
15
15
|
import StockSettings from './stock-settings/stock-settings.component';
|
16
16
|
import StockSources from './stock-sources/stock-sources.component';
|
17
17
|
import StockUserScopes from './stock-user-role-scopes/stock-user-role-scopes.component';
|
18
|
-
import
|
19
|
-
import
|
18
|
+
import TransactionsBincardPrintPreview from './stock-items/add-stock-item/transactions/printout/transactions-print-bincard-preview.modal';
|
19
|
+
import TransactionsStockcardPrintPreview from './stock-items/add-stock-item/transactions/printout/transactions-print-stockcard-preview.modal';
|
20
20
|
|
21
21
|
const moduleName = '@openmrs/esm-stock-management-app';
|
22
22
|
|
@@ -59,7 +59,7 @@ export const expiredStockModal = getAsyncLifecycle(() => import('./stock-home/ex
|
|
59
59
|
});
|
60
60
|
|
61
61
|
export const importBulkStockItemsModal = getAsyncLifecycle(
|
62
|
-
() => import('./stock-items/add-bulk-stock-item/stock-items-bulk-import.
|
62
|
+
() => import('./stock-items/add-bulk-stock-item/stock-items-bulk-import.component'),
|
63
63
|
{
|
64
64
|
featureName: 'import-bulk-stock-items-modal',
|
65
65
|
moduleName,
|
@@ -175,9 +175,9 @@ export const stockUserScopesFormWorkspace = getAsyncLifecycle(
|
|
175
175
|
options,
|
176
176
|
);
|
177
177
|
|
178
|
-
export const transactionBincardPrintPreviewModal = getSyncLifecycle(
|
178
|
+
export const transactionBincardPrintPreviewModal = getSyncLifecycle(TransactionsBincardPrintPreview, options);
|
179
179
|
|
180
|
-
export const transactionStockcardPrintPreviewModal = getSyncLifecycle(
|
180
|
+
export const transactionStockcardPrintPreviewModal = getSyncLifecycle(TransactionsStockcardPrintPreview, options);
|
181
181
|
|
182
182
|
export function startupApp() {
|
183
183
|
defineConfigSchema(moduleName, configSchema);
|
package/src/stock-items/add-bulk-stock-item/add-stock-items-bulk-import-action-button.component.tsx
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
+
import { Button } from '@carbon/react';
|
1
2
|
import React, { useCallback } from 'react';
|
2
3
|
import { useTranslation } from 'react-i18next';
|
3
|
-
import { Button } from '@carbon/react';
|
4
4
|
import { showModal } from '@openmrs/esm-framework';
|
5
5
|
|
6
6
|
const AddStockItemsBulktImportActionButton: React.FC = () => {
|
7
7
|
const { t } = useTranslation();
|
8
8
|
|
9
|
-
const
|
9
|
+
const handleClick = useCallback(() => {
|
10
10
|
const dispose = showModal('import-bulk-stock-items', {
|
11
11
|
closeModal: () => dispose(),
|
12
12
|
});
|
13
13
|
}, []);
|
14
14
|
|
15
15
|
return (
|
16
|
-
<Button iconDescription={t('import', 'Import')}
|
16
|
+
<Button kind="ghost" onClick={handleClick} iconDescription={t('import', 'Import')}>
|
17
17
|
{t('import', 'Import')}
|
18
18
|
</Button>
|
19
19
|
);
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import React, { useState } from 'react';
|
2
2
|
import { useTranslation } from 'react-i18next';
|
3
3
|
import { Button, Form, ModalBody, ModalFooter, ModalHeader, FileUploader } from '@carbon/react';
|
4
|
-
import {
|
5
|
-
import {
|
4
|
+
import { UploadStockItems } from './stock-items-bulk-import.resource';
|
5
|
+
import { showSnackbar } from '@openmrs/esm-framework';
|
6
6
|
|
7
|
-
export interface
|
7
|
+
export interface ImportDialogPopupProps {
|
8
8
|
closeModal: () => void;
|
9
9
|
}
|
10
10
|
|
11
|
-
const
|
11
|
+
const ImportDialogPopup: React.FC<ImportDialogPopupProps> = ({ closeModal }) => {
|
12
12
|
const { t } = useTranslation();
|
13
13
|
const [selectedFile, setSelectedFile] = useState<any>();
|
14
14
|
|
@@ -16,28 +16,27 @@ const ImportBulkStockItemsModal: React.FC<ImportBulkStockItemsModalProps> = ({ c
|
|
16
16
|
if (!selectedFile) {
|
17
17
|
return;
|
18
18
|
}
|
19
|
-
|
20
19
|
const formData = new FormData();
|
21
|
-
|
22
20
|
if (selectedFile) {
|
23
21
|
formData.append('file', selectedFile, 'Import_Stock_Items.csv');
|
24
22
|
formData.append('hasHeader', 'true');
|
25
23
|
}
|
26
|
-
|
27
|
-
uploadStockItems(formData).then(
|
24
|
+
UploadStockItems(formData).then(
|
28
25
|
() => {
|
29
26
|
showSnackbar({
|
27
|
+
isLowContrast: true,
|
28
|
+
title: t('rejectOrder', 'Uploaded Order'),
|
30
29
|
kind: 'success',
|
31
|
-
|
30
|
+
subtitle: t('SuccessfullyUploadedStockItem', `You have successfully uploaded stock items`),
|
32
31
|
});
|
33
32
|
closeModal();
|
34
33
|
},
|
35
34
|
(err) => {
|
36
35
|
showSnackbar({
|
36
|
+
title: t('errorUploadingItems', 'An error occurred uploading stock items'),
|
37
37
|
kind: 'error',
|
38
|
-
isLowContrast:
|
38
|
+
isLowContrast: true,
|
39
39
|
subtitle: err?.message,
|
40
|
-
title: t('errorUploadingItems', 'An error occurred uploading stock items'),
|
41
40
|
});
|
42
41
|
},
|
43
42
|
);
|
@@ -55,26 +54,26 @@ const ImportBulkStockItemsModal: React.FC<ImportBulkStockItemsModalProps> = ({ c
|
|
55
54
|
return (
|
56
55
|
<div>
|
57
56
|
<Form>
|
58
|
-
<ModalHeader closeModal={closeModal} title={t('importStockItems', 'Import
|
57
|
+
<ModalHeader closeModal={closeModal} title={t('importStockItems', 'Import Stock Items')} />
|
59
58
|
<ModalBody>
|
60
59
|
<FileUploader
|
61
60
|
accept={['.csv']}
|
62
|
-
|
61
|
+
multiple={false}
|
62
|
+
name={'file'}
|
63
|
+
buttonLabel="Select file"
|
64
|
+
labelDescription="Only .csv files at 2mb or less"
|
63
65
|
filenameStatus="edit"
|
64
|
-
labelDescription={t('onlyCsvFilesAt2mbOrLess', 'Only .csv files at 2MB or less')}
|
65
66
|
labelTitle=""
|
66
|
-
multiple={false}
|
67
|
-
name="file"
|
68
|
-
onChange={onFileChanged}
|
69
67
|
size="sm"
|
68
|
+
onChange={onFileChanged}
|
70
69
|
/>
|
71
70
|
</ModalBody>
|
72
71
|
<ModalFooter>
|
73
72
|
<Button kind="secondary" onClick={closeModal}>
|
74
|
-
{
|
73
|
+
{t('cancel', 'Cancel')}
|
75
74
|
</Button>
|
76
75
|
<Button type="button" onClick={onConfirmUpload}>
|
77
|
-
{t('uploadStockItems', 'Upload
|
76
|
+
{t('uploadStockItems', 'Upload StockItems')}
|
78
77
|
</Button>
|
79
78
|
</ModalFooter>
|
80
79
|
</Form>
|
@@ -82,4 +81,4 @@ const ImportBulkStockItemsModal: React.FC<ImportBulkStockItemsModalProps> = ({ c
|
|
82
81
|
);
|
83
82
|
};
|
84
83
|
|
85
|
-
export default
|
84
|
+
export default ImportDialogPopup;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
|
2
2
|
|
3
|
-
export async function
|
3
|
+
export async function UploadStockItems(body: any) {
|
4
4
|
const abortController = new AbortController();
|
5
5
|
|
6
6
|
return openmrsFetch(`${restBaseUrl}/stockmanagement/stockitemimport`, {
|