Skip to content

Commit

Permalink
HTML-849 - Order widget incorrectly replaces RENEW with EDIT action
Browse files Browse the repository at this point in the history
  • Loading branch information
mseaton committed Jan 23, 2025
1 parent 3f5450a commit fb02ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion omod/src/main/webapp/resources/orderWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
var idSuffix = '_' + orderWidget.nextActionButtonIndex();

var orderInCurrentEncounter = orderWidget.isOrderInCurrentEncounter(order, config);
var isVoidAndEdit = orderInCurrentEncounter && (action === 'REVISE' && ['NEW','REVISE'].includes(order.action.value)) || (action === 'RENEW' && order.action.value === 'RENEW');
var isVoidAndEdit = orderInCurrentEncounter && ((action === 'REVISE' && ['NEW','REVISE'].includes(order.action.value)) || (action === 'RENEW' && order.action.value === 'RENEW'));
var isVoid = (orderInCurrentEncounter && action === 'DISCONTINUE');

var actionLabel = isVoidAndEdit ? config.translations.editOrder : isVoid ? config.translations.deleteOrder : $actionOption.html();
Expand Down

0 comments on commit fb02ef0

Please sign in to comment.