-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat) added add patient to queue button
- Loading branch information
1 parent
d432224
commit a0322a5
Showing
6 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
@use '@carbon/styles/scss/spacing'; | ||
@use '@carbon/styles/scss/type'; | ||
.menuItem { | ||
max-width: none; | ||
} | ||
.addPatientToQueue{ | ||
--cds-layout-size-height-context: var(--cds-layout-size-height-sm, 2rem); | ||
--cds-layout-size-height: var(--cds-layout-size-height-context); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
text-align: center; | ||
padding: 0 spacing.$spacing-04; | ||
gap: 1rem; | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import styles from "./actions.scss"; | ||
import { showModal } from "@openmrs/esm-framework"; | ||
import { Button } from "@carbon/react"; | ||
import { AirlineManageGates } from "@carbon/react/icons"; | ||
|
||
interface AddPatientToQueueButtonProps { | ||
patientUuid: string; | ||
} | ||
|
||
const AddPatientToQueueButton: React.FC<AddPatientToQueueButtonProps> = ({ | ||
patientUuid, | ||
}) => { | ||
const { t } = useTranslation(); | ||
|
||
const launchModal = () => { | ||
const dispose = showModal("add-patient-to-queue-entry-modal", { | ||
closeModal: () => dispose(), | ||
patientUuid, | ||
}); | ||
}; | ||
|
||
return ( | ||
<Button | ||
kind="tertiary" | ||
className={styles.addPatientToQueue} | ||
onClick={launchModal} | ||
size="sm" | ||
renderIcon={() => <AirlineManageGates size={18} />} | ||
> | ||
{t("addToAQueue", "Add to a queue")} | ||
</Button> | ||
); | ||
}; | ||
|
||
export default AddPatientToQueueButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters