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