Skip to content

Commit

Permalink
Deploying to gh-pages from @ 49cdb0f 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinOehlerkingCap committed Jan 15, 2024
1 parent 6078ed7 commit 3869cf3
Show file tree
Hide file tree
Showing 121 changed files with 10,941 additions and 11,000 deletions.
40 changes: 14 additions & 26 deletions coverage.html
Original file line number Diff line number Diff line change
Expand Up @@ -4286,7 +4286,7 @@
<td>BoardDoRepo</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/11)</span>
<span class="coverage-count">(0/12)</span>
</td>
</tr>
<tr class="low">
Expand Down Expand Up @@ -4490,7 +4490,7 @@
<td>ContentElementService</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/8)</span>
<span class="coverage-count">(0/9)</span>
</td>
</tr>
<tr class="low">
Expand Down Expand Up @@ -13997,6 +13997,18 @@
<span class="coverage-count">(0/2)</span>
</td>
</tr>
<tr class="low">
<td>
<!-- miscellaneous -->
<a href="./injectables/CommonToolMetadataService.html">apps/server/src/modules/tool/common/service/common-tool-metadata.service.ts</a>
</td>
<td>injectable</td>
<td>CommonToolMetadataService</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/6)</span>
</td>
</tr>
<tr class="low">
<td>
<!-- miscellaneous -->
Expand Down Expand Up @@ -15209,18 +15221,6 @@
<span class="coverage-count">(0/1)</span>
</td>
</tr>
<tr class="low">
<td>
<!-- miscellaneous -->
<a href="./injectables/ExternalToolMetadataService.html">apps/server/src/modules/tool/external-tool/service/external-tool-metadata.service.ts</a>
</td>
<td>injectable</td>
<td>ExternalToolMetadataService</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/3)</span>
</td>
</tr>
<tr class="low">
<td>
<!-- miscellaneous -->
Expand Down Expand Up @@ -15569,18 +15569,6 @@
<span class="coverage-count">(0/2)</span>
</td>
</tr>
<tr class="low">
<td>
<!-- miscellaneous -->
<a href="./injectables/SchoolExternalToolMetadataService.html">apps/server/src/modules/tool/school-external-tool/service/school-external-tool-metadata.service.ts</a>
</td>
<td>injectable</td>
<td>SchoolExternalToolMetadataService</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/3)</span>
</td>
</tr>
<tr class="low">
<td>
<!-- miscellaneous -->
Expand Down
6,712 changes: 3,344 additions & 3,368 deletions graph/dependencies.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
129 changes: 109 additions & 20 deletions injectables/BoardDoRepo.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ <h6><b>Methods</b></h6>
<tr>
<td class="col-md-4">
<ul class="index-list">
<li>
<span class="modifier">Async</span>
<a href="#countBoardUsageForExternalTools" >countBoardUsageForExternalTools</a>
</li>
<li>
<span class="modifier">Async</span>
<a href="#delete" >delete</a>
Expand Down Expand Up @@ -201,7 +205,7 @@ <h3 id="constructor">Constructor</h3>
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="13" class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:13</a></div>
<div class="io-line">Defined in <a href="" data-line="14" class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:14</a></div>
</td>
</tr>

Expand Down Expand Up @@ -268,6 +272,75 @@ <h3 id="constructor">Constructor</h3>
<h3 id="methods">
Methods
</h3>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="countBoardUsageForExternalTools"></a>
<span class="name">
<span class="modifier">Async</span>
<span ><b>countBoardUsageForExternalTools</b></span>
<a href="#countBoardUsageForExternalTools"><span class="icon ion-ios-link"></span></a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<span class="modifier-icon icon ion-ios-reset"></span>
<code>countBoardUsageForExternalTools(contextExternalTools: ContextExternalTool[])</code>
</td>
</tr>


<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="85"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:85</a></div>
</td>
</tr>


<tr>
<td class="col-md-4">

<div class="io-description">
<b>Parameters :</b>

<table class="params">
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td>Optional</td>
</tr>
</thead>
<tbody>
<tr>
<td>contextExternalTools</td>
<td>
<code>ContextExternalTool[]</code>
</td>

<td>
No
</td>


</tr>
</tbody>
</table>
</div>
<div class="io-description">
<b>Returns : </b> <code>unknown</code>

