[TLC-674] Duplicate detection comp, template, i18n

Duplicate data is accessed in the submission section,
pooled tasks list and claimed tasks list.
This commit is contained in:
Kim Shepherd
2023-12-19 14:47:27 +13:00
parent 061129ecb7
commit b672668e15
13 changed files with 266 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
<!--
Template for the detect duplicates submission section component
@author Kim Shepherd
-->
<div class="text-sm-left" *ngVar="(this.data$ | async) as data">
<ng-container *ngIf="data.potentialDuplicates.length == 0">
<p>{{ 'submission.sections.duplicates.none' }}</p>
</ng-container>
<ng-container *ngIf="data.potentialDuplicates.length > 0">
<p>{{ 'submission.sections.duplicates.detected' | translate }}</p>
<div *ngFor="let dupe of data.potentialDuplicates" class="ds-duplicate">
<a target="_blank" [href]="'/items/'+dupe.uuid">{{dupe.title}}</a>
<div *ngFor="let metadatum of Metadata.toViewModelList(dupe.metadata)">
{{('item.preview.' + metadatum.key) | translate}} {{metadatum.value}}
</div>
<p *ngIf="dupe.workspaceItemId">{{ 'submission.sections.duplicates.in-workspace' | translate }}</p>
<p *ngIf="dupe.workflowItemId">{{ 'submission.sections.duplicates.in-workflow' | translate }}</p>
</div>
</ng-container>
</div>