-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Conversation
… be hidden by default and to allow empty submit
…tooltip issue for party and change placeholder of search field
}; | ||
|
||
const rollbackOrder = (id) => { | ||
window.location = `/openboxes/order/rollbackOrderStatus/${id}`; |
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.
this should be done through the API
Alert.error('Order must be placed in order to print'); | ||
return; | ||
} | ||
window.location = `/openboxes/order/print/${id}`; |
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.
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") |
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.
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"> |
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.
This should not redirect to PO list other order types.
formProps, | ||
defaultValues, | ||
allowEmptySubmit, | ||
hiddenByDefault, |
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.
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), |
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.
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 |
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.
No need for this comment.
window.location = `/openboxes/order/print/${id}`; | ||
}; | ||
|
||
const cancelOrder = () => { |
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 we just hide/remove the option to cancel if it is not yet implemented?
2e0c5ab
to
2228147
Compare
grails-app/conf/UrlMappings.groovy
Outdated
@@ -609,6 +609,11 @@ class UrlMappings { | |||
action = [GET: "statusOptions"] | |||
} | |||
|
|||
"/api/purchaseOrders/rollbackOrder/$id"(parseRequest: true) { |
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.
Endpoint should be: /api/purchaseOrders/$id/rollback
and action should be called rollback
No description provided.