@openmrs/esm-fast-data-entry-app 1.0.1-pre.10 → 1.0.1-pre.17
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/132.js +1 -0
- package/dist/247.js +1 -0
- package/dist/255.js +1 -0
- package/dist/294.js +2 -0
- package/dist/294.js.LICENSE.txt +9 -0
- package/dist/32.js +1 -0
- package/dist/327.js +1 -0
- package/dist/403.js +2 -0
- package/dist/403.js.LICENSE.txt +14 -0
- package/dist/553.js +2 -0
- package/dist/553.js.LICENSE.txt +14 -0
- package/dist/569.js +2 -0
- package/dist/569.js.LICENSE.txt +27 -0
- package/dist/574.js +1 -0
- package/dist/595.js +2 -0
- package/dist/595.js.LICENSE.txt +1 -0
- package/dist/617.js +1 -0
- package/dist/68.js +2 -0
- package/dist/68.js.LICENSE.txt +21 -0
- package/dist/776.js +1 -0
- package/dist/804.js +1 -0
- package/dist/820.js +1 -0
- package/dist/906.js +1 -0
- package/dist/935.js +2 -0
- package/dist/935.js.LICENSE.txt +19 -0
- package/dist/main.js +1 -0
- package/dist/openmrs-esm-fast-data-entry-app.js +1 -1
- package/dist/openmrs-esm-fast-data-entry-app.js.buildmanifest.json +544 -0
- package/dist/openmrs-esm-fast-data-entry-app.old +1 -0
- package/package.json +5 -3
- package/src/add-group-modal/AddGroupModal.tsx +80 -27
- package/src/add-group-modal/styles.scss +14 -4
- package/src/context/GroupFormWorkflowContext.tsx +2 -0
- package/src/context/GroupFormWorkflowReducer.ts +26 -2
- package/src/group-form-entry-workflow/GroupFormEntryWorkflow.tsx +2 -2
- package/src/group-form-entry-workflow/{group-banner/GroupBanner.test.tsx → group-display-header/GroupDisplayHeader.test.tsx} +2 -2
- package/src/group-form-entry-workflow/{group-banner/GroupBanner.tsx → group-display-header/GroupDisplayHeader.tsx} +31 -5
- package/src/group-form-entry-workflow/group-display-header/index.ts +3 -0
- package/src/group-form-entry-workflow/{group-banner → group-display-header}/styles.scss +0 -0
- package/src/group-form-entry-workflow/group-search/CompactGroupResults.tsx +61 -28
- package/src/group-form-entry-workflow/group-search/CompactGroupSearch.tsx +5 -0
- package/src/group-form-entry-workflow/group-search/GroupSearch.tsx +65 -8
- package/src/group-form-entry-workflow/group-search/group-search.scss +8 -6
- package/src/group-form-entry-workflow/group-search-header/GroupSearchHeader.tsx +14 -7
- package/src/group-form-entry-workflow/styles.scss +10 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/usePostEndpoint.ts +70 -0
- package/src/hooks/useSearchEndpoint.ts +120 -0
- package/translations/en.json +6 -1
- package/.editorconfig +0 -12
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -10
- package/.husky/pre-push +0 -1
- package/.prettierignore +0 -14
- package/.tx/config +0 -9
- package/.yarn/plugins/@yarnpkg/plugin-version.cjs +0 -550
- package/.yarn/versions/45b499b6.yml +0 -0
- package/src/group-form-entry-workflow/group-banner/index.ts +0 -3
- package/src/group-form-entry-workflow/group-search/mock-group-data.ts +0 -79
- package/src/group-form-entry-workflow/group-search/useGroupSearch.ts +0 -14
- package/src/hooks/usePostCohort.ts +0 -18
|
File without changes
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export const mockGroupData = [
|
|
2
|
-
{
|
|
3
|
-
id: 1,
|
|
4
|
-
name: "Teal Group",
|
|
5
|
-
description: "Coping skills group - Calgary",
|
|
6
|
-
members: [
|
|
7
|
-
{
|
|
8
|
-
name: "Donna Campbell",
|
|
9
|
-
uuid: "f87cae5e-6b64-4f64-884d-d46043a3b7da",
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: "Agnes Lewis",
|
|
13
|
-
uuid: "8af48d72-b155-4b41-ba9c-39e017fcf452",
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: "Daniel Mitchell",
|
|
17
|
-
uuid: "63665703-de71-4a2b-baa4-1a3acf995b7f",
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: 2,
|
|
23
|
-
name: "Orange Group",
|
|
24
|
-
description: "Thursday night depression session",
|
|
25
|
-
members: [
|
|
26
|
-
{
|
|
27
|
-
name: "Mark Martin",
|
|
28
|
-
uuid: "eaef5256-ce7c-402c-9e56-f8e5d1fba22f",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "Robert Evans",
|
|
32
|
-
uuid: "8648a68d-1d68-4293-9d1a-a7a188b91418",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: "Linda Johnson",
|
|
36
|
-
uuid: "8078cc5f-3cd7-4ebb-9ade-515c0dd5f85f",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: "Daniel Green",
|
|
40
|
-
uuid: "4ff33dfa-e4ad-4cb5-bbad-8936f9d162df",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: "Kimberly Adams",
|
|
44
|
-
uuid: "65bb2ebd-fef9-48c4-9c64-16445fa4fe7c",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: "Daniel Lee",
|
|
48
|
-
uuid: "7d46336f-4b6e-4daa-a122-77a7efeb7a2e",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "Nancy Hernández",
|
|
52
|
-
uuid: "89ee2163-4dd4-4d4b-9882-f6be19c15b8f",
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 3,
|
|
58
|
-
name: "Blue Group",
|
|
59
|
-
description: "Thursday night depression session",
|
|
60
|
-
members: [
|
|
61
|
-
{
|
|
62
|
-
name: "Patty Patterson",
|
|
63
|
-
uuid: "9bf3adf4-3a5e-48b2-9adf-e117ce2ecdc5",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: "Johnny Cash",
|
|
67
|
-
uuid: "f43172b8-a6fc-4edb-b92b-8d759ed9da50",
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name: "John Doe Two",
|
|
71
|
-
uuid: "fa918efe-a4a4-4ac8-8381-3ba14ac61953",
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: "Foo Bazzi Bar",
|
|
75
|
-
uuid: "791c9475-8396-4519-a8ab-905cee8cccd3",
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { mockGroupData } from "./mock-group-data";
|
|
2
|
-
|
|
3
|
-
export function useGroupSearch(filter) {
|
|
4
|
-
const searchHistory = mockGroupData || [];
|
|
5
|
-
// if (filter.length <= 2) return [];
|
|
6
|
-
|
|
7
|
-
return filter
|
|
8
|
-
? searchHistory?.filter(
|
|
9
|
-
(item) =>
|
|
10
|
-
item?.description?.toLowerCase()?.includes(filter?.toLowerCase()) ||
|
|
11
|
-
item?.name?.toLowerCase()?.includes(filter?.toLowerCase())
|
|
12
|
-
)
|
|
13
|
-
: searchHistory;
|
|
14
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { openmrsFetch } from "@openmrs/esm-framework";
|
|
2
|
-
|
|
3
|
-
const usePostCohort = () => {
|
|
4
|
-
const cohortURL = `/ws/rest/v1/cohortm/cohort`;
|
|
5
|
-
const fetcher = openmrsFetch(cohortURL, {
|
|
6
|
-
method: "POST",
|
|
7
|
-
headers: {
|
|
8
|
-
"Content-Type": "application/json",
|
|
9
|
-
},
|
|
10
|
-
body: {
|
|
11
|
-
name: "Magenta",
|
|
12
|
-
cohortType: "hello",
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
return fetcher;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default usePostCohort;
|