@openmrs/esm-stock-management-app 1.0.1-pre.464 → 1.0.1-pre.465
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/474.js +1 -1
- package/dist/474.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 +6 -6
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/stock-items/add-stock-item/packaging-units/packaging-units.component.tsx +3 -1
- package/src/stock-items/stock-item.utils.tsx +3 -1
@@ -86,10 +86,10 @@
|
|
86
86
|
"initial": true,
|
87
87
|
"entry": true,
|
88
88
|
"recorded": false,
|
89
|
-
"size":
|
89
|
+
"size": 4763249,
|
90
90
|
"sizes": {
|
91
91
|
"consume-shared": 252,
|
92
|
-
"javascript":
|
92
|
+
"javascript": 4741300,
|
93
93
|
"share-init": 252,
|
94
94
|
"runtime": 21445
|
95
95
|
},
|
@@ -106,7 +106,7 @@
|
|
106
106
|
"auxiliaryFiles": [
|
107
107
|
"main.js.map"
|
108
108
|
],
|
109
|
-
"hash": "
|
109
|
+
"hash": "5d839fdaf40b5606",
|
110
110
|
"childrenByOrder": {}
|
111
111
|
},
|
112
112
|
{
|
@@ -138,9 +138,9 @@
|
|
138
138
|
"initial": false,
|
139
139
|
"entry": false,
|
140
140
|
"recorded": false,
|
141
|
-
"size":
|
141
|
+
"size": 1091537,
|
142
142
|
"sizes": {
|
143
|
-
"javascript":
|
143
|
+
"javascript": 1091327,
|
144
144
|
"consume-shared": 210
|
145
145
|
},
|
146
146
|
"names": [],
|
@@ -154,7 +154,7 @@
|
|
154
154
|
"auxiliaryFiles": [
|
155
155
|
"474.js.map"
|
156
156
|
],
|
157
|
-
"hash": "
|
157
|
+
"hash": "b28b8afd088ec2c1",
|
158
158
|
"childrenByOrder": {}
|
159
159
|
},
|
160
160
|
{
|
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":"locations-db-link","slot":"stock-page-dashboard-slot","component":"stockLocationsLink","meta":{"name":"locations","slot":"locations-dashboard-slot","title":"Locations"},"order":4,"online":true,"offline":true},{"name":"stock-locations-db","slot":"locations-dashboard-slot","component":"stockLocations"},{"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-operation-dialog","component":"stockOperationDialog"},{"name":"import-bulk-stock-items","component":"importBulkStockItemsDialog"},{"name":"delete-stock-modal","component":"deleteStockModal"},{"name":"delete-stock-user-scope-modal","component":"deleteUserScopeModal"},{"name":"stock-management-app-menu-item","component":"stockManagementAppMenuItem","slot":"app-menu-item-slot","meta":{"name":" Stock Management"}},{"name":"delete-stock-rule-modal","component":"deleteStockRuleModal"},{"name":"delete-packaging-unit-modal","component":"deletePackagingUnitModal"},{"name":"delete-packaging-unit-button","component":"deletePackagingUnitButton"}],"pages":[{"component":"root","route":"stock-management"}],"version":"1.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":"locations-db-link","slot":"stock-page-dashboard-slot","component":"stockLocationsLink","meta":{"name":"locations","slot":"locations-dashboard-slot","title":"Locations"},"order":4,"online":true,"offline":true},{"name":"stock-locations-db","slot":"locations-dashboard-slot","component":"stockLocations"},{"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-operation-dialog","component":"stockOperationDialog"},{"name":"import-bulk-stock-items","component":"importBulkStockItemsDialog"},{"name":"delete-stock-modal","component":"deleteStockModal"},{"name":"delete-stock-user-scope-modal","component":"deleteUserScopeModal"},{"name":"stock-management-app-menu-item","component":"stockManagementAppMenuItem","slot":"app-menu-item-slot","meta":{"name":" Stock Management"}},{"name":"delete-stock-rule-modal","component":"deleteStockRuleModal"},{"name":"delete-packaging-unit-modal","component":"deletePackagingUnitModal"},{"name":"delete-packaging-unit-button","component":"deletePackagingUnitButton"}],"pages":[{"component":"root","route":"stock-management"}],"version":"1.0.1-pre.465"}
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useEffect, useMemo, useState } from "react";
|
2
|
-
import { showSnackbar } from "@openmrs/esm-framework";
|
2
|
+
import { showSnackbar, restBaseUrl } from "@openmrs/esm-framework";
|
3
3
|
import { useTranslation } from "react-i18next";
|
4
4
|
import { useStockItemPackageUnitsHook } from "./packaging-units.resource";
|
5
5
|
import {
|
@@ -26,6 +26,7 @@ import {
|
|
26
26
|
updateStockItemPackagingUnit,
|
27
27
|
} from "../../stock-items.resource";
|
28
28
|
import DeleteModalButton from "./packaging-units-delete-modal-button.component";
|
29
|
+
import { handleMutate } from "../../../utils";
|
29
30
|
|
30
31
|
import styles from "./packaging-units.scss";
|
31
32
|
|
@@ -171,6 +172,7 @@ const PackagingUnits: React.FC<PackagingUnitsProps> = ({
|
|
171
172
|
// Wait for all requests to complete
|
172
173
|
Promise.all([createPromises, ...updatePromises]).then(() => {
|
173
174
|
mutate();
|
175
|
+
handleMutate(`${restBaseUrl}/stockmanagement/stockitem`);
|
174
176
|
reset();
|
175
177
|
handleTabChange(0);
|
176
178
|
});
|
@@ -52,7 +52,9 @@ export const launchAddOrEditDialog = (
|
|
52
52
|
isEditing = false
|
53
53
|
) => {
|
54
54
|
launchOverlay(
|
55
|
-
`${isEditing ? "Edit" : "Add"} ${
|
55
|
+
`${isEditing ? "Edit" : "Add"} ${
|
56
|
+
stockItem?.drugName || stockItem.conceptName || ""
|
57
|
+
}`,
|
56
58
|
<AddEditStockItem
|
57
59
|
model={stockItem}
|
58
60
|
onSave={(stockItem) => addOrEditStockItem(stockItem, isEditing)}
|