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

OBPIH-4713 PO List fixes after QA #3488

Merged
merged 15 commits into from
Sep 23, 2022
Merged

OBPIH-4713 PO List fixes after QA #3488

merged 15 commits into from
Sep 23, 2022

Conversation

kchelstowski
Copy link
Collaborator

No description provided.

};

const rollbackOrder = (id) => {
window.location = `/openboxes/order/rollbackOrderStatus/${id}`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be done through the API

Alert.error('Order must be placed in order to print');
return;
}
window.location = `/openboxes/order/print/${id}`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be done throught the API

@@ -302,21 +302,21 @@ class OrderController {
}
if (orderInstance.status != OrderStatus.PENDING) {
flash.message = "${warehouse.message(code: 'default.not.deleted.message', args: [warehouse.message(code: 'order.label', default: 'Order'), orderInstance.orderNumber])}"
redirect(action: "list", id: params.id, params: [orderType: orderInstance.orderType])
redirect(controller: "purchaseOrder", action: "list")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not be done like that, because this is affecting all order types.

@@ -122,7 +122,7 @@
<g:elseif test="${currentState}">
<%-- Show Order --%>
<g:if test="${currentState == 'showOrder'}">
<g:link controller="order" action="list" class="button">
<g:link controller="purchaseOrder" action="list" class="button">
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not redirect to PO list other order types.

formProps,
defaultValues,
allowEmptySubmit,
hiddenByDefault,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think simple hidden would be better.

@@ -147,32 +215,32 @@ const PurchaseOrderListTable = ({
defaultLabel: 'Print order',
leftIcon: <RiPrinterLine />,
activityCode: ['PLACE_ORDER'],
href: '/openboxes/order/print',
onClickActionWithId: id => printOrder(id),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why it can't be a simple: onClick?


const cancelOrder = () => {
Alert.error(translate('react.default.featureNotSupported', 'This feature is not currently supported'));
// It will be implemented in the future
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need for this comment.

window.location = `/openboxes/order/print/${id}`;
};

const cancelOrder = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we just hide/remove the option to cancel if it is not yet implemented?

@@ -609,6 +609,11 @@ class UrlMappings {
action = [GET: "statusOptions"]
}

"/api/purchaseOrders/rollbackOrder/$id"(parseRequest: true) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Endpoint should be: /api/purchaseOrders/$id/rollback and action should be called rollback

@awalkowiak awalkowiak merged commit a9967ef into feature/ui-redesign Sep 23, 2022
@awalkowiak awalkowiak deleted the OBPIH-4713 branch September 23, 2022 15:51
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.

None yet

2 participants