@openmrs/esm-fast-data-entry-app 1.0.1-pre.17 → 1.0.1-pre.176
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/__mocks__/react-i18next.js +9 -14
- package/dist/101.js +1 -0
- package/dist/101.js.map +1 -0
- package/dist/132.js +1 -1
- package/dist/143.js +1 -0
- package/dist/143.js.map +1 -0
- package/dist/188.js +1 -0
- package/dist/188.js.map +1 -0
- package/dist/197.js +1 -0
- package/dist/219.js +1 -0
- package/dist/219.js.map +1 -0
- package/dist/221.js +1 -0
- package/dist/221.js.map +1 -0
- package/dist/259.js +1 -0
- package/dist/259.js.map +1 -0
- package/dist/29.js +2 -0
- package/dist/29.js.LICENSE.txt +3 -0
- package/dist/29.js.map +1 -0
- package/dist/300.js +1 -0
- package/dist/31.js +2 -0
- package/dist/{569.js.LICENSE.txt → 31.js.LICENSE.txt} +9 -6
- package/dist/31.js.map +1 -0
- package/dist/326.js +1 -0
- package/dist/326.js.map +1 -0
- package/dist/335.js +1 -0
- package/dist/367.js +1 -0
- package/dist/367.js.map +1 -0
- package/dist/480.js +1 -0
- package/dist/491.js +1 -0
- package/dist/491.js.map +1 -0
- package/dist/540.js +2 -0
- package/dist/540.js.map +1 -0
- package/dist/55.js +1 -0
- package/dist/564.js +1 -0
- package/dist/564.js.map +1 -0
- package/dist/602.js +1 -0
- package/dist/602.js.map +1 -0
- package/dist/626.js +2 -0
- package/dist/626.js.LICENSE.txt +9 -0
- package/dist/626.js.map +1 -0
- package/dist/652.js +1 -0
- package/dist/685.js +1 -0
- package/dist/685.js.map +1 -0
- package/dist/773.js +2 -0
- package/dist/{68.js.LICENSE.txt → 773.js.LICENSE.txt} +13 -2
- package/dist/773.js.map +1 -0
- package/dist/91.js +1 -0
- package/dist/91.js.map +1 -0
- package/dist/961.js +2 -0
- package/dist/961.js.map +1 -0
- package/dist/99.js +1 -0
- package/dist/99.js.map +1 -0
- package/dist/main.js +1 -1
- 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 +403 -136
- 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 +41 -38
- package/prettier.config.js +8 -0
- package/src/CancelModal.tsx +42 -0
- package/src/CompleteModal.tsx +35 -0
- package/src/FormBootstrap.tsx +39 -11
- package/src/Root.tsx +7 -12
- package/src/add-group-modal/AddGroupModal.tsx +107 -120
- package/src/add-group-modal/styles.scss +7 -3
- package/src/config-schema.ts +77 -16
- package/src/constant.ts +1 -1
- package/src/context/FormWorkflowContext.tsx +31 -32
- package/src/context/FormWorkflowReducer.ts +53 -67
- package/src/context/GroupFormWorkflowContext.tsx +56 -44
- package/src/context/GroupFormWorkflowReducer.ts +177 -68
- package/src/declarations.d.ts +4 -0
- package/src/empty-state/EmptyDataIllustration.tsx +4 -16
- package/src/empty-state/EmptyState.tsx +8 -13
- package/src/empty-state/styles.scss +14 -14
- package/src/form-entry-workflow/FormEntryWorkflow.tsx +78 -124
- package/src/form-entry-workflow/form-review-card/FormReviewCard.tsx +7 -7
- package/src/form-entry-workflow/form-review-card/index.ts +1 -1
- package/src/form-entry-workflow/form-review-card/styles.scss +9 -11
- package/src/form-entry-workflow/index.ts +1 -1
- package/src/form-entry-workflow/patient-banner/PatientBanner.test.tsx +5 -5
- package/src/form-entry-workflow/patient-banner/PatientBanner.tsx +14 -27
- package/src/form-entry-workflow/patient-banner/index.ts +1 -1
- package/src/form-entry-workflow/patient-banner/styles.scss +11 -12
- package/src/form-entry-workflow/patient-search-header/PatientSearchHeader.tsx +19 -28
- package/src/form-entry-workflow/patient-search-header/index.ts +1 -1
- package/src/form-entry-workflow/patient-search-header/styles.scss +13 -10
- package/src/form-entry-workflow/styles.scss +13 -14
- package/src/form-entry-workflow/workflow-review/WorkflowReview.tsx +13 -11
- package/src/form-entry-workflow/workflow-review/index.ts +1 -1
- package/src/form-entry-workflow/workflow-review/styles.scss +0 -4
- package/src/forms-app-menu-link.tsx +4 -6
- package/src/forms-page/FormsPage.tsx +24 -47
- package/src/forms-page/forms-table/FormsTable.tsx +33 -47
- package/src/forms-page/forms-table/index.ts +1 -1
- package/src/forms-page/forms-table/styles.scss +4 -5
- package/src/forms-page/index.ts +1 -1
- package/src/forms-page/styles.scss +3 -5
- package/src/group-form-entry-workflow/GroupFormEntryWorkflow.tsx +15 -402
- package/src/group-form-entry-workflow/GroupSessionWorkspace.tsx +207 -0
- package/src/group-form-entry-workflow/SessionDetailsForm.tsx +154 -0
- package/src/group-form-entry-workflow/SessionMetaWorkspace.tsx +99 -0
- package/src/group-form-entry-workflow/attendance-table/AttendanceTable.tsx +130 -0
- package/src/group-form-entry-workflow/attendance-table/index.ts +1 -0
- package/src/group-form-entry-workflow/configurable-questions/ConfigurableQuestionsSection.tsx +41 -0
- package/src/group-form-entry-workflow/group-display-header/GroupDisplayHeader.test.tsx +5 -5
- package/src/group-form-entry-workflow/group-display-header/GroupDisplayHeader.tsx +14 -30
- package/src/group-form-entry-workflow/group-display-header/index.ts +1 -1
- package/src/group-form-entry-workflow/group-display-header/styles.scss +20 -20
- package/src/group-form-entry-workflow/group-search/CompactGroupResults.tsx +24 -35
- package/src/group-form-entry-workflow/group-search/CompactGroupSearch.tsx +13 -15
- package/src/group-form-entry-workflow/group-search/GroupSearch.tsx +22 -38
- package/src/group-form-entry-workflow/group-search/compact-group-result.scss +16 -17
- package/src/group-form-entry-workflow/group-search/compact-group-search.scss +7 -8
- package/src/group-form-entry-workflow/group-search/group-search.scss +20 -23
- package/src/group-form-entry-workflow/group-search-header/GroupSearchHeader.tsx +41 -18
- package/src/group-form-entry-workflow/group-search-header/index.ts +1 -1
- package/src/group-form-entry-workflow/group-search-header/styles.scss +8 -8
- package/src/group-form-entry-workflow/index.ts +1 -1
- package/src/group-form-entry-workflow/styles.scss +15 -17
- package/src/hooks/index.ts +7 -6
- package/src/hooks/useForm.ts +56 -0
- package/src/hooks/useFormState.ts +3 -3
- package/src/hooks/useGetAllForms.ts +7 -15
- package/src/hooks/useGetEncounter.ts +3 -3
- package/src/hooks/useGetPatient.ts +3 -3
- package/src/hooks/useGetPatients.ts +32 -0
- package/src/hooks/useGetSystemSetting.ts +36 -0
- package/src/hooks/useKeyPress.ts +5 -5
- package/src/hooks/usePostEndpoint.ts +16 -10
- package/src/hooks/useSearchEndpoint.ts +23 -40
- package/src/hooks/useStartVisit.ts +82 -0
- package/src/index.ts +12 -76
- package/src/patient-card/PatientCard.tsx +8 -20
- package/src/patient-card/index.ts +1 -1
- package/src/patient-card/styles.scss +3 -4
- package/src/routes.json +24 -0
- package/src/setup-tests.ts +1 -1
- package/src/types.ts +20 -0
- package/tools/i18next-parser.config.js +93 -0
- package/translations/am.json +75 -0
- package/translations/ar.json +75 -0
- package/translations/en.json +32 -11
- package/translations/es.json +75 -0
- package/translations/fr.json +75 -0
- package/translations/he.json +75 -0
- package/translations/km.json +75 -0
- package/turbo.json +18 -0
- package/webpack.config.js +1 -1
- package/dist/247.js +0 -1
- package/dist/255.js +0 -1
- package/dist/294.js +0 -2
- package/dist/32.js +0 -1
- package/dist/327.js +0 -1
- package/dist/403.js +0 -2
- package/dist/403.js.LICENSE.txt +0 -14
- package/dist/553.js +0 -2
- package/dist/553.js.LICENSE.txt +0 -14
- package/dist/569.js +0 -2
- package/dist/574.js +0 -1
- package/dist/595.js +0 -2
- package/dist/595.js.LICENSE.txt +0 -1
- package/dist/617.js +0 -1
- package/dist/68.js +0 -2
- package/dist/776.js +0 -1
- package/dist/804.js +0 -1
- package/dist/820.js +0 -1
- package/dist/906.js +0 -1
- package/dist/935.js +0 -2
- package/dist/openmrs-esm-fast-data-entry-app.old +0 -1
- package/src/declarations.d.tsx +0 -2
- /package/dist/{294.js.LICENSE.txt → 540.js.LICENSE.txt} +0 -0
- /package/dist/{935.js.LICENSE.txt → 961.js.LICENSE.txt} +0 -0
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { Button } from
|
|
2
|
-
import React, { useContext } from
|
|
3
|
-
import { useNavigate } from
|
|
4
|
-
import FormWorkflowContext from
|
|
5
|
-
import FormReviewCard from
|
|
6
|
-
import styles from
|
|
1
|
+
import { Button } from '@carbon/react';
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import { useNavigate } from 'react-router-dom';
|
|
4
|
+
import FormWorkflowContext from '../../context/FormWorkflowContext';
|
|
5
|
+
import FormReviewCard from '../form-review-card';
|
|
6
|
+
import styles from './styles.scss';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
7
8
|
|
|
8
9
|
const WorkflowReview = () => {
|
|
9
10
|
const { patientUuids } = useContext(FormWorkflowContext);
|
|
11
|
+
const { t } = useTranslation();
|
|
10
12
|
const navigate = useNavigate();
|
|
11
13
|
return (
|
|
12
14
|
<div className={styles.workspaceWrapper}>
|
|
13
15
|
<div className={styles.workspace}>
|
|
14
16
|
<div className={styles.leftPanel}>
|
|
15
|
-
<h4>Review</h4>
|
|
17
|
+
<h4>{t('review', 'Review')}</h4>
|
|
16
18
|
<div className={styles.navButtons}>
|
|
17
|
-
<Button kind="primary" onClick={() => navigate(
|
|
18
|
-
Save & Close
|
|
19
|
+
<Button kind="primary" onClick={() => navigate('/')}>
|
|
20
|
+
{t('save&close', 'Save & Close')}
|
|
19
21
|
</Button>
|
|
20
|
-
<Button kind="tertiary" onClick={() => navigate(
|
|
21
|
-
Cancel
|
|
22
|
+
<Button kind="tertiary" onClick={() => navigate('/')}>
|
|
23
|
+
{t('cancel', 'Cancel')}
|
|
22
24
|
</Button>
|
|
23
25
|
</div>
|
|
24
26
|
</div>
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { useTranslation } from
|
|
3
|
-
import { ConfigurableLink } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
4
4
|
|
|
5
5
|
export default function FormsAppMenuLink() {
|
|
6
6
|
const { t } = useTranslation();
|
|
7
7
|
return (
|
|
8
8
|
// eslint-disable-next-line
|
|
9
|
-
<ConfigurableLink to="${openmrsSpaBase}/forms">
|
|
10
|
-
{t("formsAppMenuLink", "Fast Data Entry")}
|
|
11
|
-
</ConfigurableLink>
|
|
9
|
+
<ConfigurableLink to="${openmrsSpaBase}/forms">{t('formsAppMenuLink', 'Fast Data Entry')}</ConfigurableLink>
|
|
12
10
|
);
|
|
13
11
|
}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import { useConfig } from
|
|
2
|
-
import { Tab, Tabs, TabList, TabPanels, TabPanel } from
|
|
3
|
-
import React from
|
|
4
|
-
import { Config } from
|
|
5
|
-
import { useGetAllForms } from
|
|
6
|
-
import FormsTable from
|
|
7
|
-
import styles from
|
|
8
|
-
import { useTranslation } from
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
fdeWorkflowStorageVersion,
|
|
12
|
-
} from "../context/FormWorkflowReducer";
|
|
13
|
-
import {
|
|
14
|
-
fdeGroupWorkflowStorageName,
|
|
15
|
-
fdeGroupWorkflowStorageVersion,
|
|
16
|
-
} from "../context/GroupFormWorkflowReducer";
|
|
1
|
+
import { useConfig, useSession } from '@openmrs/esm-framework';
|
|
2
|
+
import { Tab, Tabs, TabList, TabPanels, TabPanel } from '@carbon/react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { type Config } from '../config-schema';
|
|
5
|
+
import { useGetAllForms } from '../hooks';
|
|
6
|
+
import FormsTable from './forms-table';
|
|
7
|
+
import styles from './styles.scss';
|
|
8
|
+
import { useTranslation } from 'react-i18next';
|
|
9
|
+
import { fdeWorkflowStorageName, fdeWorkflowStorageVersion } from '../context/FormWorkflowReducer';
|
|
10
|
+
import { fdeGroupWorkflowStorageName, fdeGroupWorkflowStorageVersion } from '../context/GroupFormWorkflowReducer';
|
|
17
11
|
|
|
18
12
|
// helper function useful for debugging
|
|
19
13
|
// given a list of forms, it will organize into permissions
|
|
@@ -25,7 +19,7 @@ export const getFormPermissions = (forms) => {
|
|
|
25
19
|
(output[form.encounterType.editPrivilege.display] = [
|
|
26
20
|
...(output[form.encounterType.editPrivilege.display] || []),
|
|
27
21
|
form.display,
|
|
28
|
-
])
|
|
22
|
+
]),
|
|
29
23
|
);
|
|
30
24
|
return output;
|
|
31
25
|
};
|
|
@@ -44,36 +38,29 @@ const prepareRowsForTable = (rawFormData) => {
|
|
|
44
38
|
};
|
|
45
39
|
|
|
46
40
|
const FormsPage = () => {
|
|
47
|
-
const config = useConfig()
|
|
41
|
+
const config = useConfig();
|
|
48
42
|
const { t } = useTranslation();
|
|
49
43
|
const { formCategories, formCategoriesToShow } = config;
|
|
50
44
|
const { forms, isLoading, error } = useGetAllForms();
|
|
51
45
|
const cleanRows = prepareRowsForTable(forms);
|
|
52
|
-
const
|
|
53
|
-
const
|
|
46
|
+
const { user } = useSession();
|
|
47
|
+
const savedFormsData = localStorage.getItem(fdeWorkflowStorageName + ':' + user?.uuid);
|
|
48
|
+
const savedGroupFormsData = localStorage.getItem(fdeGroupWorkflowStorageName + ':' + user?.uuid);
|
|
54
49
|
const activeForms = [];
|
|
55
50
|
const activeGroupForms = [];
|
|
56
51
|
|
|
57
|
-
if (
|
|
58
|
-
savedFormsData &&
|
|
59
|
-
JSON.parse(savedFormsData)?.["_storageVersion"] ===
|
|
60
|
-
fdeWorkflowStorageVersion
|
|
61
|
-
) {
|
|
52
|
+
if (savedFormsData && JSON.parse(savedFormsData)?.['_storageVersion'] === fdeWorkflowStorageVersion) {
|
|
62
53
|
Object.entries(JSON.parse(savedFormsData).forms).forEach(
|
|
63
54
|
([formUuid, form]: [string, { [key: string]: unknown }]) => {
|
|
64
55
|
if (form.workflowState) activeForms.push(formUuid);
|
|
65
|
-
}
|
|
56
|
+
},
|
|
66
57
|
);
|
|
67
58
|
}
|
|
68
|
-
if (
|
|
69
|
-
savedGroupFormsData &&
|
|
70
|
-
JSON.parse(savedGroupFormsData)?.["_storageVersion"] ===
|
|
71
|
-
fdeGroupWorkflowStorageVersion
|
|
72
|
-
) {
|
|
59
|
+
if (savedGroupFormsData && JSON.parse(savedGroupFormsData)?.['_storageVersion'] === fdeGroupWorkflowStorageVersion) {
|
|
73
60
|
Object.entries(JSON.parse(savedGroupFormsData).forms).forEach(
|
|
74
61
|
([formUuid, form]: [string, { [key: string]: unknown }]) => {
|
|
75
62
|
if (form.workflowState) activeGroupForms.push(formUuid);
|
|
76
|
-
}
|
|
63
|
+
},
|
|
77
64
|
);
|
|
78
65
|
}
|
|
79
66
|
|
|
@@ -89,15 +76,11 @@ const FormsPage = () => {
|
|
|
89
76
|
|
|
90
77
|
return (
|
|
91
78
|
<div className={styles.mainContent}>
|
|
92
|
-
<h3 className={styles.pageTitle}>
|
|
93
|
-
{t("fastDataEntry", "Fast Data Entry")}
|
|
94
|
-
</h3>
|
|
79
|
+
<h3 className={styles.pageTitle}>{t('fastDataEntry', 'Fast Data Entry')}</h3>
|
|
95
80
|
<Tabs>
|
|
96
81
|
<TabList>
|
|
97
|
-
<Tab label={t(
|
|
98
|
-
{`${t(
|
|
99
|
-
cleanRows ? cleanRows?.length : "??"
|
|
100
|
-
})`}
|
|
82
|
+
<Tab label={t('allForms', 'All Forms')}>
|
|
83
|
+
{`${t('allForms', 'All Forms')} (${cleanRows ? cleanRows?.length : '??'})`}
|
|
101
84
|
</Tab>
|
|
102
85
|
{categoryRows?.map((category, index) => (
|
|
103
86
|
<Tab label={category.name} key={index}>
|
|
@@ -107,17 +90,11 @@ const FormsPage = () => {
|
|
|
107
90
|
</TabList>
|
|
108
91
|
<TabPanels>
|
|
109
92
|
<TabPanel>
|
|
110
|
-
<FormsTable
|
|
111
|
-
rows={cleanRows}
|
|
112
|
-
{...{ error, isLoading, activeForms, activeGroupForms }}
|
|
113
|
-
/>
|
|
93
|
+
<FormsTable rows={cleanRows} {...{ error, isLoading, activeForms, activeGroupForms }} />
|
|
114
94
|
</TabPanel>
|
|
115
95
|
{categoryRows?.map((category, index) => (
|
|
116
96
|
<TabPanel key={index}>
|
|
117
|
-
<FormsTable
|
|
118
|
-
rows={category.rows}
|
|
119
|
-
{...{ error, isLoading, activeForms, activeGroupForms }}
|
|
120
|
-
/>
|
|
97
|
+
<FormsTable rows={category.rows} {...{ error, isLoading, activeForms, activeGroupForms }} />
|
|
121
98
|
</TabPanel>
|
|
122
99
|
))}
|
|
123
100
|
</TabPanels>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErrorState } from
|
|
1
|
+
import { ErrorState } from '@openmrs/esm-framework';
|
|
2
2
|
import {
|
|
3
3
|
DataTable,
|
|
4
4
|
DataTableSkeleton,
|
|
@@ -12,85 +12,66 @@ import {
|
|
|
12
12
|
TableToolbar,
|
|
13
13
|
TableToolbarContent,
|
|
14
14
|
TableToolbarSearch,
|
|
15
|
-
} from
|
|
16
|
-
import React from
|
|
17
|
-
import { useTranslation } from
|
|
18
|
-
import { Link } from
|
|
19
|
-
import EmptyState from
|
|
20
|
-
import styles from
|
|
15
|
+
} from '@carbon/react';
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { useTranslation } from 'react-i18next';
|
|
18
|
+
import { Link } from 'react-router-dom';
|
|
19
|
+
import EmptyState from '../../empty-state/EmptyState';
|
|
20
|
+
import styles from './styles.scss';
|
|
21
21
|
|
|
22
|
-
const FormsTable = ({
|
|
23
|
-
rows,
|
|
24
|
-
error,
|
|
25
|
-
isLoading,
|
|
26
|
-
activeForms,
|
|
27
|
-
activeGroupForms,
|
|
28
|
-
}) => {
|
|
22
|
+
const FormsTable = ({ rows, error, isLoading, activeForms, activeGroupForms }) => {
|
|
29
23
|
const { t } = useTranslation();
|
|
30
24
|
|
|
31
|
-
const
|
|
25
|
+
const tableHeaders = [
|
|
32
26
|
{
|
|
33
|
-
key:
|
|
34
|
-
header: t(
|
|
27
|
+
key: 'display',
|
|
28
|
+
header: t('formName', 'Form Name'),
|
|
29
|
+
isSortable: true,
|
|
35
30
|
},
|
|
36
31
|
{
|
|
37
|
-
key:
|
|
38
|
-
header: t(
|
|
32
|
+
key: 'actions',
|
|
33
|
+
header: t('actions', 'Actions'),
|
|
39
34
|
},
|
|
40
35
|
{
|
|
41
|
-
key:
|
|
42
|
-
header:
|
|
36
|
+
key: 'actions2',
|
|
37
|
+
header: '',
|
|
43
38
|
},
|
|
44
39
|
];
|
|
45
40
|
|
|
46
|
-
const
|
|
41
|
+
const augmentedRows = rows?.map((row) => ({
|
|
47
42
|
...row,
|
|
48
43
|
actions: (
|
|
49
44
|
<Link to={`form/${row.uuid}`}>
|
|
50
|
-
{activeForms.includes(row.uuid)
|
|
51
|
-
? t("resumeSession", "Resume Session")
|
|
52
|
-
: t("fillForm", "Fill Form")}
|
|
45
|
+
{activeForms.includes(row.uuid) ? t('resumeSession', 'Resume Session') : t('fillForm', 'Fill Form')}
|
|
53
46
|
</Link>
|
|
54
47
|
),
|
|
55
48
|
actions2: (
|
|
56
49
|
<Link to={`groupform/${row.uuid}`}>
|
|
57
50
|
{activeGroupForms.includes(row.uuid)
|
|
58
|
-
? t(
|
|
59
|
-
: t(
|
|
51
|
+
? t('resumeGroupSession', 'Resume Group Session')
|
|
52
|
+
: t('startGroupSession', 'Start Group Session')}
|
|
60
53
|
</Link>
|
|
61
54
|
),
|
|
62
55
|
}));
|
|
63
56
|
|
|
64
57
|
if (isLoading) return <DataTableSkeleton />;
|
|
65
58
|
if (error) {
|
|
66
|
-
return (
|
|
67
|
-
<ErrorState
|
|
68
|
-
headerTitle={t("errorLoadingData", "Error Loading Data")}
|
|
69
|
-
error={error}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
59
|
+
return <ErrorState headerTitle={t('errorLoadingData', 'Error Loading Data')} error={error} />;
|
|
72
60
|
}
|
|
73
|
-
if (
|
|
61
|
+
if (augmentedRows.length === 0) {
|
|
74
62
|
return (
|
|
75
63
|
<EmptyState
|
|
76
|
-
headerTitle={t(
|
|
64
|
+
headerTitle={t('noFormsFound', 'No Forms To Show')}
|
|
77
65
|
displayText={t(
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
'noFormsFoundMessage',
|
|
67
|
+
'No forms could be found for this category. Please double check the form concept uuids and access permissions.',
|
|
80
68
|
)}
|
|
81
69
|
/>
|
|
82
70
|
);
|
|
83
71
|
}
|
|
84
72
|
return (
|
|
85
|
-
<DataTable rows={
|
|
86
|
-
{({
|
|
87
|
-
rows,
|
|
88
|
-
headers,
|
|
89
|
-
getTableProps,
|
|
90
|
-
getHeaderProps,
|
|
91
|
-
getRowProps,
|
|
92
|
-
onInputChange,
|
|
93
|
-
}) => {
|
|
73
|
+
<DataTable rows={augmentedRows} headers={tableHeaders}>
|
|
74
|
+
{({ rows, headers, getTableProps, getHeaderProps, getRowProps, onInputChange }) => {
|
|
94
75
|
return (
|
|
95
76
|
<TableContainer>
|
|
96
77
|
<div className={styles.toolbarWrapper}>
|
|
@@ -104,7 +85,12 @@ const FormsTable = ({
|
|
|
104
85
|
<TableHead>
|
|
105
86
|
<TableRow>
|
|
106
87
|
{headers.map((header) => (
|
|
107
|
-
<TableHeader
|
|
88
|
+
<TableHeader
|
|
89
|
+
{...getHeaderProps({
|
|
90
|
+
header,
|
|
91
|
+
isSortable: header.isSortable,
|
|
92
|
+
})}
|
|
93
|
+
>
|
|
108
94
|
{header.header}
|
|
109
95
|
</TableHeader>
|
|
110
96
|
))}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@import "~carbon-components/src/globals/scss/mixins";
|
|
1
|
+
@use '@carbon/colors';
|
|
2
|
+
@use '@carbon/layout';
|
|
4
3
|
|
|
5
4
|
.toolbarWrapper {
|
|
6
5
|
position: relative;
|
|
7
6
|
display: flex;
|
|
8
|
-
height:
|
|
7
|
+
height: layout.$spacing-09;
|
|
9
8
|
justify-content: flex-end;
|
|
10
9
|
}
|
|
11
10
|
|
|
@@ -15,6 +14,6 @@
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
.inactiveLink {
|
|
18
|
-
color:
|
|
17
|
+
color: colors.$gray-40;
|
|
19
18
|
cursor: not-allowed;
|
|
20
19
|
}
|
package/src/forms-page/index.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
// @use '@carbon/styles/scss/type';
|
|
3
|
-
// @import '~@openmrs/esm-styleguide/src/vars';
|
|
1
|
+
@use '@carbon/layout';
|
|
4
2
|
|
|
5
3
|
.mainContent {
|
|
6
|
-
padding:
|
|
4
|
+
padding: layout.$spacing-07;
|
|
7
5
|
}
|
|
8
6
|
|
|
9
7
|
.pageTitle {
|
|
10
|
-
margin-bottom:
|
|
8
|
+
margin-bottom: layout.$spacing-06;
|
|
11
9
|
}
|