@kenyaemr/esm-admin-app 5.4.3 → 5.4.4-pre.10
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/.turbo/turbo-build.log +2 -2
- package/dist/585.js +1 -1
- package/dist/585.js.map +1 -1
- package/dist/kenyaemr-esm-admin-app.js.buildmanifest.json +6 -6
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +3 -2
- package/src/components/users/manage-users/manage-user-role-scope/user-role-scope-workspace/user-role-scope.workspace.tsx +2 -2
- package/src/user-management.resources.ts +5 -11
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemrCharts":"^1.6.7"},"extensions":[{"component":"adminLeftPanelLink","name":"admin-left-panel-link","slot":"admin-left-panel-slot"},{"component":"userManagementLeftPannelLink","name":"user-management-left-panel-link","slot":"admin-left-panel-slot"},{"component":"etlAdministrationLeftPannelLink","name":"etl-administration-left-panel-link","slot":"admin-left-panel-slot"},{"component":"locationsLeftPanelLink","name":"locations-left-panel-link","slot":"admin-left-panel-slot"},{"component":"facilitySetupLeftPanelLink","name":"facility-setup-left-panel-link","slot":"admin-left-panel-slot"},{"component":"providerBanner","name":"provider-banner","slot":"provider-banner-info-slot","order":1}],"workspaces":[{"name":"manage-user-workspace","component":"manageUserWorkspace","title":"Manage User Workspace","type":"other-form","canMaximize":true,"width":"extra-wide"},{"name":"user-role-scope-workspace","component":"userRoleScopeWorkspace","title":"User Rple Scope Workspace","type":"other-form","canMaximize":true,"width":"extra-wide"},{"name":"add-location-workspace","title":"Add Location","component":"addLocation","type":"workspace"},{"name":"search-location-workspace","title":"Search Location","component":"searchLocationWorkspace","type":"workspace"},{"name":"hwr-sync-workspace","title":"HWR Sync Workspace","component":"hwrSyncWorkspace","type":"other-form"},{"name":"hwr-sync-modal","title":"HWR Sync Modal","component":"hwrSyncModal","type":"modal"}],"modals":[{"component":"operationConfirmationModal","name":"operation-confirmation-modal"},{"component":"hwrConfirmationModal","name":"hwr-confirmation-modal"},{"component":"hwrEmptyModal","name":"hwr-empty-modal"},{"component":"hwrSyncModal","name":"hwr-syncing-modal"}],"pages":[{"component":"root","route":"admin"}],"version":"5.4.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemrCharts":"^1.6.7"},"extensions":[{"component":"adminLeftPanelLink","name":"admin-left-panel-link","slot":"admin-left-panel-slot"},{"component":"userManagementLeftPannelLink","name":"user-management-left-panel-link","slot":"admin-left-panel-slot"},{"component":"etlAdministrationLeftPannelLink","name":"etl-administration-left-panel-link","slot":"admin-left-panel-slot"},{"component":"locationsLeftPanelLink","name":"locations-left-panel-link","slot":"admin-left-panel-slot"},{"component":"facilitySetupLeftPanelLink","name":"facility-setup-left-panel-link","slot":"admin-left-panel-slot"},{"component":"providerBanner","name":"provider-banner","slot":"provider-banner-info-slot","order":1}],"workspaces":[{"name":"manage-user-workspace","component":"manageUserWorkspace","title":"Manage User Workspace","type":"other-form","canMaximize":true,"width":"extra-wide"},{"name":"user-role-scope-workspace","component":"userRoleScopeWorkspace","title":"User Rple Scope Workspace","type":"other-form","canMaximize":true,"width":"extra-wide"},{"name":"add-location-workspace","title":"Add Location","component":"addLocation","type":"workspace"},{"name":"search-location-workspace","title":"Search Location","component":"searchLocationWorkspace","type":"workspace"},{"name":"hwr-sync-workspace","title":"HWR Sync Workspace","component":"hwrSyncWorkspace","type":"other-form"},{"name":"hwr-sync-modal","title":"HWR Sync Modal","component":"hwrSyncModal","type":"modal"}],"modals":[{"component":"operationConfirmationModal","name":"operation-confirmation-modal"},{"component":"hwrConfirmationModal","name":"hwr-confirmation-modal"},{"component":"hwrEmptyModal","name":"hwr-empty-modal"},{"component":"hwrSyncModal","name":"hwr-syncing-modal"}],"pages":[{"component":"root","route":"admin"}],"version":"5.4.4-pre.10"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kenyaemr/esm-admin-app",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.4-pre.10",
|
|
4
4
|
"description": "Facilitates the management of ETL tables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openmrs"
|
|
@@ -47,5 +47,6 @@
|
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
|
-
}
|
|
50
|
+
},
|
|
51
|
+
"stableVersion": "5.4.3"
|
|
51
52
|
}
|
|
@@ -43,7 +43,7 @@ const UserRoleScopeWorkspace: React.FC<UserRoleScopeWorkspaceProps> = ({
|
|
|
43
43
|
const isTablet = useLayoutType() === 'tablet';
|
|
44
44
|
const { userRoleScopeFormSchema } = UserRoleScopeFormSchema();
|
|
45
45
|
const { stockOperations, loadingStock } = useStockOperationTypes();
|
|
46
|
-
const { stockLocations } = useStockTagLocations();
|
|
46
|
+
const { stockLocations, isLoading: loadinglocation } = useStockTagLocations();
|
|
47
47
|
const { rolesConfig, error } = useSystemUserRoleConfigSetting();
|
|
48
48
|
const { items, loadingRoleScope } = useUserRoleScopes();
|
|
49
49
|
|
|
@@ -266,7 +266,7 @@ const UserRoleScopeWorkspace: React.FC<UserRoleScopeWorkspaceProps> = ({
|
|
|
266
266
|
hasInventoryRole={hasInventoryRole}
|
|
267
267
|
stockOperations={stockOperations}
|
|
268
268
|
stockLocations={stockLocations}
|
|
269
|
-
loadingStock={loadingStock}
|
|
269
|
+
loadingStock={loadingStock || loadinglocation}
|
|
270
270
|
roleScopeformMethods={roleScopeformMethods}
|
|
271
271
|
userRoleScopeInitialValues={userRoleScopeInitialValues}
|
|
272
272
|
/>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { fhirBaseUrl, openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
|
|
1
|
+
import { fhirBaseUrl, openmrsFetch, restBaseUrl, useFhirFetchAll } from '@openmrs/esm-framework';
|
|
2
|
+
import uniqBy from 'lodash-es/uniqBy';
|
|
2
3
|
import useSWR, { mutate } from 'swr';
|
|
3
4
|
import {
|
|
4
5
|
AttributeType,
|
|
5
|
-
FHIRResponse,
|
|
6
6
|
PageableResult,
|
|
7
7
|
Provider,
|
|
8
|
-
ProviderAttributes,
|
|
9
8
|
ProviderLocation,
|
|
10
9
|
ProviderResponse,
|
|
11
10
|
Role,
|
|
@@ -13,8 +12,6 @@ import {
|
|
|
13
12
|
User,
|
|
14
13
|
UserRoleScope,
|
|
15
14
|
} from './types';
|
|
16
|
-
import uniqBy from 'lodash-es/uniqBy';
|
|
17
|
-
import { useMemo } from 'react';
|
|
18
15
|
|
|
19
16
|
export const useUser = () => {
|
|
20
17
|
const url = `${restBaseUrl}/user?v=custom:(uuid,username,display,systemId,retired,person:(uuid,display,gender,names:(givenName,familyName,middleName),attributes:(uuid,display)),roles:(uuid,description,display,name))`;
|
|
@@ -169,13 +166,10 @@ export function useStockOperationTypes() {
|
|
|
169
166
|
|
|
170
167
|
export function useStockTagLocations() {
|
|
171
168
|
const apiUrl = `${fhirBaseUrl}/Location?_summary=data&_tag=main store,main pharmacy,dispensary,sub store `;
|
|
172
|
-
const { data, error, isLoading } =
|
|
173
|
-
|
|
174
|
-
() => data?.data?.entry?.map((response) => response.resource) ?? [],
|
|
175
|
-
[data?.data?.entry],
|
|
176
|
-
);
|
|
169
|
+
const { data, error, isLoading } = useFhirFetchAll<fhir.Location>(apiUrl);
|
|
170
|
+
|
|
177
171
|
return {
|
|
178
|
-
stockLocations: uniqBy(
|
|
172
|
+
stockLocations: uniqBy(data, 'id') ?? [],
|
|
179
173
|
isLoading,
|
|
180
174
|
error,
|
|
181
175
|
};
|