Created
March 3, 2017 21:53
-
-
Save dbarjs/91cd9af7eb599ff43a2b2ba7a83fb670 to your computer and use it in GitHub Desktop.
Filtro para mostrar pedidos não retirados
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
// filtro para mostrar todos pedidos com ingressos no retirados | |
// este filtro só exibe pedidos aprovados e com pelo menos um item de ingresso | |
var notShippedList = list.filter(function(item) { | |
if (item.ticketList.list.length > 0 && item.status == 'Aprovada') { | |
for (var i = item.ticketList.list.length; i--; ) { | |
if (!item.ticketList.list[i].shipping) | |
return item.clientName; | |
} | |
} | |
}); | |
for (var i = notShippedList.length; i--; ) | |
console.log(notShippedList[i].clientName); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment