@openmrs/esm-stock-management-app 1.0.1-pre.395 → 1.0.1-pre.397

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,9 +32,9 @@
32
32
  "initial": false,
33
33
  "entry": false,
34
34
  "recorded": false,
35
- "size": 1032484,
35
+ "size": 1033578,
36
36
  "sizes": {
37
- "javascript": 1032274,
37
+ "javascript": 1033368,
38
38
  "consume-shared": 210
39
39
  },
40
40
  "names": [],
@@ -48,7 +48,7 @@
48
48
  "auxiliaryFiles": [
49
49
  "39.js.map"
50
50
  ],
51
- "hash": "1f3724fd167824bb",
51
+ "hash": "ab22886cf80c8f90",
52
52
  "childrenByOrder": {}
53
53
  },
54
54
  {
@@ -110,10 +110,10 @@
110
110
  "initial": true,
111
111
  "entry": true,
112
112
  "recorded": false,
113
- "size": 4781533,
113
+ "size": 4782627,
114
114
  "sizes": {
115
115
  "consume-shared": 252,
116
- "javascript": 4759585,
116
+ "javascript": 4760679,
117
117
  "share-init": 252,
118
118
  "runtime": 21444
119
119
  },
@@ -130,7 +130,7 @@
130
130
  "auxiliaryFiles": [
131
131
  "main.js.map"
132
132
  ],
133
- "hash": "defc8b2869583d61",
133
+ "hash": "3d47f7ff1dd7b7a4",
134
134
  "childrenByOrder": {}
135
135
  },
136
136
  {
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-management-dashboard","slot":"stock-management-dashboard-slot","component":"stockManagementDashboard"},{"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":"stockManagement","route":"stock-management"}],"version":"1.0.1-pre.395"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.24.0"},"extensions":[{"name":"stock-management-dashboard","slot":"stock-management-dashboard-slot","component":"stockManagementDashboard"},{"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":"stockManagement","route":"stock-management"}],"version":"1.0.1-pre.397"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-stock-management-app",
3
- "version": "1.0.1-pre.395",
3
+ "version": "1.0.1-pre.397",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Stock management microfrontend for OpenMRS 3.x",
6
6
  "browser": "dist/openmrs-esm-stock-management-app.js",
@@ -133,7 +133,18 @@ const StockOperationSubmission: React.FC<StockOperationSubmissionProps> = ({
133
133
  style={{ margin: "4px" }}
134
134
  className="submitButton"
135
135
  kind="primary"
136
- onClick={actions.onDispatch}
136
+ onClick={async () => {
137
+ delete model?.dateCreated;
138
+ delete model?.status;
139
+ setIsSaving(true);
140
+ await actions.onSave(model).then(() => {
141
+ delete model?.dateCreated;
142
+ model.status = "COMPLETED";
143
+ setIsSaving(true);
144
+ actions.onDispatch(model);
145
+ setIsSaving(false);
146
+ });
147
+ }}
137
148
  renderIcon={Departure}
138
149
  >
139
150
  {t("dispatch", "Dispatch")}