@openmrs/esm-stock-management-app 1.0.1-pre.338 → 1.0.1-pre.341

Sign up to get free protection for your applications and to get access to all the features.
@@ -112,10 +112,10 @@
112
112
  "initial": true,
113
113
  "entry": true,
114
114
  "recorded": false,
115
- "size": 4354033,
115
+ "size": 4354387,
116
116
  "sizes": {
117
117
  "consume-shared": 252,
118
- "javascript": 4332085,
118
+ "javascript": 4332439,
119
119
  "share-init": 252,
120
120
  "runtime": 21444
121
121
  },
@@ -132,7 +132,7 @@
132
132
  "auxiliaryFiles": [
133
133
  "main.js.map"
134
134
  ],
135
- "hash": "b385faba305ca411",
135
+ "hash": "70636bac7beb7ce2",
136
136
  "childrenByOrder": {}
137
137
  },
138
138
  {
@@ -140,9 +140,9 @@
140
140
  "initial": false,
141
141
  "entry": false,
142
142
  "recorded": false,
143
- "size": 917236,
143
+ "size": 917590,
144
144
  "sizes": {
145
- "javascript": 917026,
145
+ "javascript": 917380,
146
146
  "consume-shared": 210
147
147
  },
148
148
  "names": [],
@@ -156,7 +156,7 @@
156
156
  "auxiliaryFiles": [
157
157
  "220.js.map"
158
158
  ],
159
- "hash": "0bd6e2fb0c9b226a",
159
+ "hash": "8f6b8a00aadb7471",
160
160
  "childrenByOrder": {}
161
161
  },
162
162
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":"^1.2.0","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"}],"pages":[{"component":"stockManagement","route":"stock-management"}],"version":"1.0.1-pre.338"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":"^1.2.0","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"}],"pages":[{"component":"stockManagement","route":"stock-management"}],"version":"1.0.1-pre.341"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-stock-management-app",
3
- "version": "1.0.1-pre.338",
3
+ "version": "1.0.1-pre.341",
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",
@@ -18,7 +18,7 @@ const StockHomeIssuingCard = () => {
18
18
 
19
19
  if (isLoading) return <></>;
20
20
 
21
- if (items.length === 0) {
21
+ if (items?.length === 0) {
22
22
  return (
23
23
  <>
24
24
  <p className={styles.content}>
@@ -28,7 +28,7 @@ const StockHomeIssuingCard = () => {
28
28
  );
29
29
  }
30
30
 
31
- const itemsToDisplay = items.map((item, index) => {
31
+ const itemsToDisplay = items?.map((item, index) => {
32
32
  // Assuming you are using 'stockOperationItems' from each 'item'
33
33
  const stockItems = item?.stockOperationItems || [];
34
34
 
@@ -46,11 +46,11 @@ const StockHomeIssuingCard = () => {
46
46
  return formattedStockItems;
47
47
  });
48
48
 
49
- const flattenedItemsToDisplay = itemsToDisplay.flat().slice(0, 10);
49
+ const flattenedItemsToDisplay = itemsToDisplay?.flat().slice(0, 10);
50
50
 
51
51
  return (
52
52
  <>
53
- {flattenedItemsToDisplay.map((item, index) => (
53
+ {flattenedItemsToDisplay?.map((item, index) => (
54
54
  <div className={styles.card} key={index}>
55
55
  <div className={styles.colorLineGreen} />
56
56
  <div className={styles.icon}>
@@ -30,7 +30,7 @@ const StockHomeReceivingCard = () => {
30
30
 
31
31
  return (
32
32
  <>
33
- {items.map((item, index) =>
33
+ {items?.map((item, index) =>
34
34
  item?.stockOperationItems.map((stock) => (
35
35
  <div className={styles.card} key={index}>
36
36
  <div className={styles.colorLineBlue} />
@@ -422,7 +422,7 @@ const AddStockUserRoleScope: React.FC<AddStockUserRoleScopeProps> = ({
422
422
  </section>
423
423
  <section className={styles.section}>
424
424
  <CheckboxGroup className={styles.checkboxGrid}>
425
- {stockOperations.length > 0 &&
425
+ {stockOperations?.length > 0 &&
426
426
  stockOperations.map((type) => {
427
427
  return (
428
428
  <div style={{ display: "flex", flexDirection: "row" }}>