@openmrs/esm-fast-data-entry-app 1.0.1-pre.10 → 1.0.1-pre.102
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/README.md +21 -2
- package/dist/153.js +1 -0
- package/dist/153.js.map +1 -0
- package/dist/233.js +2 -0
- package/dist/233.js.LICENSE.txt +9 -0
- package/dist/233.js.map +1 -0
- package/dist/262.js +1 -0
- package/dist/262.js.map +1 -0
- package/dist/279.js +1 -0
- package/dist/279.js.map +1 -0
- package/dist/294.js +2 -0
- package/dist/294.js.LICENSE.txt +9 -0
- package/dist/294.js.map +1 -0
- package/dist/319.js +1 -0
- package/dist/327.js +1 -0
- package/dist/327.js.map +1 -0
- package/dist/409.js +2 -0
- package/dist/409.js.LICENSE.txt +27 -0
- package/dist/409.js.map +1 -0
- package/dist/415.js +1 -0
- package/dist/415.js.map +1 -0
- package/dist/559.js +1 -0
- package/dist/559.js.map +1 -0
- package/dist/574.js +1 -0
- package/dist/651.js +1 -0
- package/dist/651.js.map +1 -0
- package/dist/706.js +1 -0
- package/dist/706.js.map +1 -0
- package/dist/757.js +1 -0
- package/dist/788.js +1 -0
- package/dist/800.js +2 -0
- package/dist/800.js.LICENSE.txt +5 -0
- package/dist/800.js.map +1 -0
- package/dist/807.js +1 -0
- package/dist/820.js +1 -0
- package/dist/820.js.map +1 -0
- package/dist/833.js +1 -0
- package/dist/883.js +1 -0
- package/dist/883.js.map +1 -0
- package/dist/889.js +1 -0
- package/dist/889.js.map +1 -0
- package/dist/897.js +2 -0
- package/dist/897.js.LICENSE.txt +21 -0
- package/dist/897.js.map +1 -0
- package/dist/92.js +1 -0
- package/dist/92.js.map +1 -0
- package/dist/935.js +2 -0
- package/dist/935.js.LICENSE.txt +19 -0
- package/dist/935.js.map +1 -0
- package/dist/959.js +1 -0
- package/dist/959.js.map +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -0
- package/dist/openmrs-esm-fast-data-entry-app.js +1 -1
- package/dist/openmrs-esm-fast-data-entry-app.js.buildmanifest.json +742 -0
- package/dist/openmrs-esm-fast-data-entry-app.js.map +1 -0
- package/dist/routes.json +1 -0
- package/jest.config.json +2 -1
- package/package.json +13 -10
- package/src/CancelModal.tsx +48 -0
- package/src/CompleteModal.tsx +46 -0
- package/src/FormBootstrap.tsx +18 -3
- package/src/add-group-modal/AddGroupModal.tsx +113 -34
- package/src/add-group-modal/styles.scss +14 -4
- package/src/config-schema.ts +22 -0
- package/src/context/FormWorkflowContext.tsx +13 -1
- package/src/context/FormWorkflowReducer.ts +13 -3
- package/src/context/GroupFormWorkflowContext.tsx +41 -6
- package/src/context/GroupFormWorkflowReducer.ts +170 -12
- package/src/form-entry-workflow/FormEntryWorkflow.tsx +67 -101
- package/src/form-entry-workflow/styles.scss +2 -1
- package/src/forms-page/FormsPage.tsx +8 -3
- package/src/forms-page/forms-table/FormsTable.tsx +11 -5
- package/src/group-form-entry-workflow/GroupFormEntryWorkflow.tsx +13 -400
- package/src/group-form-entry-workflow/GroupSessionWorkspace.tsx +247 -0
- package/src/group-form-entry-workflow/SessionDetailsForm.tsx +131 -0
- package/src/group-form-entry-workflow/SessionMetaWorkspace.tsx +107 -0
- package/src/group-form-entry-workflow/attendance-table/AttendanceTable.tsx +144 -0
- package/src/group-form-entry-workflow/attendance-table/index.ts +1 -0
- 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} +23 -5
- package/src/group-form-entry-workflow/group-display-header/index.ts +3 -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 +41 -10
- package/src/group-form-entry-workflow/styles.scss +12 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useGetPatient.ts +1 -1
- package/src/hooks/useGetPatients.ts +34 -0
- package/src/hooks/useGetSystemSetting.ts +38 -0
- package/src/hooks/usePostEndpoint.ts +76 -0
- package/src/hooks/useSearchEndpoint.ts +120 -0
- package/src/hooks/useStartVisit.ts +92 -0
- package/src/index.ts +13 -65
- package/src/patient-card/styles.scss +1 -0
- package/src/routes.json +24 -0
- package/tools/i18next-parser.config.js +93 -0
- package/translations/am.json +69 -0
- package/translations/en.json +29 -9
- package/translations/es.json +69 -0
- package/translations/fr.json +69 -0
- package/translations/he.json +69 -0
- package/translations/km.json +69 -0
- 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
- /package/src/group-form-entry-workflow/{group-banner → group-display-header}/styles.scss +0 -0
|
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;
|
|
File without changes
|