Skip to content

Commit

Permalink
fix : reject order
Browse files Browse the repository at this point in the history
  • Loading branch information
jabahum committed Nov 27, 2023
1 parent 22c87b0 commit e8591f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/reject-order/reject-order-dialog.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const RejectOrderDialog: React.FC<RejectOrderDialogProps> = ({
event.preventDefault();

const payload = {
fulfillerStatus: "DECLINED",
instructions: notes,
fulfillerStatus: "EXCEPTION", // Todo changed to Declined when UgEMR module is upgraded to 2.6.1
fulfillerComment: notes,
};
RejectOrder(order.uuid, payload).then(
(resp) => {
Expand Down Expand Up @@ -86,11 +86,11 @@ const RejectOrderDialog: React.FC<RejectOrderDialogProps> = ({
<br />
<section className={styles.section}>
<TextArea
labelText={t("notes", "Enter instructions ")}
labelText={t("notes", "Enter Comments ")}
id="nextNotes"
name="nextNotes"
invalidText="Required"
helperText="Please enter notes"
helperText="Please enter comment"
maxCount={500}
enableCounter
onChange={(e) => setNotes(e.target.value)}
Expand Down
2 changes: 1 addition & 1 deletion src/reject-order/reject-order-dialog.resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FetchResponse, openmrsFetch, useConfig } from "@openmrs/esm-framework";
export async function RejectOrder(uuid: string, body: any) {
const abortController = new AbortController();

return openmrsFetch(`/ws/rest/v1/order/${uuid}`, {
return openmrsFetch(`/ws/rest/v1/order/${uuid}/fulfillerdetails/`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down

0 comments on commit e8591f5

Please sign in to comment.