From cbb4a1f27127f3df73d9bccde2ad2879f4256920 Mon Sep 17 00:00:00 2001 From: Artemida Date: Mon, 6 May 2024 20:03:56 +0200 Subject: [PATCH] BC-7165-Include tldraw to the quick links --- .../service/board-do-copy-service/recursive-copy.visitor.ts | 2 +- .../src/modules/copy-helper/service/copy-helper.service.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/server/src/modules/board/service/board-do-copy-service/recursive-copy.visitor.ts b/apps/server/src/modules/board/service/board-do-copy-service/recursive-copy.visitor.ts index f8c00f4fdbd..212e07cc292 100644 --- a/apps/server/src/modules/board/service/board-do-copy-service/recursive-copy.visitor.ts +++ b/apps/server/src/modules/board/service/board-do-copy-service/recursive-copy.visitor.ts @@ -148,7 +148,7 @@ export class RecursiveCopyVisitor implements BoardCompositeVisitorAsync { this.resultMap.set(original.id, { copyEntity: copy, type: CopyElementType.DRAWING_ELEMENT, - status: CopyStatusEnum.SUCCESS, + status: CopyStatusEnum.PARTIAL, }); this.copyMap.set(original.id, copy); diff --git a/apps/server/src/modules/copy-helper/service/copy-helper.service.ts b/apps/server/src/modules/copy-helper/service/copy-helper.service.ts index b3a42dac7df..3a578c2618b 100644 --- a/apps/server/src/modules/copy-helper/service/copy-helper.service.ts +++ b/apps/server/src/modules/copy-helper/service/copy-helper.service.ts @@ -8,6 +8,12 @@ const isAtLeastPartialSuccessfull = (status) => status === CopyStatusEnum.PARTIA @Injectable() export class CopyHelperService { deriveStatusFromElements(elements: CopyStatus[]): CopyStatusEnum { + for (const element of elements) { + if (element.elements?.length) { + element.status = this.deriveStatusFromElements(element.elements); + } + } + const elementsStatuses = elements.map((el) => el.status); const filtered = elementsStatuses.filter((status) => status !== CopyStatusEnum.NOT_DOING);