Skip to content

Commit

Permalink
render bed summary on /bed-management path (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasulejoseph authored Oct 10, 2023
1 parent 8da2308 commit 59dc035
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ const ActivePatientsTable: React.FC<ActiveVisitsTableProps> = ({
},
actions: {
content: (
<>
<div className={styles.displayFlex}>
{renderActionButton(entry)}
{status === "completed" && (
<ViewActionsMenu
to={`\${openmrsSpaBase}/patient/${entry?.patientUuid}/chart`}
from={fromPage}
/>
)}
</>
</div>
),
},
notes: {
Expand Down
4 changes: 4 additions & 0 deletions src/bed-admission/active-patients/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
background-color: $ui-01;
}

.displayFlex {
display: flex;
}

.section {
border-right: 1px solid colors.$gray-20;
}
Expand Down
4 changes: 1 addition & 3 deletions src/header/header.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ const Header: React.FC<HeaderProps> = ({
return (
<div className={styles.header}>
<div className={styles["left-justified-items"]}>
<ConfigurableLink
to={`${window.getOpenmrsSpaBase()}bed-management/summary`}
>
<ConfigurableLink to={`${window.getOpenmrsSpaBase()}bed-management`}>
<Illustration />
</ConfigurableLink>
<div className={styles["page-labels"]}>
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const adminCardLink = getAsyncLifecycle(

export const summaryLeftPanelLink = getSyncLifecycle(
createLeftPanelLink({
name: "summary",
name: "bed-management",
title: "Summary",
}),
options
Expand Down
2 changes: 1 addition & 1 deletion src/left-panel-link.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function LinkExtension({ config }: { config: LinkConfig }) {
return (
<ConfigurableLink
to={`${window.getOpenmrsSpaBase()}bed-management${
name ? `/${name}` : ""
name && name !== "bed-management" ? `/${name}` : ""
}`}
className={`cds--side-nav__link ${
name === urlSegment && "active-left-nav-link"
Expand Down
2 changes: 1 addition & 1 deletion src/root.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Root: React.FC = () => {
<LeftPanel />
<main className={styles.container}>
<Routes>
<Route path="/summary" element={<Home />} />
<Route path="/" element={<Home />} />
<Route path="/location/:location" element={<WardWithBeds />} />
<Route path="/administration" element={<BedAdministrationTable />} />
</Routes>
Expand Down
2 changes: 1 addition & 1 deletion src/ward-with-beds/ward-with-beds.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const WardWithBeds: React.FC = () => {
iconDescription="Return to summary"
onClick={() =>
navigate({
to: `${window.getOpenmrsSpaBase()}bed-management/summary`,
to: `${window.getOpenmrsSpaBase()}bed-management`,
})
}
>
Expand Down

0 comments on commit 59dc035

Please sign in to comment.