@openmrs/esm-stock-management-app 1.0.1-pre.479 → 1.0.1-pre.484

Sign up to get free protection for your applications and to get access to all the features.
@@ -86,10 +86,10 @@
86
86
  "initial": true,
87
87
  "entry": true,
88
88
  "recorded": false,
89
- "size": 4766982,
89
+ "size": 4766853,
90
90
  "sizes": {
91
91
  "consume-shared": 252,
92
- "javascript": 4745033,
92
+ "javascript": 4744904,
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": "b3395d02da05f6f7",
109
+ "hash": "e52cb3631184607a",
110
110
  "childrenByOrder": {}
111
111
  },
112
112
  {
@@ -114,9 +114,9 @@
114
114
  "initial": false,
115
115
  "entry": false,
116
116
  "recorded": false,
117
- "size": 7685,
117
+ "size": 7694,
118
118
  "sizes": {
119
- "javascript": 7685
119
+ "javascript": 7694
120
120
  },
121
121
  "names": [],
122
122
  "idHints": [],
@@ -128,7 +128,7 @@
128
128
  "271.js"
129
129
  ],
130
130
  "auxiliaryFiles": [],
131
- "hash": "62e4eff8b6ee6a39",
131
+ "hash": "0cb37e3477f0eecc",
132
132
  "childrenByOrder": {}
133
133
  },
134
134
  {
@@ -160,9 +160,9 @@
160
160
  "initial": false,
161
161
  "entry": false,
162
162
  "recorded": false,
163
- "size": 12768,
163
+ "size": 12770,
164
164
  "sizes": {
165
- "javascript": 12768
165
+ "javascript": 12770
166
166
  },
167
167
  "names": [],
168
168
  "idHints": [],
@@ -174,7 +174,7 @@
174
174
  "319.js"
175
175
  ],
176
176
  "auxiliaryFiles": [],
177
- "hash": "9577cb4bde364dd6",
177
+ "hash": "78c810e8e20a403e",
178
178
  "childrenByOrder": {}
179
179
  },
180
180
  {
@@ -182,9 +182,9 @@
182
182
  "initial": false,
183
183
  "entry": false,
184
184
  "recorded": false,
185
- "size": 10602,
185
+ "size": 10604,
186
186
  "sizes": {
187
- "javascript": 10602
187
+ "javascript": 10604
188
188
  },
189
189
  "names": [],
190
190
  "idHints": [],
@@ -196,7 +196,7 @@
196
196
  "460.js"
197
197
  ],
198
198
  "auxiliaryFiles": [],
199
- "hash": "0239cab658afad3e",
199
+ "hash": "853e580ee18acb6d",
200
200
  "childrenByOrder": {}
201
201
  },
202
202
  {
@@ -204,9 +204,9 @@
204
204
  "initial": false,
205
205
  "entry": false,
206
206
  "recorded": false,
207
- "size": 1095270,
207
+ "size": 1095141,
208
208
  "sizes": {
209
- "javascript": 1095060,
209
+ "javascript": 1094931,
210
210
  "consume-shared": 210
211
211
  },
212
212
  "names": [],
@@ -220,7 +220,7 @@
220
220
  "auxiliaryFiles": [
221
221
  "474.js.map"
222
222
  ],
223
- "hash": "0310bd4a2bb367b0",
223
+ "hash": "229d6a418e7c76e6",
224
224
  "childrenByOrder": {}
225
225
  },
226
226
  {
@@ -252,9 +252,9 @@
252
252
  "initial": false,
253
253
  "entry": false,
254
254
  "recorded": false,
255
- "size": 10899,
255
+ "size": 10901,
256
256
  "sizes": {
257
- "javascript": 10899
257
+ "javascript": 10901
258
258
  },
259
259
  "names": [],
260
260
  "idHints": [],
@@ -266,7 +266,7 @@
266
266
  "574.js"
267
267
  ],
268
268
  "auxiliaryFiles": [],
269
- "hash": "3ec9fe24b95ef377",
269
+ "hash": "73adef869115d16f",
270
270
  "childrenByOrder": {}
271
271
  },
272
272
  {
@@ -343,9 +343,9 @@
343
343
  "initial": false,
344
344
  "entry": false,
345
345
  "recorded": false,
346
- "size": 12877,
346
+ "size": 12879,
347
347
  "sizes": {
348
- "javascript": 12877
348
+ "javascript": 12879
349
349
  },
350
350
  "names": [],
351
351
  "idHints": [],
@@ -357,7 +357,7 @@
357
357
  "757.js"
358
358
  ],
