Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
import { launchWorkspace } from "@openmrs/esm-framework";
import React, { useCallback } from "react";
import { useTranslation } from "react-i18next";
import styles from "./death-notification-actions.scss";
import { launchWorkspace } from '@openmrs/esm-framework';
import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import styles from './death-notification-actions.scss';


const DeathNotificationActionsButton : React.FC = () => {
const { t } = useTranslation();
const DeathNotificationActionsButton: React.FC = () => {
const { t } = useTranslation();

const handleLaunchWorkspace = useCallback(() => {
launchWorkspace('patient-form-entry-workspace', {
formInfo: {
formUuid: 'bb282ac8-d8b6-4d76-88b9-86da83efec41',
},
workspaceTitle: 'Notification and Certification of Death',
});
}, []);

launchWorkspace('patient-form-entry-workspace', {
formInfo: {
formUuid: 'bb282ac8-d8b6-4d76-88b9-86da83efec41',
},
workspaceTitle: 'Notification and Certification of Death',
});
}, []);

return (
<li className="cds--overflow-menu-options__option">
<button
className={`cds--overflow-menu-options__btn ${styles.markDeadButton}`}
role="menuitem"
title={t('markDead', 'Mark Dead')}
title={t('markPatientDeceased', 'Mark Patient Deceased')}
data-floating-menu-primary-focus
onClick={() => handleLaunchWorkspace()}
>
<span className="cds--overflow-menu-options__option-content">{t('markDead', 'Mark Dead')}</span>
<span className="cds--overflow-menu-options__option-content">
{t('markPatientDeceased', 'Mark Patient Deceased')}
</span>
</button>
</li>
);
}
};

export default DeathNotificationActionsButton;
export default DeathNotificationActionsButton;
2 changes: 1 addition & 1 deletion packages/esm-patient-queues-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import endVisitConfirmationModalComponent from './active-visits/end-visit/end-vi

import endVisitActionButtonComponent from './active-visits/end-visit/end-visit-action-button.component';

import deathNotificationActionsButtonComponent from './components/actions/death/death-notification-actions-button.component'
import deathNotificationActionsButtonComponent from './components/actions/death/death-notification-actions-button.component';

export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');

Expand Down