Skip to content

Commit

Permalink
hide WEBUI_M_HU_Pick process if there are no eligible HU rows
Browse files Browse the repository at this point in the history
NOTE: we decided to hide this action when there is not available,
because we want to cover the requirements of
#683,
were we need to hide the action for source HU lines... and does not
worth the effort to handle particularly that case.

#683
  • Loading branch information
teosarca committed Nov 21, 2017
1 parent f2207f9 commit 56a4635
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ protected ProcessPreconditionsResolution checkPreconditionsApplicable()
final ImmutableList<HURow> firstRows = streamHURows().limit(2).collect(ImmutableList.toImmutableList());
if (firstRows.isEmpty())
{
return ProcessPreconditionsResolution.reject(msgBL.getTranslatableMsgText(WEBUI_M_HU_Messages.MSG_WEBUI_ONLY_TOP_LEVEL_HU));
// NOTE: we decided to hide this action when there is not available,
// because we want to cover the requirements of https://github.com/metasfresh/metasfresh-webui-api/issues/683,
// were we need to hide the action for source HU lines... and does not worth the effort to handle particularly that case.
return ProcessPreconditionsResolution.rejectWithInternalReason("no eligible HU rows found");
// return ProcessPreconditionsResolution.reject(msgBL.getTranslatableMsgText(WEBUI_M_HU_Messages.MSG_WEBUI_ONLY_TOP_LEVEL_HU));
}

if (firstRows.size() != 1)
Expand Down Expand Up @@ -188,13 +192,13 @@ private static final HURow toHURowOrNull(final IViewRow row)
else if (row instanceof PPOrderLineRow)
{
final PPOrderLineRow ppOrderLineRow = PPOrderLineRow.cast(row);

// this process does not apply to source HUs
if(ppOrderLineRow.isSourceHU())
if (ppOrderLineRow.isSourceHU())
{
return null;
}

if (!ppOrderLineRow.getType().isHUOrHUStorage())
{
return null;
Expand Down

0 comments on commit 56a4635

Please sign in to comment.