-
-
Save 14paxton/8d0b6b33f2023fa2dff3fdd51364f8db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closure createBlockedOrHiddenMap = { Map groupedResults -> | |
Map blockedResults = [:] | |
if (groupedResults?.blockedOrHidden) { | |
Map mapBlockedOrHidden = groupedResults?.blockedOrHidden?.groupBy { it?.blockedOrHidden?.orderBlocked ? 'orderBlocked' : 'resultHidden' } | |
blockedResults = [*: mapBlockedOrHidden, 'blockedOrHiddenIds': [*mapBlockedOrHidden?.orderBlocked*.id, *mapBlockedOrHidden?.resultHidden*.id].findAll()] | |
} | |
return [*: blockedResults, "viewable": [*groupedResults?.viewable]] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment