RED-3800 rss editing
This commit is contained in:
parent
b5520473da
commit
e7eb80548d
@ -21,7 +21,7 @@
|
|||||||
</strong>
|
</strong>
|
||||||
{{ annotation.entity.label }}
|
{{ annotation.entity.label }}
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="annotation.shortContent && !annotation.isHint">
|
<div *ngIf="annotation.shortContent && !annotation.isHint && !iqserPermissionsService.has(roles.getRss)">
|
||||||
<strong><span translate="content"></span>: </strong>{{ annotation.shortContent }}
|
<strong><span translate="content"></span>: </strong>{{ annotation.shortContent }}
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="annotation.isEarmark">
|
<div *ngIf="annotation.isEarmark">
|
||||||
|
|||||||
@ -2,6 +2,8 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|||||||
import { AnnotationWrapper } from '@models/file/annotation.wrapper';
|
import { AnnotationWrapper } from '@models/file/annotation.wrapper';
|
||||||
import { MultiSelectService } from '../../services/multi-select.service';
|
import { MultiSelectService } from '../../services/multi-select.service';
|
||||||
import { annotationTypesTranslations } from '@translations/annotation-types-translations';
|
import { annotationTypesTranslations } from '@translations/annotation-types-translations';
|
||||||
|
import { ROLES } from '@users/roles';
|
||||||
|
import { IqserPermissionsService } from '@iqser/common-ui';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'redaction-annotation-card',
|
selector: 'redaction-annotation-card',
|
||||||
@ -10,9 +12,10 @@ import { annotationTypesTranslations } from '@translations/annotation-types-tran
|
|||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class AnnotationCardComponent {
|
export class AnnotationCardComponent {
|
||||||
|
readonly roles = ROLES;
|
||||||
annotationTypesTranslations = annotationTypesTranslations;
|
annotationTypesTranslations = annotationTypesTranslations;
|
||||||
@Input() annotation: AnnotationWrapper;
|
@Input() annotation: AnnotationWrapper;
|
||||||
@Input() isSelected = false;
|
@Input() isSelected = false;
|
||||||
|
|
||||||
constructor(readonly multiSelectService: MultiSelectService) {}
|
constructor(readonly iqserPermissionsService: IqserPermissionsService, readonly multiSelectService: MultiSelectService) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,12 +46,12 @@
|
|||||||
[value]="dictionary.type"
|
[value]="dictionary.type"
|
||||||
matTooltipPosition="after"
|
matTooltipPosition="after"
|
||||||
>
|
>
|
||||||
<span> {{ dictionary.label }} {{ dictionary.hasDictionary }} </span>
|
<span> {{ dictionary.label }} </span>
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="!isDictionaryRequest" class="iqser-input-group required w-450">
|
<div *ngIf="!isDictionaryRequest && !iqserPermissionsService.has(roles.getRss)" class="iqser-input-group required w-450">
|
||||||
<label translate="manual-annotation.dialog.content.reason"></label>
|
<label translate="manual-annotation.dialog.content.reason"></label>
|
||||||
<mat-select
|
<mat-select
|
||||||
[placeholder]="'manual-annotation.dialog.content.reason-placeholder' | translate"
|
[placeholder]="'manual-annotation.dialog.content.reason-placeholder' | translate"
|
||||||
@ -69,7 +69,7 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="!isDictionaryRequest" class="iqser-input-group w-450">
|
<div *ngIf="!isDictionaryRequest && !iqserPermissionsService.has(roles.getRss)" class="iqser-input-group w-450">
|
||||||
<label translate="manual-annotation.dialog.content.legalBasis"></label>
|
<label translate="manual-annotation.dialog.content.legalBasis"></label>
|
||||||
<input [value]="form.get('reason').value?.legalBasis" disabled type="text" />
|
<input [value]="form.get('reason').value?.legalBasis" disabled type="text" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -23,6 +23,7 @@ export interface LegalBasisOption {
|
|||||||
styleUrls: ['./manual-annotation-dialog.component.scss'],
|
styleUrls: ['./manual-annotation-dialog.component.scss'],
|
||||||
})
|
})
|
||||||
export class ManualAnnotationDialogComponent extends BaseDialogComponent implements OnInit {
|
export class ManualAnnotationDialogComponent extends BaseDialogComponent implements OnInit {
|
||||||
|
readonly roles = ROLES;
|
||||||
readonly circleButtonTypes = CircleButtonTypes;
|
readonly circleButtonTypes = CircleButtonTypes;
|
||||||
isDictionaryRequest: boolean;
|
isDictionaryRequest: boolean;
|
||||||
isFalsePositiveRequest: boolean;
|
isFalsePositiveRequest: boolean;
|
||||||
@ -36,7 +37,7 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme
|
|||||||
private readonly _dossier: Dossier;
|
private readonly _dossier: Dossier;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly _iqserPermissionsService: IqserPermissionsService,
|
readonly iqserPermissionsService: IqserPermissionsService,
|
||||||
private readonly _justificationsService: JustificationsService,
|
private readonly _justificationsService: JustificationsService,
|
||||||
private readonly _manualRedactionService: ManualRedactionService,
|
private readonly _manualRedactionService: ManualRedactionService,
|
||||||
activeDossiersService: ActiveDossiersService,
|
activeDossiersService: ActiveDossiersService,
|
||||||
@ -171,7 +172,7 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme
|
|||||||
addRedactionRequest.legalBasis = legalOption.legalBasis;
|
addRedactionRequest.legalBasis = legalOption.legalBasis;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._iqserPermissionsService.has(ROLES.getRss)) {
|
if (this.iqserPermissionsService.has(ROLES.getRss)) {
|
||||||
const selectedType = this.possibleDictionaries.find(d => d.type === addRedactionRequest.type);
|
const selectedType = this.possibleDictionaries.find(d => d.type === addRedactionRequest.type);
|
||||||
console.log(selectedType.hasDictionary);
|
console.log(selectedType.hasDictionary);
|
||||||
addRedactionRequest.addToDictionary = selectedType.hasDictionary;
|
addRedactionRequest.addToDictionary = selectedType.hasDictionary;
|
||||||
|
|||||||
@ -7,16 +7,7 @@
|
|||||||
<div class="table-header">Component</div>
|
<div class="table-header">Component</div>
|
||||||
<div class="table-header">Value</div>
|
<div class="table-header">Value</div>
|
||||||
<div class="table-header">Transformation</div>
|
<div class="table-header">Transformation</div>
|
||||||
<div class="table-header">
|
<div class="table-header">Annotations</div>
|
||||||
Annotations
|
|
||||||
<hr />
|
|
||||||
<div class="annotation-grid">
|
|
||||||
<div>Type</div>
|
|
||||||
<div>Rule</div>
|
|
||||||
<div>Pages</div>
|
|
||||||
<div>Reason</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ng-container *ngFor="let entry of rssEntry.result | keyvalue: originalOrder">
|
<ng-container *ngFor="let entry of rssEntry.result | keyvalue: originalOrder">
|
||||||
<div class="bold">{{ entry.key }}</div>
|
<div class="bold">{{ entry.key }}</div>
|
||||||
@ -34,7 +25,7 @@
|
|||||||
(action)="undo(entry)"
|
(action)="undo(entry)"
|
||||||
*ngIf="entry.value.value"
|
*ngIf="entry.value.value"
|
||||||
[showDot]="true"
|
[showDot]="true"
|
||||||
[tooltip]="'rss-dialog.actions.undo' | translate"
|
[tooltip]="'rss-dialog.actions.undo' | translate: { value: entry.value.originalValue }"
|
||||||
[type]="iconButtonTypes.dark"
|
[type]="iconButtonTypes.dark"
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
icon="red:undo"
|
icon="red:undo"
|
||||||
@ -46,10 +37,20 @@
|
|||||||
<!-- <div>{{ entry.value.scmAnnotations || '-' }}</div>-->
|
<!-- <div>{{ entry.value.scmAnnotations || '-' }}</div>-->
|
||||||
<div>
|
<div>
|
||||||
<ul *ngIf="entry.value.scmAnnotations; else noAnnotations" class="pl-0">
|
<ul *ngIf="entry.value.scmAnnotations; else noAnnotations" class="pl-0">
|
||||||
<li *ngFor="let annotation of entry.value.scmAnnotations" class="mb-8">
|
<li
|
||||||
<strong>Type: </strong> {{ annotation.type }}, <strong>Rule: </strong> {{ annotation.ruleNumber }},
|
*ngFor="let annotation of entry.value.scmAnnotations"
|
||||||
<strong>Pages: </strong>{{ annotation.pages.join(',') }}, <strong>Reason: </strong> {{ annotation.reason }}
|
class="mb-8"
|
||||||
</li>
|
[innerHTML]="
|
||||||
|
'rss-dialog.annotations'
|
||||||
|
| translate
|
||||||
|
: {
|
||||||
|
ruleNumber: annotation.ruleNumber,
|
||||||
|
pageCount: annotation.pages.length,
|
||||||
|
pages: annotation.pages.join(','),
|
||||||
|
type: annotation.type
|
||||||
|
}
|
||||||
|
"
|
||||||
|
></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ng-template #noAnnotations>-</ng-template>
|
<ng-template #noAnnotations>-</ng-template>
|
||||||
|
|||||||
@ -52,3 +52,14 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 3fr 1fr 1fr 5fr;
|
grid-template-columns: 3fr 1fr 1fr 5fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.output-data > div:nth-child(8n + 9),
|
||||||
|
.output-data > div:nth-child(8n + 10),
|
||||||
|
.output-data > div:nth-child(8n + 11),
|
||||||
|
.output-data > div:nth-child(8n + 12) {
|
||||||
|
background: var(--iqser-grey-8);
|
||||||
|
}
|
||||||
|
|||||||
@ -1959,8 +1959,9 @@
|
|||||||
"export-json": "Export JSON",
|
"export-json": "Export JSON",
|
||||||
"export-xml": "Export XML",
|
"export-xml": "Export XML",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"undo": "Undo"
|
"undo": "Undo to: {value}"
|
||||||
},
|
},
|
||||||
|
"annotations": "<strong>{type}</strong> found on {pageCount, plural, one{page} other{pages}} {pages} by rule #{ruleNumber}",
|
||||||
"title": "Structured Component Management"
|
"title": "Structured Component Management"
|
||||||
},
|
},
|
||||||
"rules-screen": {
|
"rules-screen": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user