Skip to content

Commit

Permalink
Merge branch 'main' into bed-type
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel090 authored Jan 23, 2024
2 parents 24e9724 + cdf0ba9 commit 033d9a8
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ const ActivePatientsTable: React.FC<ActiveVisitsTableProps> = ({
session?.sessionLocation?.uuid,
status
);

const handleBedAssigmentModal = useCallback(
(entry) => {
setSelectedPatientDetails({
Expand Down
3 changes: 1 addition & 2 deletions src/bed-admission/bed-admission-tabs.component.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tab, TabList, TabPanel, TabPanels, Tabs } from "@carbon/react";
import { Tab, TabList, TabPanel, TabPanels, Tabs, Button } from "@carbon/react";
import React, { useState } from "react";
import styles from "./bed-admission-tabs-styles.scss";
import { useTranslation } from "react-i18next";
Expand All @@ -12,7 +12,6 @@ const BedAdmissionTabs: React.FC = () => {
const [admittedCount, setAdmittedCount] = useState(0);
const [toAdmitCount, setToAdmitCount] = useState(0);
const [toDischargeCount, setToDischargeCount] = useState(0);

return (
<>
<div className={styles.cardContainer}>
Expand Down
1 change: 0 additions & 1 deletion src/bed-admission/bed-tag/edit-tag-form.component.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useCallback } from "react";
import { useTranslation } from "react-i18next";
import { showToast, showNotification } from "@openmrs/esm-framework";

import { editBedTag, useBedTag } from "../../summary/summary.resource";
import { BedTagDataAdministration } from "../../bed-administration/bed-administration-types";
import BedTagsAdministrationForm from "./bed-tags-admin-form.component";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const BedTypeAdministrationTable: React.FC = () => {
onChange={({ page, pageSize }) => {
setCurrentPage(page);
pageSize(pageSize);

}}
/>
</TableContainer>
Expand Down
1 change: 0 additions & 1 deletion src/bed-admission/bed-type/edit-bed-type.component.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useCallback } from "react";
import { useTranslation } from "react-i18next";
import { showToast, showNotification } from "@openmrs/esm-framework";

import { editBedType, useBedType } from "../../summary/summary.resource";
import { BedTypeDataAdministration } from "../../bed-administration/bed-administration-types";
import { BedTypeData, Mutator } from "../../types";
Expand Down
1 change: 0 additions & 1 deletion src/root.component.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useEffect } from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { setLeftNav, unsetLeftNav } from "@openmrs/esm-framework";
import BedAdministrationTable from "./bed-administration/bed-administration-table.component";
import Home from "./home.component";
import LeftPanel from "./left-panel/left-panel.component";
import WardWithBeds from "./ward-with-beds/ward-with-beds.component";
Expand Down
10 changes: 10 additions & 0 deletions src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
"name": "bed-administration-left-panel-link",
"slot": "bed-management-left-panel-slot"
},
{
"component": "bedTypeLeftPanelLink",
"name": "bed-type-left-panel-link",
"slot": "bed-management-left-panel-slot"
},
{
"component": "bedTagLeftPanelLink",
"name": "bed-tag-left-panel-link",
"slot": "bed-management-left-panel-slot"
},
{
"component": "summaryLeftPanelLink",
"name": "bed-management-home-dashboard-link",
Expand Down
11 changes: 11 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ export interface InitialData {
};
}

export interface BedTypeData {
uuid: string;
name: string;
displayName: string;
description: string;
}

export interface BedTagData {
uuid: string;
name: string;
}
export type Mutator = KeyedMutator<{
data: {
results: Array<Location>;
Expand Down

0 comments on commit 033d9a8

Please sign in to comment.