RED-7069, replace buttons. RED-7279, change notification texts.

This commit is contained in:
George 2023-07-28 14:02:26 +03:00
parent 3be3a6bff7
commit 96760a850c
10 changed files with 50 additions and 33 deletions

View File

@ -35,9 +35,9 @@
<iqser-circle-button
(action)="annotationActionsService.editRedaction(annotations)"
*ngIf="annotationPermissions.canChangeLegalBasis"
*ngIf="annotationPermissions.canChangeLegalBasis || annotationPermissions.canRecategorizeImage"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.edit-reason.label' | translate"
[tooltip]="'annotation-actions.edit-redaction.label' | translate"
[type]="buttonType"
icon="iqser:edit"
></iqser-circle-button>
@ -87,14 +87,14 @@
icon="red:undo"
></iqser-circle-button>
<iqser-circle-button
(action)="annotationActionsService.recategorizeImages(annotations)"
*ngIf="annotationPermissions.canRecategorizeImage"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.recategorize-image' | translate"
[type]="buttonType"
icon="red:thumb-down"
></iqser-circle-button>
<!-- <iqser-circle-button-->
<!-- (action)="annotationActionsService.recategorizeImages(annotations)"-->
<!-- *ngIf="annotationPermissions.canRecategorizeImage"-->
<!-- [tooltipPosition]="tooltipPosition"-->
<!-- [tooltip]="'annotation-actions.recategorize-image' | translate"-->
<!-- [type]="buttonType"-->
<!-- icon="red:thumb-down"-->
<!-- ></iqser-circle-button>-->
<iqser-circle-button
(action)="annotationReferencesService.show(annotations[0])"

View File

@ -83,7 +83,7 @@ export class ManualRedactionService extends GenericService<IManualAddResponse> {
}
recategorizeRedactions(body: List<IRecategorizationRequest>, dossierId: string, fileId: string) {
return this.recategorize(body, dossierId, fileId).pipe(this.#showToast('recategorize-image'));
return this.recategorize(body, dossierId, fileId).pipe(this.#showToast('change-type'));
}
addAnnotation(

View File

@ -51,19 +51,19 @@ export class PdfAnnotationActionsService {
availableActions.push(resizeButton);
}
if (permissions.canChangeLegalBasis) {
const editButton = this.#getButton('edit', _('annotation-actions.edit-reason.label'), () =>
if (permissions.canChangeLegalBasis || permissions.canRecategorizeImage) {
const editButton = this.#getButton('edit', _('annotation-actions.edit-redaction.label'), () =>
this.#annotationActionsService.editRedaction(annotations),
);
availableActions.push(editButton);
}
if (permissions.canRecategorizeImage) {
const recategorizeButton = this.#getButton('thumb-down', _('annotation-actions.recategorize-image'), () =>
this.#annotationActionsService.editRedaction(annotations),
);
availableActions.push(recategorizeButton);
}
// if (permissions.canRecategorizeImage) {
// const recategorizeButton = this.#getButton('thumb-down', _('annotation-actions.recategorize-image'), () =>
// this.#annotationActionsService.editRedaction(annotations),
// );
// availableActions.push(recategorizeButton);
// }
if (permissions.canAcceptRecommendation) {
const acceptRecommendationButton = this.#getButton('check', _('annotation-actions.accept-recommendation.label'), () =>

View File

@ -68,6 +68,10 @@ export const manualRedactionActionsTranslations: Record<ManualRedactionActions,
error: _('annotation-actions.message.manual-redaction.recategorize-image.error'),
success: _('annotation-actions.message.manual-redaction.recategorize-image.success'),
},
'change-type': {
error: _('annotation-actions.message.manual-redaction.change-type.error'),
success: _('annotation-actions.message.manual-redaction.change-type.success'),
},
'request-change-legal-basis': {
error: _('annotation-actions.message.manual-redaction.request-change-legal-basis.error'),
success: _('annotation-actions.message.manual-redaction.request-change-legal-basis.success'),

View File

@ -256,8 +256,8 @@
"convert-highlights": {
"label": ""
},
"edit-reason": {
"label": "Begründung bearbeiten"
"edit-redaction": {
"label": ""
},
"force-hint": {
"label": "Hinweis erzwingen"
@ -311,6 +311,10 @@
"error": "Fehler beim Bearbeiten der in der Anmerkung genannten Begründung: {error}",
"success": "In der Anmerkung genannte Begründung wurde bearbeitet."
},
"change-type": {
"error": "",
"success": ""
},
"decline": {
"error": "Fehler beim Ablehnen des Vorschlags: {error}",
"success": "Vorschlag abgelehnt"
@ -369,7 +373,6 @@
}
}
},
"recategorize-image": "neu kategorisieren",
"remove-annotation": {
"remove-redaction": ""
},

View File

@ -256,8 +256,8 @@
"convert-highlights": {
"label": "Convert Selected Earmarks"
},
"edit-reason": {
"label": "Edit Reason"
"edit-redaction": {
"label": "Edit"
},
"force-hint": {
"label": "Force Hint"
@ -311,6 +311,10 @@
"error": "Failed to edit annotation reason: {error}",
"success": "Annotation reason was edited."
},
"change-type": {
"error": "Failed to edit type: {error}",
"success": "Type was edited."
},
"decline": {
"error": "Failed to decline suggestion: {error}",
"success": "Suggestion declined."
@ -369,7 +373,6 @@
}
}
},
"recategorize-image": "Recategorize",
"remove-annotation": {
"remove-redaction": "Remove"
},

View File

@ -256,8 +256,8 @@
"convert-highlights": {
"label": ""
},
"edit-reason": {
"label": "Begründung bearbeiten"
"edit-redaction": {
"label": ""
},
"force-hint": {
"label": "Hinweis erzwingen"
@ -311,6 +311,10 @@
"error": "Fehler beim Bearbeiten der in der Anmerkung genannten Begründung: {error}",
"success": "In der Anmerkung genannte Begründung wurde bearbeitet."
},
"change-type": {
"error": "",
"success": ""
},
"decline": {
"error": "Fehler beim Ablehnen des Vorschlags: {error}",
"success": "Vorschlag abgelehnt"
@ -369,7 +373,6 @@
}
}
},
"recategorize-image": "neu kategorisieren",
"remove-annotation": {
"remove-redaction": ""
},

View File

@ -256,8 +256,8 @@
"convert-highlights": {
"label": "Convert Selected Earmarks"
},
"edit-reason": {
"label": "Edit Reason"
"edit-redaction": {
"label": "Edit"
},
"force-hint": {
"label": "Force Hint"
@ -311,6 +311,10 @@
"error": "Failed to edit annotation reason: {error}",
"success": "Annotation reason was edited."
},
"change-type": {
"error": "",
"success": ""
},
"decline": {
"error": "Failed to decline suggestion: {error}",
"success": "Suggestion declined."
@ -369,7 +373,6 @@
}
}
},
"recategorize-image": "Recategorize",
"remove-annotation": {
"remove-redaction": "Remove"
},

@ -1 +1 @@
Subproject commit bbd0cef55bfa159070d8b01c7a54961fbe227989
Subproject commit 28badd45cd6494dec9ab8c1368129cf8589aba42

View File

@ -19,7 +19,8 @@ export type ManualRedactionActions =
| 'force-redaction'
| 'force-hint'
| 'request-force-redaction'
| 'request-force-hint';
| 'request-force-hint'
| 'change-type';
export const AnnotationIconTypes = {
square: 'square',