Skip to content

Commit

Permalink
Merge pull request #1692 from RodriSanchez1/fix/pasteSubfolders
Browse files Browse the repository at this point in the history
Fix / Paste subfolders
  • Loading branch information
RodriSanchez1 authored May 20, 2024
2 parents ab39070 + 5174a24 commit ea75804
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions src/components/Board/Board.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -1168,8 +1168,8 @@ export class BoardContainer extends Component {
)
.then(parentBoardId => {
if (createParentBoard) {
/* Here the parentBoardData is not updated with the values
that updatedApiObjects store on the API. Inside the boards are already updated
/* Here the parentBoardData is not updated with the values
that updatedApiObjects store on the API. Inside the boards are already updated
an the value is not replaced because the oldboard Id was replaced on the updateApiObjects inside createApiBoardSuccess */
replaceBoard(
{ ...parentBoardData },
Expand Down Expand Up @@ -1524,15 +1524,19 @@ export class BoardContainer extends Component {
}

//return condition
newBoard.tiles.forEach(async tile => {
for await (const tile of newBoard.tiles) {
if (tile && tile.loadBoard && !tile.linkedBoard) {
//look for this board in available boards
const newBoardToCopy = boards.find(b => b.id === tile.loadBoard);
if (newBoardToCopy) {
this.pasteBoardsRecursively(tile, newBoard.id, firstPastedFolderId);
await this.pasteBoardsRecursively(
tile,
newBoard.id,
firstPastedFolderId
);
}
}
});
}
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/translations/src/cboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -3881,4 +3881,4 @@
"symbol.descriptiveQuantity.different": "different",
"symbol.buildingContents.bathroom": "bathroom",
"symbol.descriptiveQuantity.categories": "categories"
}
}

0 comments on commit ea75804

Please sign in to comment.