</div>
<div class="io-description">

</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-sm table-bordered">
<tbody>
<tr>
Expand All @@ -290,8 +363,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="95"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:95</a></div>
<div class="io-line">Defined in <a href="" data-line="111"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:111</a></div>
</td>
</tr>

Expand Down Expand Up @@ -359,8 +432,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="28"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:28</a></div>
<div class="io-line">Defined in <a href="" data-line="29"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:29</a></div>
</td>
</tr>

Expand Down Expand Up @@ -461,8 +534,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="20"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:20</a></div>
<div class="io-line">Defined in <a href="" data-line="21"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:21</a></div>
</td>
</tr>

Expand Down Expand Up @@ -542,8 +615,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="41"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:41</a></div>
<div class="io-line">Defined in <a href="" data-line="42"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:42</a></div>
</td>
</tr>

Expand Down Expand Up @@ -611,8 +684,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="67"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:67</a></div>
<div class="io-line">Defined in <a href="" data-line="68"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:68</a></div>
</td>
</tr>

Expand Down Expand Up @@ -680,8 +753,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="77"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:77</a></div>
<div class="io-line">Defined in <a href="" data-line="78"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:78</a></div>
</td>
</tr>

Expand Down Expand Up @@ -749,8 +822,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="84"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:84</a></div>
<div class="io-line">Defined in <a href="" data-line="100"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:100</a></div>
</td>
</tr>

Expand Down Expand Up @@ -818,8 +891,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="55"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:55</a></div>
<div class="io-line">Defined in <a href="" data-line="56"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:56</a></div>
</td>
</tr>

Expand Down Expand Up @@ -887,8 +960,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="89"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:89</a></div>
<div class="io-line">Defined in <a href="" data-line="105"
class="link-to-prism">apps/server/src/modules/board/repo/board-do.repo.ts:105</a></div>
</td>
</tr>

Expand Down Expand Up @@ -954,9 +1027,10 @@ <h3 id="methods">
<div class="tab-pane fade tab-source-code" id="source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Utils } from &#x27;@mikro-orm/core&#x27;;
import { EntityManager, ObjectId } from &#x27;@mikro-orm/mongodb&#x27;;
import type { ContextExternalTool } from &#x27;@modules/tool/context-external-tool/domain&#x27;;
import { Injectable, NotFoundException } from &#x27;@nestjs/common&#x27;;
import { AnyBoardDo, BoardExternalReference } from &#x27;@shared/domain/domainobject&#x27;;
import { BoardNode, ColumnBoardNode } from &#x27;@shared/domain/entity&#x27;;
import { BoardNode, ColumnBoardNode, ExternalToolElementNodeEntity } from &#x27;@shared/domain/entity&#x27;;
import { EntityId } from &#x27;@shared/domain/types&#x27;;
import { BoardDoBuilderImpl } from &#x27;./board-do.builder-impl&#x27;;
import { BoardNodeRepo } from &#x27;./board-node.repo&#x27;;
Expand Down Expand Up @@ -1035,6 +1109,21 @@ <h3 id="methods">
return domainObject;
}

async countBoardUsageForExternalTools(contextExternalTools: ContextExternalTool[]) {
const toolIds: EntityId[] &#x3D; contextExternalTools
.map((tool: ContextExternalTool): EntityId | undefined &#x3D;&gt; tool.id)
.filter((id: EntityId | undefined): id is EntityId &#x3D;&gt; !!id);

const boardNodes: ExternalToolElementNodeEntity[] &#x3D; await this.em.find(ExternalToolElementNodeEntity, {
contextExternalTool: { $in: toolIds },
});

const boardIds: EntityId[] &#x3D; boardNodes.map((node: ExternalToolElementNodeEntity): EntityId &#x3D;&gt; node.ancestorIds[0]);
const boardCount: number &#x3D; new Set(boardIds).size;

return boardCount;
}

async getAncestorIds(boardDo: AnyBoardDo): Promise&lt;EntityId[]&gt; {
const boardNode &#x3D; await this.boardNodeRepo.findById(boardDo.id);
return boardNode.ancestorIds;
Expand Down
Loading

0 comments on commit 3869cf3

Please sign in to comment.