@kenyaemr/esm-morgue-app 5.4.1-pre.2099 → 5.4.1-pre.2102

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.
@@ -1,6 +1,6 @@
1
1
  import { Button, Layer, Tab, TabList, TabPanel, TabPanels, Tabs } from '@carbon/react';
2
2
  import { SearchAdvanced } from '@carbon/react/icons';
3
- import { launchWorkspace } from '@openmrs/esm-framework';
3
+ import { launchWorkspace, UserHasAccess } from '@openmrs/esm-framework';
4
4
  import React from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import useEmrConfiguration from '../hook/useAdmitPatient';
@@ -56,14 +56,16 @@ export const MorgueTabs: React.FC = () => {
56
56
  ))}
57
57
  </TabList>
58
58
  <div className={styles.actionBtn}>
59
- <Button
60
- kind="primary"
61
- renderIcon={(props) => <SearchAdvanced size={40} {...props} />}
62
- onClick={() => handleAdmitBodyWorkspace()}
63
- className={styles.actionBtn}
64
- disabled={isLoadingDischargedPatient}>
65
- {t('admitBodies', 'Admit bodies')}
66
- </Button>
59
+ <UserHasAccess privilege="o3 : Admit Body to Mortuary">
60
+ <Button
61
+ kind="primary"
62
+ renderIcon={(props) => <SearchAdvanced size={40} {...props} />}
63
+ onClick={() => handleAdmitBodyWorkspace()}
64
+ className={styles.actionBtn}
65
+ disabled={isLoadingDischargedPatient}>
66
+ {t('admitBodies', 'Admit bodies')}
67
+ </Button>
68
+ </UserHasAccess>
67
69
  </div>
68
70
  </div>
69
71