@kenyaemr/esm-patient-list-management-app 8.0.1-pre.99 → 8.0.2

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.
Files changed (68) hide show
  1. package/.turbo/turbo-build.log +22 -23
  2. package/dist/130.js +1 -1
  3. package/dist/130.js.LICENSE.txt +2 -0
  4. package/dist/130.js.map +1 -1
  5. package/dist/233.js +2 -0
  6. package/dist/233.js.map +1 -0
  7. package/dist/271.js +1 -2
  8. package/dist/319.js +1 -1
  9. package/dist/325.js +1 -0
  10. package/dist/325.js.map +1 -0
  11. package/dist/37.js +1 -1
  12. package/dist/37.js.map +1 -1
  13. package/dist/455.js +1 -0
  14. package/dist/455.js.map +1 -0
  15. package/dist/460.js +1 -1
  16. package/dist/574.js +1 -1
  17. package/dist/644.js +1 -1
  18. package/dist/658.js +2 -0
  19. package/dist/{271.js.LICENSE.txt → 658.js.LICENSE.txt} +10 -0
  20. package/dist/658.js.map +1 -0
  21. package/dist/757.js +1 -1
  22. package/dist/788.js +1 -1
  23. package/dist/807.js +1 -1
  24. package/dist/814.js +1 -0
  25. package/dist/814.js.map +1 -0
  26. package/dist/833.js +1 -1
  27. package/dist/kenyaemr-esm-patient-list-management-app.js +1 -1
  28. package/dist/kenyaemr-esm-patient-list-management-app.js.buildmanifest.json +116 -143
  29. package/dist/kenyaemr-esm-patient-list-management-app.js.map +1 -1
  30. package/dist/main.js +1 -1
  31. package/dist/main.js.map +1 -1
  32. package/dist/routes.json +1 -1
  33. package/package-lock.json +5901 -0
  34. package/package.json +2 -3
  35. package/src/add-patient/add-patient.component.tsx +81 -152
  36. package/src/add-patient/add-patient.scss +73 -4
  37. package/src/add-patient/add-patient.test.tsx +100 -0
  38. package/src/add-patient-to-patient-list-menu-item.component.tsx +1 -0
  39. package/src/add-patient-to-patient-list-menu-item.test.tsx +5 -1
  40. package/src/api/api-remote.ts +90 -2
  41. package/src/api/types.ts +7 -0
  42. package/src/lists-dashboard/lists-dashboard.component.tsx +22 -16
  43. package/src/lists-dashboard/lists-dashboard.scss +6 -0
  44. package/src/routes.json +6 -4
  45. package/translations/am.json +0 -1
  46. package/translations/ar.json +0 -1
  47. package/translations/en.json +2 -3
  48. package/translations/es.json +0 -1
  49. package/translations/fr.json +35 -36
  50. package/translations/he.json +0 -1
  51. package/translations/km.json +0 -1
  52. package/translations/zh.json +0 -1
  53. package/translations/zh_CN.json +0 -1
  54. package/dist/112.js +0 -1
  55. package/dist/112.js.map +0 -1
  56. package/dist/255.js +0 -2
  57. package/dist/255.js.map +0 -1
  58. package/dist/271.js.map +0 -1
  59. package/dist/382.js +0 -1
  60. package/dist/382.js.map +0 -1
  61. package/dist/384.js +0 -1
  62. package/dist/635.js +0 -1
  63. package/dist/635.js.map +0 -1
  64. package/dist/729.js +0 -1
  65. package/dist/729.js.map +0 -1
  66. package/src/header/header.component.tsx +0 -52
  67. package/src/illo.component.tsx +0 -25
  68. /package/dist/{255.js.LICENSE.txt → 233.js.LICENSE.txt} +0 -0
@@ -2,12 +2,12 @@ import React, { useMemo, useState } from 'react';
2
2
  import classnames from 'classnames';
3
3
  import { useLocation } from 'react-router-dom';
4
4
  import { useTranslation } from 'react-i18next';
5
- import { Tab, Tabs, TabList } from '@carbon/react';
6
- import { navigate } from '@openmrs/esm-framework';
5
+ import { Tab, Tabs, TabList, Button } from '@carbon/react';
6
+ import { Add } from '@carbon/react/icons';
7
+ import { PageHeader, PageHeaderContent, PatientListsPictogram } from '@openmrs/esm-framework';
7
8
  import { type PatientListFilter, PatientListType } from '../api/types';
8
9
  import { useAllPatientLists } from '../api/hooks';
9
10
  import CreateEditPatientList from '../create-edit-patient-list/create-edit-list.component';
10
- import Header from '../header/header.component';
11
11
  import ListsTable from '../lists-table/lists-table.component';
12
12
  import styles from './lists-dashboard.scss';
13
13
 
@@ -42,19 +42,13 @@ const ListsDashboard: React.FC = () => {
42
42
  const patientListFilter = usePatientListFilterForCurrentTab(selectedTab);
43
43
  const { patientLists, isLoading, error, mutate } = useAllPatientLists(patientListFilter);
44
44
  const { search } = useLocation();
45
-
46
- const isCreatingPatientList =
47
- Object.fromEntries(
48
- search
49
- .slice(1)
50
- .split('&')
51
- ?.map((searchParam) => searchParam?.split('=')),
52
- )['new_cohort'] === 'true';
45
+ const [showCreatePatientList, setShowCreatePatientList] = useState(!!search);
46
+ const handleShowNewListOverlay = () => {
47
+ setShowCreatePatientList(true);
48
+ };
53
49
 
54
50
  const handleHideNewListOverlay = () => {
55
- navigate({
56
- to: window.getOpenmrsSpaBase() + 'home/patient-lists',
57
- });
51
+ setShowCreatePatientList(false);
58
52
  };
59
53
 
60
54
  const tableHeaders = [
@@ -67,7 +61,19 @@ const ListsDashboard: React.FC = () => {
67
61
  return (
68
62
  <main className={classnames('omrs-main-content', styles.dashboardContainer)}>
69
63
  <section className={styles.dashboard}>
70
- <Header />
64
+ <PageHeader>
65
+ <PageHeaderContent title={t('patientLists', 'Patient lists')} illustration={<PatientListsPictogram />} />
66
+ <Button
67
+ className={styles.newListButton}
68
+ data-openmrs-role="New List"
69
+ kind="ghost"
70
+ iconDescription="Add"
71
+ renderIcon={(props) => <Add {...props} size={16} />}
72
+ onClick={handleShowNewListOverlay}
73
+ size="sm">
74
+ {t('newList', 'New list')}
75
+ </Button>
76
+ </PageHeader>
71
77
  <Tabs
72
78
  className={styles.tabs}
73
79
  onChange={({ selectedIndex }) => {
@@ -95,7 +101,7 @@ const ListsDashboard: React.FC = () => {
95
101
  </div>
96
102
  </section>
97
103
  <section>
98
- {isCreatingPatientList && <CreateEditPatientList close={handleHideNewListOverlay} onSuccess={() => mutate()} />}
104
+ {showCreatePatientList && <CreateEditPatientList close={handleHideNewListOverlay} onSuccess={() => mutate()} />}
99
105
  </section>
100
106
  </main>
101
107
  );
@@ -6,6 +6,12 @@
6
6
  margin: layout.$spacing-05 0;
7
7
  }
8
8
 
9
+ .newListButton {
10
+ width: fit-content;
11
+ height: fit-content;
12
+ margin: 1rem 0;
13
+ }
14
+
9
15
  .dashboardContainer {
10
16
  display: flex;
11
17
  background-color: $ui-02;
package/src/routes.json CHANGED
@@ -23,14 +23,16 @@
23
23
  "name": "list-details-table",
24
24
  "component": "listDetailsTable"
25
25
  },
26
- {
27
- "name": "add-patient-to-patient-list-modal",
28
- "component": "addPatientToListModal"
29
- },
30
26
  {
31
27
  "name": "add-patient-to-patient-list-button",
32
28
  "slot": "patient-actions-slot",
33
29
  "component": "addPatientToPatientListMenuItem"
34
30
  }
31
+ ],
32
+ "modals": [
33
+ {
34
+ "name": "add-patient-to-patient-list-modal",
35
+ "component": "addPatientToListModal"
36
+ }
35
37
  ]
36
38
  }
@@ -29,7 +29,6 @@
29
29
  "errorDeletingList": "Error deleting patient list",
30
30
  "errorRemovingPatientFromList": "Failed to remove patient from list",
31
31
  "errorUpdatingList": "Error updating list",
32
- "home": "Home",
33
32
  "identifier": "Identifier",
34
33
  "items": "items",
35
34
  "itemsDisplayed": "{{numberOfItemsDisplayed}} items",
@@ -29,7 +29,6 @@
29
29
  "errorDeletingList": "Error deleting patient list",
30
30
  "errorRemovingPatientFromList": "Failed to remove patient from list",
31
31
  "errorUpdatingList": "Error updating list",
32
- "home": "الرئيسية",
33
32
  "identifier": "المعرف",
34
33
  "items": "العناصر",
35
34
  "itemsDisplayed": "{{numberOfItemsDisplayed}} items",
@@ -29,7 +29,6 @@
29
29
  "errorDeletingList": "Error deleting patient list",
30
30
  "errorRemovingPatientFromList": "Failed to remove patient from list",
31
31
  "errorUpdatingList": "Error updating list",
32
- "home": "Home",
33
32
  "identifier": "Identifier",
34
33
  "items": "items",
35
34
  "itemsDisplayed": "{{numberOfItemsDisplayed}} items",
@@ -48,11 +47,10 @@
48
47
  "newPatientListNameLabel": "List name",
49
48
  "nextPage": "Next page",
50
49
  "noMatchingLists": "No matching lists to display",
50
+ "noMatchingListsFound": "No matching lists found",
51
51
  "noMatchingPatients": "No matching patients to display",
52
52
  "noOfPatients": "No. of patients",
53
- "noPatientListFound": "No patient list found",
54
53
  "noPatientsInList": "There are no patients in this list",
55
- "offlinePatients": "Offline patients",
56
54
  "openPatientList": "Add to list",
57
55
  "patientListMemberCount_one": "This list has {{count}} patient",
58
56
  "patientListMemberCount_other": "This list has {{count}} patients",
@@ -78,6 +76,7 @@
78
76
  "successfullyAdded": "Successfully added",
79
77
  "systemDefined": "system-defined",
80
78
  "systemLists": "System lists",
79
+ "trySearchingForADifferentList": "Try searching for a different list",
81
80
  "unstarList": "Unstar list",
82
81
  "updated": "Updated",
83
82
  "userDefined": "user-defined"
@@ -29,7 +29,6 @@
29
29
  "errorDeletingList": "Error deleting patient list",
30
30
  "errorRemovingPatientFromList": "Failed to remove patient from list",
31
31
  "errorUpdatingList": "Error updating list",
32
- "home": "Inicio",
33
32
  "identifier": "Identificador",
34
33
  "items": "elementos",
35
34
  "itemsDisplayed": "{{numberOfItemsDisplayed}} items",
@@ -5,41 +5,40 @@
5
5
  "allLists": "Toutes les listes",
6
6
  "backToListsPage": "Retour sur la page des listes",
7
7
  "cancel": "Annuler",
8
- "checkFilters": "Check the filters above",
8
+ "checkFilters": "Vérifiez les filtres ci-dessus",
9
9
  "configureList": "Configurez votre liste de patients à l'aide des champs ci-dessous",
10
- "confirmDeletePatientList": "Are you sure you want to delete this patient list?",
11
- "created": "Created",
10
+ "confirmDeletePatientList": "Êtes-vous sûr de vouloir supprimer cette liste de patients?",
11
+ "created": "Créé(e)",
12
12
  "createdOn": "Créé le",
13
13
  "createList": "Créer une liste",
14
14
  "createNewPatientList": "Créer une nouvelle liste de patients",
15
- "createPatientList": "Create patient list",
15
+ "createPatientList": "Créer une liste de patients",
16
16
  "deleted": "Supprimé",
17
17
  "deletedPatientList": "Liste des patients supprimés",
18
- "deletePatientList": "Delete patient list",
18
+ "deletePatientList": "Supprimer la liste des patients",
19
19
  "editList": "Modifier la liste",
20
20
  "editNameDescription": "Modifier le Nom/ la Description",
21
21
  "editPatientListHeader": "Modifier la liste des patients",
22
- "emptyList": "This list has no patients",
22
+ "emptyList": "Cette liste ne contient aucun patient",
23
23
  "emptyStateIllustration": "Empty state illustration",
24
24
  "emptyStateText": "Il n'y a pas de liste de patient {{listType}} à afficher",
25
25
  "error": "Erreur",
26
26
  "errorAddPatientToList": "Patient non ajouté à la liste",
27
27
  "errorCopy": "Désolé, une erreur s’est produite à l’affichage. Vous pouvez tenter de rafraîchir la page, ou bien contacter l'administrateur du site et transmettre le message d'erreur ci-dessus.",
28
- "errorCreatingList": "Error creating list",
29
- "errorDeletingList": "Error deleting patient list",
30
- "errorRemovingPatientFromList": "Failed to remove patient from list",
31
- "errorUpdatingList": "Error updating list",
32
- "home": "Accueil",
28
+ "errorCreatingList": "Erreur lors de la création de la liste",
29
+ "errorDeletingList": "Erreur lors de la suppression de la liste de patients",
30
+ "errorRemovingPatientFromList": "Échec de la suppression du patient de la liste",
31
+ "errorUpdatingList": "Erreur lors de la mise à jour de la liste",
33
32
  "identifier": "Identifiant",
34
33
  "items": "eléments",
35
34
  "itemsDisplayed": "{{numberOfItemsDisplayed}} eléments",
36
- "listCreated": "List created successfully",
35
+ "listCreated": "Liste créée avec succès",
37
36
  "listDescriptionPlaceholder": "par ex. Les patients atteints d'asthme diagnostiqué qui peuvent être disposés à faire partie d'une étude de recherche universitaire",
38
- "listName": "List name",
37
+ "listName": "Nom de la liste",
39
38
  "listNamePlaceholder": "par ex. Participants potentiels de la recherche",
40
- "listType": "List type",
41
- "listUpdated": "List updated successfully",
42
- "listUpToDate": "The list is now up to date",
39
+ "listType": "Type de liste",
40
+ "listUpdated": "Liste mise à jour avec succès",
41
+ "listUpToDate": "La liste est maintenant à jour",
43
42
  "myLists": "Mes listes",
44
43
  "name": "Nom",
45
44
  "newList": "Nouvelle liste",
@@ -48,37 +47,37 @@
48
47
  "newPatientListNameLabel": "Nom de la liste",
49
48
  "nextPage": "Page suivante",
50
49
  "noMatchingLists": "Aucun liste à afficher",
51
- "noMatchingPatients": "No matching patients to display",
52
- "noOfPatients": "No. of patients",
50
+ "noMatchingPatients": "Aucun patient correspondant à afficher",
51
+ "noOfPatients": "Nombre de patients",
53
52
  "noPatientListFound": "Aucune liste de patients trouvée",
54
53
  "noPatientsInList": "Il n'y a pas de patient dans cette liste",
55
54
  "offlinePatients": "Patients hors ligne",
56
55
  "openPatientList": "Ajouter à la liste",
57
- "patientListMemberCount_one": "This list has {{count}} patient",
58
- "patientListMemberCount_other": "This list has {{count}} patients",
56
+ "patientListMemberCount_one": "Cette liste a {{count}} patient",
57
+ "patientListMemberCount_other": "Cette liste a {{count}} patients",
59
58
  "patientLists": "Listes de patients",
60
- "patientRemovedFromList": "Patient removed from list",
59
+ "patientRemovedFromList": "Patient retiré de la liste",
61
60
  "patients": "Patients",
62
61
  "previousPage": "Page précédente",
63
- "problemCreatingList": "There was a problem creating the list",
64
- "problemUpdatingList": "There was a problem updating the list",
65
- "removeFromList": "Remove from list",
66
- "removePatientFromListConfirmation": "Are you sure you want to remove {{patientName}} from this list?",
62
+ "problemCreatingList": "Problème lors de la création de la liste",
63
+ "problemUpdatingList": "Problème lors de la mise à jour de la liste",
64
+ "removeFromList": "Supprimer la liste",
65
+ "removePatientFromListConfirmation": "Êtes-vous sûr de vouloir retirer {{patientName}} de cette liste?",
67
66
  "searchForAListToAddThisPatientTo": "Rechercher une liste à laquelle ajouter ce patient.",
68
67
  "searchForList": "Rechercher une liste",
69
- "searchThisList": "Search this list",
68
+ "searchThisList": "Recherchez dans cette liste",
70
69
  "sex": "Sexe",
71
- "starList": "Mettre en favori",
72
- "starred": "favori",
73
- "starredLists": "Listes de favoris",
74
- "starringPatientListFailed": "Marquage des listes de patients comme favoris/non favoris échec du marquage",
70
+ "starList": "Étoile de la liste",
71
+ "starred": "étoilé",
72
+ "starredLists": "Listes etoilées",
73
+ "starringPatientListFailed": "Marquage des listes de patients étoilées / non étoilées a échoué",
75
74
  "startDate": "Date de début",
76
- "submitting": "Submitting",
75
+ "submitting": "En cours de soumission",
77
76
  "successAddPatientToList": "Patient ajouté à la liste",
78
77
  "successfullyAdded": "Ajouté avec succès",
79
- "systemDefined": "system-defined",
80
- "systemLists": "Listes systemes",
81
- "unstarList": "Enlever comme favori",
82
- "updated": "Updated",
83
- "userDefined": "user-defined"
78
+ "systemDefined": "définie par le système",
79
+ "systemLists": "Listes du système",
80
+ "unstarList": "Enlever comme étoilée",
81
+ "updated": "Mis à jour",
82
+ "userDefined": "définie par I'utilisateur"
84
83
  }
@@ -29,7 +29,6 @@
29
29
  "errorDeletingList": "שגיאה במחיקת רשימת המטופלים",
30
30
  "errorRemovingPatientFromList": "נכשל להסיר מטופל מהרשימה",
31
31
  "errorUpdatingList": "שגיאה בעדכון רשימה",
32
- "home": "בית",
33
32
  "identifier": "מזהה",
34
33
  "items": "פריטים",
35
34
  "itemsDisplayed": "{{numberOfItemsDisplayed}} items",
@@ -29,7 +29,6 @@
29
29
  "errorDeletingList": "Error deleting patient list",
30
30
  "errorRemovingPatientFromList": "Failed to remove patient from list",
31
31
  "errorUpdatingList": "Error updating list",
32
- "home": "ទំព័រដើម",
33
32
  "identifier": "អ្នកកំណត់អត្តសញ្ញាណ",
34
33
  "items": "ពត៌មានតាមមុខនិមួយៗ",
35
34
  "itemsDisplayed": "{{numberOfItemsDisplayed}} items",
@@ -29,7 +29,6 @@
29
29
  "errorDeletingList": "删除患者列表时出现错误",
30
30
  "errorRemovingPatientFromList": "未能从列表中移除患者",
31
31
  "errorUpdatingList": "更新列表时出现错误",
32
- "home": "首页",
33
32
  "identifier": "ID",
34
33
  "items": "项",
35
34
  "itemsDisplayed": "{{numberOfItemsDisplayed}} 项",
@@ -29,7 +29,6 @@
29
29
  "errorDeletingList": "删除患者列表时出现错误",
30
30
  "errorRemovingPatientFromList": "未能从列表中移除患者",
31
31
  "errorUpdatingList": "更新列表时出现错误",
32
- "home": "首页",
33
32
  "identifier": "ID",
34
33
  "items": "项",
35
34
  "itemsDisplayed": "{{numberOfItemsDisplayed}} 项",