359
359
  "auxiliaryFiles": [],
360
- "hash": "1673f3931afe5889",
360
+ "hash": "0f431833a88f72aa",
361
361
  "childrenByOrder": {}
362
362
  },
363
363
  {
@@ -365,9 +365,9 @@
365
365
  "initial": false,
366
366
  "entry": false,
367
367
  "recorded": false,
368
- "size": 9609,
368
+ "size": 9611,
369
369
  "sizes": {
370
- "javascript": 9609
370
+ "javascript": 9611
371
371
  },
372
372
  "names": [],
373
373
  "idHints": [],
@@ -379,7 +379,7 @@
379
379
  "788.js"
380
380
  ],
381
381
  "auxiliaryFiles": [],
382
- "hash": "ea169669bdd9d02e",
382
+ "hash": "704ff9bb8200591c",
383
383
  "childrenByOrder": {}
384
384
  },
385
385
  {
@@ -414,9 +414,9 @@
414
414
  "initial": false,
415
415
  "entry": false,
416
416
  "recorded": false,
417
- "size": 11292,
417
+ "size": 11294,
418
418
  "sizes": {
419
- "javascript": 11292
419
+ "javascript": 11294
420
420
  },
421
421
  "names": [],
422
422
  "idHints": [],
@@ -428,7 +428,7 @@
428
428
  "807.js"
429
429
  ],
430
430
  "auxiliaryFiles": [],
431
- "hash": "19a2bffdfb06fcf0",
431
+ "hash": "b18f2b03183a99b3",
432
432
  "childrenByOrder": {}
433
433
  },
434
434
  {
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.479"}
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.484"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-stock-management-app",
3
- "version": "1.0.1-pre.479",
3
+ "version": "1.0.1-pre.484",
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",
@@ -66,13 +66,6 @@ const StockItemDetails = forwardRef<never, StockItemDetailsProps>(
66
66
 
67
67
  useEffect(() => {
68
68
  setIsDrug(model.isDrug ?? false);
69
- setSelectedItemType(
70
- model.isDrug === true
71
- ? "Pharmaceuticals"
72
- : model.isDrug === false
73
- ? "Non Pharmaceuticals"
74
- : undefined
75
- );
76
69
  setHasExpiration(model.hasExpiration ?? false);
77
70
  }, [model.hasExpiration, model.isDrug]);
78
71
 
@@ -80,30 +73,34 @@ const StockItemDetails = forwardRef<never, StockItemDetailsProps>(
80
73
  <form
81
74
  className={`${rootStyles.formContainer} ${rootStyles.verticalForm}`}
82
75
  >
83
- <FormGroup
84
- className="clear-margin-bottom"
85
- legendText={t("itemType", "Item Type")}
86
- title={t("itemType", "Item Type")}
87
- >
88
- <ControlledRadioButtonGroup
89
- control={control}
90
- name="isDrug"
91
- controllerName="isDrug"
92
- legendText=""
93
- invalid={!!errors.isDrug}
94
- invalidText={errors.isDrug && errors?.isDrug?.message}
95
- onChange={(selection: boolean) => {
96
- const selectedOption = radioOptions.find(
97
- (option) => option.value === selection
98
- );
99
- const selectedLabel = selectedOption ? selectedOption.label : "";
100
- setIsDrug(selection);
101
- setSelectedItemType(selectedLabel);
102
- }}
103
- options={radioOptions} // Pass radioOptions directly
104
- />
105
- </FormGroup>
106
- {isDrug && (
76
+ {!isEditing && (
77
+ <FormGroup
78
+ className="clear-margin-bottom"
79
+ legendText={t("itemType", "Item Type")}
80
+ title={t("itemType", "Item Type")}
81
+ >
82
+ <ControlledRadioButtonGroup
83
+ control={control}
84
+ name="isDrug"
85
+ controllerName="isDrug"
86
+ legendText=""
87
+ invalid={!!errors.isDrug}
88
+ invalidText={errors.isDrug && errors?.isDrug?.message}
89
+ onChange={(selection: boolean) => {
90
+ const selectedOption = radioOptions.find(
91
+ (option) => option.value === selection
92
+ );
93
+ const selectedLabel = selectedOption
94
+ ? selectedOption.label
95
+ : "";
96
+ setIsDrug(selection);
97
+ setSelectedItemType(selectedLabel);
98
+ }}
99
+ options={radioOptions} // Pass radioOptions directly
100
+ />
101
+ </FormGroup>
102
+ )}
103
+ {selectedItemType === "Pharmaceuticals" ? (
107
104
  <DrugSelector
108
105
  name="drugUuid"
109
106
  controllerName="drugUuid"
@@ -113,8 +110,7 @@ const StockItemDetails = forwardRef<never, StockItemDetailsProps>(
113
110
  invalid={!!errors.drugUuid}
114
111
  invalidText={errors.drugUuid && errors?.drugUuid?.message}
115
112
  />
116
- )}
117
- {isDrug != undefined && !isDrug && (
113
+ ) : selectedItemType === "Non Pharmaceuticals" ? (
118
114
  <ConceptsSelector
119
115
  name="conceptUuid"
120
116
  controllerName="conceptUuid"
@@ -124,7 +120,7 @@ const StockItemDetails = forwardRef<never, StockItemDetailsProps>(
124
120
  invalid={!!errors.drugUuid}
125
121
  invalidText={errors.drugUuid && errors?.drugUuid?.message}
126
122
  />
127
- )}
123
+ ) : null}
128
124
  <ControlledTextInput
129
125
  id="commonName"
130
126
  name="commonName"
@@ -56,12 +56,10 @@ export const launchAddOrEditDialog = (
56
56
  ) => {
57
57
  launchOverlay(
58
58
  isEditing
59
- ? t("editItem", "Edit {{name}}", {
59
+ ? `${t("editItem", "Edit {{name}}", {
60
60
  name: stockItem?.drugName || stockItem.conceptName || "",
61
- })
62
- : t("addItem", "Add {{name}}", {
63
- name: stockItem?.drugName || stockItem.conceptName || "",
64
- }),
61
+ })} ${stockItem.isDrug ? "(Drug)" : "(Non Drug)"}`
62
+ : t("addItem", "Add stock item"),
65
63
  <AddEditStockItem
66
64
  model={stockItem}
67
65
  onSave={(stockItem) => addOrEditStockItem(t, stockItem, isEditing)}
@@ -9,7 +9,7 @@
9
9
  "activeTo": "እስከ",
10
10
  "addedRule": "እንዴት ያክል",
11
11
  "addedSource": "መጠንቀቂያን እንዴት",
12
- "addItem": "እንዴት ያክል {{name}}",
12
+ "addItem": "እንዴት ያክል stock item",
13
13
  "addLocation": "አዲስ ቦታ ፍጠር",
14
14
  "addNewStock": "አዲስ አስገባ",
15
15
  "addNewStockRule": "አዲስ ህግ ጨምር",
@@ -9,7 +9,7 @@
9
9
  "activeTo": "مفعل حتى",
10
10
  "addedRule": "أضف قاعدة",
11
11
  "addedSource": "أضف مصدر",
12
- "addItem": "أضف {{name}}",
12
+ "addItem": "أضف stock item",
13
13
  "addLocation": "إنشاء موقع جديد",
14
14
  "addNewStock": "اضف جديد",
15
15
  "addNewStockRule": "إضافة قاعدة جديدة",
@@ -9,7 +9,7 @@
9
9
  "activeTo": "Active To",
10
10
  "addedRule": "Add Rule",
11
11
  "addedSource": "Add Source",
12
- "addItem": "Add {{name}}",
12
+ "addItem": "Add stock item",
13
13
  "addLocation": "Create new Location",
14
14
  "addNewStock": "Add New",
15
15
  "addNewStockRule": "Add New Rule",
@@ -9,7 +9,7 @@
9
9
  "activeTo": "Activo Hasta",
10
10
  "addedRule": "Agregar Regla",
11
11
  "addedSource": "Agregar Fuente",
12
- "addItem": "Agregar {{name}}",
12
+ "addItem": "Agregar stock item",
13
13
  "addLocation": "Crear una nueva Ubicación",
14
14
  "addNewStock": "Agregar nuevo",
15
15
  "addNewStockRule": "Agregar nueva regla",
@@ -9,7 +9,7 @@
9
9
  "activeTo": "Actif Jusqu'à",
10
10
  "addedRule": "Ajouter Règle",
11
11
  "addedSource": "Ajouter Source",
12
- "addItem": "Ajouter {{name}}",
12
+ "addItem": "Ajouter stock item",
13
13
  "addLocation": "Créer un nouvel Emplacement",
14
14
  "addNewStock": "Ajouter un nouveau",
15
15
  "addNewStockRule": "Ajouter une nouvelle règle",
@@ -289,4 +289,4 @@
289
289
  "view": "Voir",
290
290
  "whoIsThePreferredVendor": "Quel est le fournisseur préféré?",
291
291
  "yes": "Oui"
292
- }
292
+ }
@@ -9,7 +9,7 @@
9
9
  "activeTo": "សកម្មដល់",
10
10
  "addedRule": "បន្ថែមច្បាប់",
11
11
  "addedSource": "បន្ថែមប្រភព",
12
- "addItem": "បន្ថែម {{name}}",
12
+ "addItem": "បន្ថែម stock item",
13
13
  "addLocation": "បង្កើតទីតាំងថ្មី",
14
14
  "addNewStock": "បន្ថែមថ្មី",
15
15
  "addNewStockRule": "បន្ថែមច្បាប់ថ្មី",
@@ -110,7 +110,7 @@
110
110
  "errorCreatingForm": "កំហុសក្នុងការបង្កើតទំរង់",
111
111
  "errorDeletingRule": "កំហុសក្នុងការលុបច្បាប់",
112
112
  "errorDeletingSource": "កំហុសក្នុងការលុបប្រភព",
113
- "errorDeletingUserScope": "មាន​បញ្ហា​មួយ​បាន​កើត​ឡើង​ក្នុង​ការ​ផ្ទុក​ឡើង​ធាតុ​ស្តុក",
113
+ "errorDeletingUserScope": "មាន\u200bបញ្ហា\u200bមួយ\u200bបាន\u200bកើត\u200bឡើង\u200bក្នុង\u200bការ\u200bផ្ទុក\u200bឡើង\u200bធាតុ\u200bស្តុក",
114
114
  "errorDescription": "ពិពណ៌នាកំហុស",
115
115
  "errorDescriptionTitle": "កំហុសក្នុងការរក្សាទំរង់",
116
116
  "errorEditingStockItem": "កំហុសក្នុងការកែប្រែមុខទំនិញស្តុក",
@@ -271,7 +271,7 @@
271
271
  "submit": "ដាក់ស្នើ",
272
272
  "submitted": "បានដាក់ស្នើ",
273
273
  "successfullysaved": "អ្នកបានរក្សាទុកវិសាលភាពតួនាទីអ្នកប្រើដោយជោគជ័យ",
274
- "SuccessfullyUploadedStockItem": "អ្នក​បាន​ផ្ទុក​ឡើង​ធាតុ​ស្តុក​ដោយ​ជោគជ័យ",
274
+ "SuccessfullyUploadedStockItem": "អ្នក\u200bបាន\u200bផ្ទុក\u200bឡើង\u200bធាតុ\u200bស្តុក\u200bដោយ\u200bជោគជ័យ",
275
275
  "successMessage": "សារជោគជ័យ",
276
276
  "tabletOverlay": "ការជ្រៀតកាន់តាប្លេត",
277
277
  "tags": "ស្លាក",
@@ -9,7 +9,7 @@
9
9
  "activeTo": "结束生效",
10
10
  "addedRule": "添加规则",
11
11
  "addedSource": "添加来源",
12
- "addItem": "添加{{name}}",
12
+ "addItem": "添加 stock item",
13
13
  "addLocation": "创建新位置",
14
14
  "addNewStock": "添加新",
15
15
  "addNewStockRule": "添加新规则",
@@ -216,7 +216,7 @@
216
216
  "reasonPlaceholder": "在此输入原因",
217
217
  "receivedNull": "未收到要显示的",
218
218
  "receivedView": "查看全部",
219
- "接收": ":",
219
+ "Receiving": "",
220
220
  "references": "参考",
221
221
  "reject": "拒绝",
222
222
  "rejected": "已拒绝",
@@ -289,4 +289,4 @@
289
289
  "view": "查看",
290
290
  "whoIsThePreferredVendor": "谁是首选供应商?",
291
291
  "yes": "是"
292
- }
292
+ }