-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from its-kios09/itskios-newQueue
[KHP3-6545 ] Implement ability to move patient from radiology to new queue
- Loading branch information
Showing
3 changed files
with
76 additions
and
4 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
37 changes: 37 additions & 0 deletions
37
...t-ordered/transition-patient-new-queue/transition-latest-queue-entry-button.component.tsx
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 "./transition-latest-queue-entry-button.scss"; | ||
import { showModal } from "@openmrs/esm-framework"; | ||
import { Button } from "@carbon/react"; | ||
import { AirlineManageGates } from "@carbon/react/icons"; | ||
|
||
interface TransitionLatestQueueEntryButtonProps { | ||
patientUuid: string; | ||
} | ||
|
||
const TransitionLatestQueueEntryButton: React.FC< | ||
TransitionLatestQueueEntryButtonProps | ||
> = ({ patientUuid }) => { | ||
const { t } = useTranslation(); | ||
|
||
const launchModal = () => { | ||
const dispose = showModal("transition-patient-to-latest-queue-modal", { | ||
closeModal: () => dispose(), | ||
patientUuid, | ||
}); | ||
}; | ||
|
||
return ( | ||
<Button | ||
kind="tertiary" | ||
className={styles.addPatientToQueue} | ||
onClick={launchModal} | ||
size="sm" | ||
renderIcon={() => <AirlineManageGates size={18} />} | ||
> | ||
{t("transition", "Transition")} | ||
</Button> | ||
); | ||
}; | ||
|
||
export default TransitionLatestQueueEntryButton; |
13 changes: 13 additions & 0 deletions
13
...-tabs/test-ordered/transition-patient-new-queue/transition-latest-queue-entry-button.scss
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,13 @@ | ||
@use '@carbon/layout'; | ||
@use '@carbon/styles/scss/type'; | ||
|
||
.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 layout.$spacing-04; | ||
gap: layout.$spacing-05; | ||
} |