Skip to content

Commit 2bdf15b

Browse files
committed
Further refactoring
1 parent 140969b commit 2bdf15b

File tree

7 files changed

+5
-15
lines changed

7 files changed

+5
-15
lines changed

app/src/App/fhir-apps.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import {
3434
URL_USER_ROLES,
3535
URL_FHIR_CARE_TEAM,
3636
URL_TEAM_ASSIGNMENT,
37-
URL_ALL_LOCATIONS,
3837
} from '../constants';
3938
import { providers } from '../configs/settings';
4039
import CustomConnectedAPICallBack from '../components/page/CustomCallback';
@@ -83,6 +82,7 @@ import {
8382
LocationUnitList as FHIRLocationUnitList,
8483
NewEditLocationUnit as FHIRNewEditLocationUnit,
8584
AllLocationListFlat as ListAllLocationsFlat,
85+
URL_ALL_LOCATIONS,
8686
} from '@opensrp/fhir-location-management';
8787
import {
8888
teamAffiliationProps,

app/src/constants.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export const URL_LOCATION_UNIT_EDIT = `${URL_LOCATION_UNIT}/edit/:id`;
2828
export const URL_LOCATION_UNIT_GROUP = `${URL_ADMIN}/location/group`;
2929
export const URL_LOCATION_UNIT_GROUP_ADD = `${URL_LOCATION_UNIT_GROUP}/add`;
3030
export const URL_LOCATION_UNIT_GROUP_EDIT = `${URL_LOCATION_UNIT_GROUP}/edit/:id`;
31-
export const URL_ALL_LOCATIONS = `${URL_ADMIN}/location/all`;
3231
export const URL_UPLOAD_JSON_VALIDATOR = `${URL_ADMIN}/form-config/json-validators/upload`;
3332
export const URL_JSON_VALIDATOR_LIST = `${URL_ADMIN}/form-config/json-validators`;
3433
export const URL_DRAFT_FILE_LIST = `${URL_ADMIN}/form-config/drafts`;

app/src/routes/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import {
1111
import {
1212
URL_USER,
1313
URL_LOCATION_UNIT,
14-
URL_ALL_LOCATIONS,
1514
URL_TEAMS,
1615
URL_TEAM_ASSIGNMENT,
1716
URL_USER_GROUPS,
1817
URL_USER_ROLES,
1918
URL_FHIR_CARE_TEAM,
2019
} from '../constants';
20+
import { URL_ALL_LOCATIONS } from '@opensrp/fhir-location-management';
2121
import { QUEST_VIEW_URL } from '@opensrp/fhir-views';
2222
import type { TFunction } from '@opensrp/i18n';
2323
import { LIST_HEALTHCARE_URL } from '@opensrp/fhir-healthcare-service';

packages/fhir-location-management/src/components/AllLocationListFlat/index.tsx

+1-10
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ export const AllLocationListFlat: React.FC<LocationListPropTypes> = (props) => {
5959
return <BrokenPage errorMessage={(error as Error).message} />;
6060
}
6161

62-
63-
useEffect(() => {
64-
}, [data, isFetching, isLoading, error]);
62+
useEffect(() => {}, [data, isFetching, isLoading, error]);
6563

6664
const tableData: any[] = (data?.records ?? []).map((datum: Dictionary) => ({
6765
key: datum.id,
@@ -170,13 +168,6 @@ export const AllLocationListFlat: React.FC<LocationListPropTypes> = (props) => {
170168
</div>
171169
<TableLayout {...tableProps} />
172170
</Col>
173-
{detailId ? (
174-
<LocationUnitDetail
175-
fhirBaseUrl={fhirBaseURL}
176-
onClose={() => setDetailId('')}
177-
detailId={detailId}
178-
/>
179-
) : null}
180171
</Row>
181172
</div>
182173
);

packages/fhir-location-management/src/constants.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ export const URL_ADMIN = '/admin';
77
export const URL_LOCATION_UNIT = `${URL_ADMIN}/location/unit`;
88
export const URL_LOCATION_UNIT_ADD = `${URL_LOCATION_UNIT}/add`;
99
export const URL_LOCATION_UNIT_EDIT = `${URL_LOCATION_UNIT}/edit`;
10+
export const URL_ALL_LOCATIONS = `${URL_ADMIN}/location/all`;

packages/location-management/src/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ export * from './ducks/locationHierarchy/utils';
1717
export * from './helpers/dataLoaders';
1818
export * from './ducks/locationHierarchy/types';
1919
export * from './ducks/location-units';
20-
export * from '../../fhir-location-management/src/components/AllLocationListFlat';

packages/location-management/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"declaration": true,
66
"declarationDir": "dist/types"
77
},
8-
"include": ["**/src", "../fhir-location-management/src/components/AllLocationListFlat"],
8+
"include": ["**/src"],
99
"exclude": ["**/node_modules", "**/coverage", "**/dist", "**/*.spec.ts", "**/*tests"]
1010
}

0 commit comments

Comments
 (0)