Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) updated the procedures app UI by grouping orders by patient #61

Merged
merged 3 commits into from
Aug 2, 2024

Conversation

FelixKiprotich350
Copy link
Contributor

Requirements

  • This PR has a title that briefly describes the work done including a conventional commit type prefix and a Jira ticket number if applicable. See existing PR titles for inspiration.

For changes to apps

If applicable

  • My work includes tests or is validated by existing tests.

Summary

fixed the grouping of orders by patient and displaying the name of the patient alongside his/her total orders pending

Screenshots

screen shot
Screenshot from 2024-07-29 15-48-50
screen record
procedures-grouping.webm

Related Issue

Other

@FelixKiprotich350
Copy link
Contributor Author

@makombe , @donaldkibet and @ojwanganto have a look

@ojwanganto
Copy link
Contributor

Thanks, @FelixKiprotich350. cc @makombe @donaldkibet

Comment on lines 3 to 44
export interface WorklistProps {
fulfillerStatus: string;
}

export interface ResultsOrderProps {
order: Result;
patientUuid: string;
}

export interface RejectOrderProps {
order: Result;
}

export interface InstructionsProps {
order: Result;
}

export interface GroupedOrders {
patientId: string;
orders: Array<Result>;
}
export interface GroupedOrdersTableProps {
orders: Array<Result>;
showStatus: boolean;
showActions: boolean;
showOrderType: boolean;
showStatusFilter: boolean;
showDateFilter: boolean;
actions: Array<OrderAction>;
}

export interface ListOrdersDetailsProps {
groupedOrders: GroupedOrders;
showStatus: boolean;
showActions: boolean;
showOrderType: boolean;
actions: Array<OrderAction>;
}

export interface OrderAction {
actionName: string;
displayPosition: 0 | number;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can name this file appropriately, seems to be types and not resource

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

types and interfaces should be centralized on types/index.ts file

Comment on lines 53 to 54
margin-left: 1rem;
margin-top: 2rem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preferably use carbon spacing

Copy link
Contributor

@makombe makombe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initialSelectedItem={"All"}
label=""
titleText={
t("filterOrdersByStatus", "Filter Orders by status") +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
t("filterOrdersByStatus", "Filter Orders by status") +
t("filterOrdersByStatus", "Filter orders by status") +

style={{ textAlign: "center" }}
className={styles.noOrdersDiv}
>
{t("noOrderAvailable", "No Orders Availalble")}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{t("noOrderAvailable", "No Orders Availalble")}
{t("noOrderAvailable", "No orders available")}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also re-attach the video not able to view the attached.

const workListEntries = props.orders;
const { t } = useTranslation();
const [currentPageSize, setCurrentPageSize] = useState<number>(10);
const [searchString, setSearchString] = useState<string>("");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should removed unused imports

src/common/groupedOrdersTable.component.tsx Outdated Show resolved Hide resolved
currentPage,
} = usePagination(searchResults, currentPageSize);

const pageSizes = [10, 20, 30, 40, 50];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use usePaginationInfo hook to generate this pageSizes its imported from @openmrs/esm-framework

src/common/groupedOrdersTable.component.tsx Outdated Show resolved Hide resolved
src/common/groupedOrdersTable.component.tsx Outdated Show resolved Hide resolved
src/common/groupedOrdersTable.component.tsx Outdated Show resolved Hide resolved
src/common/groupedOrdersTable.component.tsx Show resolved Hide resolved
src/common/groupedOrdersTable.scss Outdated Show resolved Hide resolved
@FelixKiprotich350
Copy link
Contributor Author

@donaldkibet , @ojwanganto and @makombe .... verify if l left out something on the requested changes

@donaldkibet donaldkibet merged commit 5006995 into palladiumkenya:main Aug 2, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants