Fixed disappearing cards on production board.

This commit is contained in:
Patrick Fic
2020-06-19 15:42:56 -07:00
parent 5cf3b26bb3
commit 8399d03081
3 changed files with 46 additions and 23 deletions

View File

@@ -15,7 +15,7 @@ const sortByParentId = (arr) => {
var parentId = "-1";
var sortedList = [];
var byParentsIdsList = _.groupBy(arr, "kanbanparent"); // Create a new array with objects indexed by parentId
console.log("sortByParentId -> byParentsIdsList", byParentsIdsList);
//console.log("sortByParentId -> byParentsIdsList", byParentsIdsList);
while (byParentsIdsList[parentId]) {
sortedList.push(byParentsIdsList[parentId][0]);
@@ -24,7 +24,7 @@ const sortByParentId = (arr) => {
if (byParentsIdsList["null"])
byParentsIdsList["null"].map((i) => sortedList.push(i));
return sortedList;
};
@@ -45,6 +45,7 @@ export const createBoardData = (AllStatuses, Jobs) => {
boardLanes.columns.find(
(l) => l.id === statusGroupKey
).cards = sortByParentId(DataGroupedByStatus[statusGroupKey]);
return null;
});
return boardLanes;