@openmrs/esm-stock-management-app 1.0.1-pre.508 → 1.0.1-pre.509
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/157.js +1 -1
- package/dist/157.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-operations/add-stock-operation/base-operation-details.component.tsx +47 -26
@@ -85,9 +85,9 @@
|
|
85
85
|
"initial": false,
|
86
86
|
"entry": false,
|
87
87
|
"recorded": false,
|
88
|
-
"size":
|
88
|
+
"size": 1733497,
|
89
89
|
"sizes": {
|
90
|
-
"javascript":
|
90
|
+
"javascript": 1733287,
|
91
91
|
"consume-shared": 210
|
92
92
|
},
|
93
93
|
"names": [],
|
@@ -101,7 +101,7 @@
|
|
101
101
|
"auxiliaryFiles": [
|
102
102
|
"157.js.map"
|
103
103
|
],
|
104
|
-
"hash": "
|
104
|
+
"hash": "13b0960f00e48981",
|
105
105
|
"childrenByOrder": {}
|
106
106
|
},
|
107
107
|
{
|
@@ -109,10 +109,10 @@
|
|
109
109
|
"initial": true,
|
110
110
|
"entry": true,
|
111
111
|
"recorded": false,
|
112
|
-
"size":
|
112
|
+
"size": 5401924,
|
113
113
|
"sizes": {
|
114
114
|
"consume-shared": 252,
|
115
|
-
"javascript":
|
115
|
+
"javascript": 5379974,
|
116
116
|
"share-init": 252,
|
117
117
|
"runtime": 21446
|
118
118
|
},
|
@@ -129,7 +129,7 @@
|
|
129
129
|
"auxiliaryFiles": [
|
130
130
|
"main.js.map"
|
131
131
|
],
|
132
|
-
"hash": "
|
132
|
+
"hash": "868181b0c33268be",
|
133
133
|
"childrenByOrder": {}
|
134
134
|
},
|
135
135
|
{
|
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.509"}
|
package/package.json
CHANGED
@@ -98,7 +98,7 @@ const BaseOperationDetails: React.FC<BaseOperationDetailsProps> = ({
|
|
98
98
|
await onSave(payload);
|
99
99
|
} catch (e) {
|
100
100
|
showSnackbar({
|
101
|
-
title: t("errorSavingBaseOperation", "
|
101
|
+
title: t("errorSavingBaseOperation", "Error saving base operation"),
|
102
102
|
isLowContrast: true,
|
103
103
|
kind: "error",
|
104
104
|
});
|
@@ -181,17 +181,22 @@ const BaseOperationDetails: React.FC<BaseOperationDetailsProps> = ({
|
|
181
181
|
)}
|
182
182
|
|
183
183
|
{(!canEdit || isEditing || lockSource) && (
|
184
|
-
<
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
184
|
+
<PartySelector
|
185
|
+
controllerName="sourceUuid"
|
186
|
+
name="sourceUuid"
|
187
|
+
control={control}
|
188
|
+
title={operation?.hasDestination ? "From" : "Location"}
|
189
|
+
placeholder={
|
190
|
+
operation.hasDestination
|
191
|
+
? t("chooseASource", "Choose a source")
|
192
|
+
: t("chooseALocation", "Choose a location")
|
190
193
|
}
|
191
|
-
|
192
|
-
|
194
|
+
invalid={!!errors.sourceUuid}
|
195
|
+
invalidText={errors.sourceUuid && errors?.sourceUuid?.message}
|
196
|
+
parties={sourcePartyList || []}
|
193
197
|
/>
|
194
198
|
)}
|
199
|
+
|
195
200
|
{canEdit && !lockDestination && operation?.hasDestination && (
|
196
201
|
<PartySelector
|
197
202
|
controllerName="destinationUuid"
|
@@ -212,15 +217,21 @@ const BaseOperationDetails: React.FC<BaseOperationDetailsProps> = ({
|
|
212
217
|
)}
|
213
218
|
|
214
219
|
{(!canEdit || isEditing || lockDestination) && (
|
215
|
-
<
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
220
|
+
<PartySelector
|
221
|
+
controllerName="destinationUuid"
|
222
|
+
name="destinationUuid"
|
223
|
+
control={control}
|
224
|
+
title={operation?.hasSource ? "To" : "Location"}
|
225
|
+
placeholder={
|
226
|
+
operation?.hasSource
|
227
|
+
? t("chooseADestination", "Choose a destination")
|
228
|
+
: "Location"
|
221
229
|
}
|
222
|
-
|
223
|
-
|
230
|
+
invalid={!!errors.destinationUuid}
|
231
|
+
invalidText={
|
232
|
+
errors.destinationUuid && errors?.destinationUuid?.message
|
233
|
+
}
|
234
|
+
parties={destinationPartyList || []}
|
224
235
|
/>
|
225
236
|
)}
|
226
237
|
|
@@ -239,6 +250,8 @@ const BaseOperationDetails: React.FC<BaseOperationDetailsProps> = ({
|
|
239
250
|
onUserChanged={(user) => {
|
240
251
|
if (user?.uuid === otherUser.uuid) {
|
241
252
|
setIsOtherUser(true);
|
253
|
+
} else {
|
254
|
+
setIsOtherUser(false);
|
242
255
|
}
|
243
256
|
}}
|
244
257
|
/>
|
@@ -264,16 +277,24 @@ const BaseOperationDetails: React.FC<BaseOperationDetailsProps> = ({
|
|
264
277
|
)}
|
265
278
|
|
266
279
|
{!canEdit && (
|
267
|
-
<
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
280
|
+
<UsersSelector
|
281
|
+
controllerName="responsiblePersonUuid"
|
282
|
+
name="responsiblePersonUuid"
|
283
|
+
control={control}
|
284
|
+
title={t("responsiblePerson:", "Responsible Person")}
|
285
|
+
placeholder={t("filter", "Filter ...")}
|
286
|
+
invalid={!!errors.responsiblePersonUuid}
|
287
|
+
invalidText={
|
288
|
+
errors.responsiblePersonUuid &&
|
289
|
+
errors?.responsiblePersonUuid?.message
|
274
290
|
}
|
275
|
-
|
276
|
-
|
291
|
+
onUserChanged={(user) => {
|
292
|
+
if (user?.uuid === otherUser.uuid) {
|
293
|
+
setIsOtherUser(true);
|
294
|
+
} else {
|
295
|
+
setIsOtherUser(false);
|
296
|
+
}
|
297
|
+
}}
|
277
298
|
/>
|
278
299
|
)}
|
279
300
|
|