@openmrs/esm-stock-management-app 3.1.1-pre.1074 → 3.1.1-pre.1076
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/README.md +2 -2
- package/dist/5125.js +1 -1
- package/dist/5125.js.map +1 -1
- package/dist/9186.js +1 -1
- package/dist/9186.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 +9 -9
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/config-schema.ts +45 -45
- package/src/stock-items/add-stock-item/packaging-units-concept-selector/packaging-units-concept-selector.component.tsx +2 -2
|
@@ -847,9 +847,9 @@
|
|
|
847
847
|
"initial": false,
|
|
848
848
|
"entry": false,
|
|
849
849
|
"recorded": false,
|
|
850
|
-
"size":
|
|
850
|
+
"size": 1193875,
|
|
851
851
|
"sizes": {
|
|
852
|
-
"javascript":
|
|
852
|
+
"javascript": 1193875
|
|
853
853
|
},
|
|
854
854
|
"names": [],
|
|
855
855
|
"idHints": [],
|
|
@@ -862,7 +862,7 @@
|
|
|
862
862
|
"auxiliaryFiles": [
|
|
863
863
|
"5125.js.map"
|
|
864
864
|
],
|
|
865
|
-
"hash": "
|
|
865
|
+
"hash": "a8605db42d7160df",
|
|
866
866
|
"childrenByOrder": {}
|
|
867
867
|
},
|
|
868
868
|
{
|
|
@@ -1539,10 +1539,10 @@
|
|
|
1539
1539
|
"initial": true,
|
|
1540
1540
|
"entry": true,
|
|
1541
1541
|
"recorded": false,
|
|
1542
|
-
"size":
|
|
1542
|
+
"size": 5542519,
|
|
1543
1543
|
"sizes": {
|
|
1544
1544
|
"consume-shared": 210,
|
|
1545
|
-
"javascript":
|
|
1545
|
+
"javascript": 5520284,
|
|
1546
1546
|
"share-init": 336,
|
|
1547
1547
|
"runtime": 21689
|
|
1548
1548
|
},
|
|
@@ -1559,7 +1559,7 @@
|
|
|
1559
1559
|
"auxiliaryFiles": [
|
|
1560
1560
|
"main.js.map"
|
|
1561
1561
|
],
|
|
1562
|
-
"hash": "
|
|
1562
|
+
"hash": "a9adc5f3fa83c00b",
|
|
1563
1563
|
"childrenByOrder": {}
|
|
1564
1564
|
},
|
|
1565
1565
|
{
|
|
@@ -1567,9 +1567,9 @@
|
|
|
1567
1567
|
"initial": false,
|
|
1568
1568
|
"entry": false,
|
|
1569
1569
|
"recorded": false,
|
|
1570
|
-
"size":
|
|
1570
|
+
"size": 217149,
|
|
1571
1571
|
"sizes": {
|
|
1572
|
-
"javascript":
|
|
1572
|
+
"javascript": 217149
|
|
1573
1573
|
},
|
|
1574
1574
|
"names": [],
|
|
1575
1575
|
"idHints": [],
|
|
@@ -1583,7 +1583,7 @@
|
|
|
1583
1583
|
"auxiliaryFiles": [
|
|
1584
1584
|
"9186.js.map"
|
|
1585
1585
|
],
|
|
1586
|
-
"hash": "
|
|
1586
|
+
"hash": "1ccf006336957ee7",
|
|
1587
1587
|
"childrenByOrder": {}
|
|
1588
1588
|
},
|
|
1589
1589
|
{
|
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-operations-modal","component":"stockOperationsModal"},{"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.1.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-operations-modal","component":"stockOperationsModal"},{"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.1.1-pre.1076"}
|
package/package.json
CHANGED
package/src/config-schema.ts
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
import { Type } from '@openmrs/esm-framework';
|
|
2
2
|
export const configSchema = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
autoPopulateResponsiblePerson: {
|
|
4
|
+
_type: Type.Boolean,
|
|
5
5
|
_default: false,
|
|
6
|
-
_description: '
|
|
6
|
+
_description: 'Auto-populate responsible person in stock operations with the currently logged-in user',
|
|
7
|
+
},
|
|
8
|
+
dispensingUnitsUUID: {
|
|
9
|
+
_type: Type.ConceptUuid,
|
|
10
|
+
_description: 'UUID for the stock dispensing units',
|
|
11
|
+
_default: '162402AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
7
12
|
},
|
|
8
13
|
enablePrintButton: {
|
|
9
14
|
_type: Type.Boolean,
|
|
10
15
|
_default: true,
|
|
11
16
|
_description: 'Enable or disable the print button in the stock management UI',
|
|
12
17
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
logo: {
|
|
19
|
+
src: {
|
|
20
|
+
_type: Type.String,
|
|
21
|
+
_default: null,
|
|
22
|
+
_description: 'A path or URL to an image',
|
|
23
|
+
},
|
|
24
|
+
alt: {
|
|
25
|
+
_type: Type.String,
|
|
26
|
+
_default: 'Logo',
|
|
27
|
+
_description: 'Alt text shown on hover',
|
|
28
|
+
},
|
|
29
|
+
name: {
|
|
30
|
+
_type: Type.String,
|
|
31
|
+
_default: null,
|
|
32
|
+
_description: 'The organization name displayed when image is absent',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
packingUnitsUUID: {
|
|
36
|
+
_type: Type.ConceptUuid,
|
|
37
|
+
_description: 'UUID for the packaging unit',
|
|
38
|
+
_default: 'a6d438fe-05c1-4d4d-9755-c11cf6b0b3b9',
|
|
17
39
|
},
|
|
18
40
|
printBalanceOnHand: {
|
|
19
|
-
|
|
41
|
+
_type: Type.Boolean,
|
|
20
42
|
_default: false,
|
|
21
|
-
_description: 'Whether to
|
|
43
|
+
_description: 'Whether to include balance on hand on the printout',
|
|
22
44
|
},
|
|
23
|
-
|
|
24
|
-
_type: Type.
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
printItemCost: {
|
|
46
|
+
_type: Type.Boolean,
|
|
47
|
+
_default: false,
|
|
48
|
+
_description: 'Whether to include item costs on the printout',
|
|
27
49
|
},
|
|
28
50
|
stockAdjustmentReasonUUID: {
|
|
29
51
|
_type: Type.ConceptUuid,
|
|
30
52
|
_description: 'UUID for the stock adjustment reasons',
|
|
31
|
-
_default: '
|
|
53
|
+
_default: '3a9021d1-d6c1-4fc2-8e30-ca8e204e44de',
|
|
32
54
|
},
|
|
33
|
-
|
|
55
|
+
stockItemCategoryUUID: {
|
|
34
56
|
_type: Type.ConceptUuid,
|
|
35
|
-
_description: 'UUID for the stock
|
|
36
|
-
_default: '
|
|
57
|
+
_description: 'UUID for the stock item category',
|
|
58
|
+
_default: '8ccf6066-9297-4d76-aaf3-00aa3714d198',
|
|
37
59
|
},
|
|
38
60
|
stockSourceTypeUUID: {
|
|
39
61
|
_type: Type.ConceptUuid,
|
|
40
62
|
_description: 'UUID for the stock source types',
|
|
41
|
-
_default: '
|
|
63
|
+
_default: '937a0440-95f7-42f6-aaef-16cf611fcf10',
|
|
42
64
|
},
|
|
43
|
-
|
|
65
|
+
stockTakeReasonUUID: {
|
|
44
66
|
_type: Type.ConceptUuid,
|
|
45
|
-
_description: 'UUID for the stock
|
|
46
|
-
_default: '
|
|
67
|
+
_description: 'UUID for the stock take reasons',
|
|
68
|
+
_default: 'faa466c5-0953-4d4f-8ea7-d9a06341c3f3',
|
|
47
69
|
},
|
|
48
70
|
useItemCommonNameAsDisplay: {
|
|
49
71
|
_type: Type.Boolean,
|
|
50
|
-
_description: '
|
|
72
|
+
_description: 'Use item common name as display (true) or drug name as display (false)',
|
|
51
73
|
_default: true,
|
|
52
74
|
},
|
|
53
|
-
stockItemCategoryUUID: {
|
|
54
|
-
_type: Type.ConceptUuid,
|
|
55
|
-
_description: 'UUID for the stock item category',
|
|
56
|
-
_default: '6d24eb6e-b42f-4706-ab2d-ae4472161f6a',
|
|
57
|
-
},
|
|
58
|
-
logo: {
|
|
59
|
-
src: {
|
|
60
|
-
_type: Type.String,
|
|
61
|
-
_default: null,
|
|
62
|
-
_description: 'A path or URL to an image.',
|
|
63
|
-
},
|
|
64
|
-
alt: {
|
|
65
|
-
_type: Type.String,
|
|
66
|
-
_default: 'Logo',
|
|
67
|
-
_description: 'Alt text, shown on hover',
|
|
68
|
-
},
|
|
69
|
-
name: {
|
|
70
|
-
_type: Type.String,
|
|
71
|
-
_default: null,
|
|
72
|
-
_description: 'The organization name displayed when image is absent',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
export type ConfigObject = {
|
|
@@ -83,7 +83,7 @@ export type ConfigObject = {
|
|
|
83
83
|
alt: string;
|
|
84
84
|
name: string;
|
|
85
85
|
};
|
|
86
|
-
|
|
86
|
+
packingUnitsUUID: string;
|
|
87
87
|
printBalanceOnHand: boolean;
|
|
88
88
|
printItemCost: boolean;
|
|
89
89
|
stockAdjustmentReasonUUID: string;
|
|
@@ -22,12 +22,12 @@ interface PackagingUnitsConceptSelectorProps<T> {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
const PackagingUnitsConceptSelector = <T,>(props: PackagingUnitsConceptSelectorProps<T>) => {
|
|
25
|
-
const {
|
|
25
|
+
const { packingUnitsUUID } = useConfig<ConfigObject>();
|
|
26
26
|
|
|
27
27
|
const {
|
|
28
28
|
items: { answers: dispensingUnits },
|
|
29
29
|
isLoading,
|
|
30
|
-
} = useConcept(
|
|
30
|
+
} = useConcept(packingUnitsUUID);
|
|
31
31
|
|
|
32
32
|
if (isLoading) return <TextInputSkeleton />;
|
|
33
33
|
|