-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
@makombe , @donaldkibet and @ojwanganto have a look |
Thanks, @FelixKiprotich350. cc @makombe @donaldkibet |
src/common/commonProps.resource.ts
Outdated
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
src/common/listOrderDetails.scss
Outdated
margin-left: 1rem; | ||
margin-top: 2rem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preferably use carbon spacing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @FelixKiprotich350
initialSelectedItem={"All"} | ||
label="" | ||
titleText={ | ||
t("filterOrdersByStatus", "Filter Orders by status") + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t("filterOrdersByStatus", "Filter Orders by status") + | |
t("filterOrdersByStatus", "Filter orders by status") + |
style={{ textAlign: "center" }} | ||
className={styles.noOrdersDiv} | ||
> | ||
{t("noOrderAvailable", "No Orders Availalble")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{t("noOrderAvailable", "No Orders Availalble")} | |
{t("noOrderAvailable", "No orders available")} |
There was a problem hiding this comment.
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>(""); |
There was a problem hiding this comment.
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
currentPage, | ||
} = usePagination(searchResults, currentPageSize); | ||
|
||
const pageSizes = [10, 20, 30, 40, 50]; |
There was a problem hiding this comment.
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
@donaldkibet , @ojwanganto and @makombe .... verify if l left out something on the requested changes |
Requirements
For changes to apps
If applicable
Summary
fixed the grouping of orders by patient and displaying the name of the patient alongside his/her total orders pending
Screenshots
screen shot

screen record
procedures-grouping.webm
Related Issue
Other