@openmrs/esm-stock-management-app 1.0.1-pre.336 → 1.0.1-pre.338
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/220.js +1 -1
- package/dist/220.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/useStockList.tsx +2 -2
- package/src/stock-items/add-bulk-stock-item/stock-items-bulk-import.resource.ts +2 -2
- package/src/stock-lookups/stock-lookups.resource.ts +2 -1
@@ -112,10 +112,10 @@
|
|
112
112
|
"initial": true,
|
113
113
|
"entry": true,
|
114
114
|
"recorded": false,
|
115
|
-
"size":
|
115
|
+
"size": 4354033,
|
116
116
|
"sizes": {
|
117
117
|
"consume-shared": 252,
|
118
|
-
"javascript":
|
118
|
+
"javascript": 4332085,
|
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": "
|
135
|
+
"hash": "b385faba305ca411",
|
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":
|
143
|
+
"size": 917236,
|
144
144
|
"sizes": {
|
145
|
-
"javascript":
|
145
|
+
"javascript": 917026,
|
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": "
|
159
|
+
"hash": "0bd6e2fb0c9b226a",
|
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.
|
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"}
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import useSWR from "swr";
|
2
|
-
import { openmrsFetch } from "@openmrs/esm-framework";
|
2
|
+
import { openmrsFetch, restBaseUrl } from "@openmrs/esm-framework";
|
3
3
|
|
4
4
|
interface StockList {
|
5
5
|
uuid: string;
|
@@ -13,7 +13,7 @@ interface StockList {
|
|
13
13
|
}
|
14
14
|
|
15
15
|
const useStockList = () => {
|
16
|
-
const url =
|
16
|
+
const url = `${restBaseUrl}/stockmanagement/stockitem`;
|
17
17
|
|
18
18
|
const { data, error } = useSWR<{ data: { results: Array<StockList> } }>(
|
19
19
|
url,
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { openmrsFetch } from "@openmrs/esm-framework";
|
1
|
+
import { openmrsFetch, restBaseUrl } from "@openmrs/esm-framework";
|
2
2
|
|
3
3
|
export async function UploadStockItems(body: any) {
|
4
4
|
const abortController = new AbortController();
|
5
5
|
|
6
|
-
return openmrsFetch(
|
6
|
+
return openmrsFetch(`${restBaseUrl}/stockmanagement/stockitemimport`, {
|
7
7
|
method: "POST",
|
8
8
|
// headers: {
|
9
9
|
// "Content-Type": "application/json",
|
@@ -4,6 +4,7 @@ import {
|
|
4
4
|
fhirBaseUrl,
|
5
5
|
openmrsFetch,
|
6
6
|
useSession,
|
7
|
+
restBaseUrl,
|
7
8
|
} from "@openmrs/esm-framework";
|
8
9
|
import { ResourceFilterCriteria, toQueryParams } from "../core/api/api";
|
9
10
|
import { PageableResult } from "../core/api/types/PageableResult";
|
@@ -289,7 +290,7 @@ type UserRole = {
|
|
289
290
|
|
290
291
|
export const useUserRoles = () => {
|
291
292
|
const { user: loggedInUser } = useSession();
|
292
|
-
const url =
|
293
|
+
const url = `${restBaseUrl}/stockmanagement/userrolescope`;
|
293
294
|
const { data, isLoading, error } = useSWR<{ data: UserRole }>(
|
294
295
|
url,
|
295
296
|
openmrsFetch
|