Fixed disappearing cards on production board.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user