Added production level statuses for shop page and updated production board to filter accordingly BOD-4

This commit is contained in:
Patrick Fic
2020-06-24 14:21:17 -07:00
parent dab34aef49
commit db08be58ac
12 changed files with 154 additions and 58 deletions

View File

@@ -25,6 +25,16 @@ const sortByParentId = (arr) => {
if (byParentsIdsList["null"])
byParentsIdsList["null"].map((i) => sortedList.push(i));
//Validate that the 2 arrays are of the same length and no children are missing.
if (arr.length !== sortedList.length) {
arr.map((origItem) => {
if (!!!sortedList.find((s) => s.id === origItem.id)) {
sortedList.push(origItem);
console.log("DATA CONSISTENCY ERROR: ", origItem.ro_number);
}
});
}
return sortedList;
};