@openmrs/esm-stock-management-app 1.0.1-pre.767 → 1.0.1-pre.777
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/dist/400.js +1 -1
- package/dist/400.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-home/stock-home-metrics.tsx +2 -2
- package/src/stock-operations/add-stock-operation/stock-items-addition-row.component.tsx +24 -0
- package/src/stock-operations/batch-no-selector/batch-no-selector.component.tsx +6 -1
@@ -134,10 +134,10 @@
|
|
134
134
|
"initial": true,
|
135
135
|
"entry": true,
|
136
136
|
"recorded": false,
|
137
|
-
"size":
|
137
|
+
"size": 5678550,
|
138
138
|
"sizes": {
|
139
139
|
"consume-shared": 252,
|
140
|
-
"javascript":
|
140
|
+
"javascript": 5656601,
|
141
141
|
"share-init": 252,
|
142
142
|
"runtime": 21445
|
143
143
|
},
|
@@ -154,7 +154,7 @@
|
|
154
154
|
"auxiliaryFiles": [
|
155
155
|
"main.js.map"
|
156
156
|
],
|
157
|
-
"hash": "
|
157
|
+
"hash": "3870ff843140bc68",
|
158
158
|
"childrenByOrder": {}
|
159
159
|
},
|
160
160
|
{
|
@@ -254,9 +254,9 @@
|
|
254
254
|
"initial": false,
|
255
255
|
"entry": false,
|
256
256
|
"recorded": false,
|
257
|
-
"size":
|
257
|
+
"size": 1946045,
|
258
258
|
"sizes": {
|
259
|
-
"javascript":
|
259
|
+
"javascript": 1945835,
|
260
260
|
"consume-shared": 210
|
261
261
|
},
|
262
262
|
"names": [],
|
@@ -270,7 +270,7 @@
|
|
270
270
|
"auxiliaryFiles": [
|
271
271
|
"400.js.map"
|
272
272
|
],
|
273
|
-
"hash": "
|
273
|
+
"hash": "40c1de922e3675ef",
|
274
274
|
"childrenByOrder": {}
|
275
275
|
},
|
276
276
|
{
|
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-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":"import-bulk-stock-items","component":"importBulkStockItemsModal"},{"name":"stock-operation-dialog","component":"stockOperationModal"},{"name":"transactions-print-bincard-preview-modal","component":"transactionBincardPrintPreviewModal"},{"name":"transactions-print-stockcard-preview-modal","component":"transactionStockcardPrintPreviewModal"}],"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-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":"import-bulk-stock-items","component":"importBulkStockItemsModal"},{"name":"stock-operation-dialog","component":"stockOperationModal"},{"name":"transactions-print-bincard-preview-modal","component":"transactionBincardPrintPreviewModal"},{"name":"transactions-print-stockcard-preview-modal","component":"transactionStockcardPrintPreviewModal"}],"pages":[{"component":"root","route":"stock-management"}],"version":"1.0.1-pre.777"}
|
package/package.json
CHANGED
@@ -71,8 +71,8 @@ const StockManagementMetrics: React.FC = (filter: StockOperationFilter) => {
|
|
71
71
|
headerLabel={t('highestServiceVolume', 'Out of Stock ')}
|
72
72
|
view="items"
|
73
73
|
outofstockCount={{
|
74
|
-
itemsbelowmin: [
|
75
|
-
itemsabovemax: [
|
74
|
+
itemsbelowmin: [],
|
75
|
+
itemsabovemax: [],
|
76
76
|
}}
|
77
77
|
/>
|
78
78
|
<MetricsCard
|
@@ -242,6 +242,30 @@ const StockItemsAdditionRow: React.FC<StockItemsAdditionRowProps> = ({
|
|
242
242
|
/>
|
243
243
|
</DatePicker>
|
244
244
|
)}
|
245
|
+
{requiresBatchUuid && !requiresActualBatchInformation && canEdit && (
|
246
|
+
<DatePicker
|
247
|
+
id={`expiration-${row.uuid}`}
|
248
|
+
datePickerType="single"
|
249
|
+
minDate={formatForDatePicker(today())}
|
250
|
+
readOnly={true}
|
251
|
+
locale="en"
|
252
|
+
dateFormat={DATE_PICKER_CONTROL_FORMAT}
|
253
|
+
onChange={([newDate]) => {
|
254
|
+
setValue(`stockItems.${index}.expiration`, newDate);
|
255
|
+
}}
|
256
|
+
>
|
257
|
+
<DatePickerInput
|
258
|
+
size="sm"
|
259
|
+
autoComplete="off"
|
260
|
+
id={`expiration-input-${row.uuid}`}
|
261
|
+
name="operationDate"
|
262
|
+
placeholder={DATE_PICKER_FORMAT}
|
263
|
+
value={formatForDatePicker(stockItemExpiry)}
|
264
|
+
defaultValue={formatForDatePicker(stockItemExpiry)}
|
265
|
+
invalid={!!errors?.stockItems?.[index]?.expiration}
|
266
|
+
/>
|
267
|
+
</DatePicker>
|
268
|
+
)}
|
245
269
|
{((!(canUpdateBatchInformation && row?.permission?.canUpdateBatchInformation) && !canEdit) ||
|
246
270
|
requiresBatchUuid) &&
|
247
271
|
formatForDatePicker(row.expiration)}
|
@@ -5,6 +5,7 @@ import { useStockItemBatchNos } from './batch-no-selector.resource';
|
|
5
5
|
import { StockBatchDTO } from '../../core/api/types/stockItem/StockBatchDTO';
|
6
6
|
import { useStockItemBatchInformationHook } from '../../stock-items/add-stock-item/batch-information/batch-information.resource';
|
7
7
|
import { useTranslation } from 'react-i18next';
|
8
|
+
import { formatForDatePicker } from '../../constants';
|
8
9
|
|
9
10
|
interface BatchNoSelectorProps<T> {
|
10
11
|
placeholder?: string;
|
@@ -88,7 +89,11 @@ const BatchNoSelector = <T,>(props: BatchNoSelectorProps<T>) => {
|
|
88
89
|
onChange(data.selectedItem?.uuid);
|
89
90
|
}}
|
90
91
|
initialSelectedItem={initialSelectedItem}
|
91
|
-
itemToString={(s: StockBatchDTO) =>
|
92
|
+
itemToString={(s: StockBatchDTO) =>
|
93
|
+
s?.batchNo
|
94
|
+
? `${s?.batchNo} | Qty: ${s?.quantity ?? 'Unknown'} | Expiry: ${formatForDatePicker(s.expiration)}`
|
95
|
+
: ''
|
96
|
+
}
|
92
97
|
placeholder={props.placeholder}
|
93
98
|
invalid={props.invalid}
|
94
99
|
invalidText={props.invalidText}
|