RED-4572: change dialog header when accepting a recommendation
This commit is contained in:
parent
5a9216ce83
commit
b6896a9317
@ -1,6 +1,6 @@
|
|||||||
<section class="dialog">
|
<section class="dialog">
|
||||||
<form (submit)="save()" [formGroup]="form">
|
<form (submit)="save()" [formGroup]="form">
|
||||||
<div [translate]="'accept-recommendation-dialog.header'" class="dialog-header heading-l"></div>
|
<div [translate]="dialogHeader" class="dialog-header heading-l"></div>
|
||||||
|
|
||||||
<div class="dialog-content">
|
<div class="dialog-content">
|
||||||
<div class="iqser-input-group">
|
<div class="iqser-input-group">
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import { ActiveDossiersService } from '@services/dossiers/active-dossiers.servic
|
|||||||
import { BaseDialogComponent } from '@iqser/common-ui';
|
import { BaseDialogComponent } from '@iqser/common-ui';
|
||||||
import { DictionaryService } from '@services/entity-services/dictionary.service';
|
import { DictionaryService } from '@services/entity-services/dictionary.service';
|
||||||
import { AnnotationWrapper } from '@models/file/annotation.wrapper';
|
import { AnnotationWrapper } from '@models/file/annotation.wrapper';
|
||||||
|
import { acceptRecommendationTranslations } from '@translations/accept-recommendation-translations';
|
||||||
|
|
||||||
export interface AcceptRecommendationData {
|
export interface AcceptRecommendationData {
|
||||||
readonly annotations: AnnotationWrapper[];
|
readonly annotations: AnnotationWrapper[];
|
||||||
@ -22,7 +23,7 @@ export interface AcceptRecommendationReturnType {
|
|||||||
templateUrl: './accept-recommendation-dialog.component.html',
|
templateUrl: './accept-recommendation-dialog.component.html',
|
||||||
})
|
})
|
||||||
export class AcceptRecommendationDialogComponent extends BaseDialogComponent implements OnInit {
|
export class AcceptRecommendationDialogComponent extends BaseDialogComponent implements OnInit {
|
||||||
isDocumentAdmin: boolean;
|
readonly dialogHeader: string;
|
||||||
|
|
||||||
possibleDictionaries: Dictionary[] = [];
|
possibleDictionaries: Dictionary[] = [];
|
||||||
|
|
||||||
@ -37,7 +38,10 @@ export class AcceptRecommendationDialogComponent extends BaseDialogComponent imp
|
|||||||
) {
|
) {
|
||||||
super(_dialogRef);
|
super(_dialogRef);
|
||||||
this._dossier = activeDossiersService.find(this.data.dossierId);
|
this._dossier = activeDossiersService.find(this.data.dossierId);
|
||||||
this.isDocumentAdmin = permissionsService.isApprover(this._dossier);
|
const isDocumentAdmin = permissionsService.isApprover(this._dossier);
|
||||||
|
this.dialogHeader = isDocumentAdmin
|
||||||
|
? acceptRecommendationTranslations.addToDictionary
|
||||||
|
: acceptRecommendationTranslations.requestAddToDictionary;
|
||||||
this.form = this._getForm();
|
this.form = this._getForm();
|
||||||
this.initialFormValue = this.form.getRawValue();
|
this.initialFormValue = this.form.getRawValue();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||||
|
|
||||||
|
export const acceptRecommendationTranslations = {
|
||||||
|
addToDictionary: _('accept-recommendation-dialog.header.add-to-dictionary'),
|
||||||
|
requestAddToDictionary: _('accept-recommendation-dialog.header.request-add-to-dictionary'),
|
||||||
|
};
|
||||||
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"accept-recommendation-dialog": {
|
"accept-recommendation-dialog": {
|
||||||
"header": "",
|
"header": {
|
||||||
|
"add-to-dictionary": "",
|
||||||
|
"request-add-to-dictionary": ""
|
||||||
|
},
|
||||||
"multiple-values": ""
|
"multiple-values": ""
|
||||||
},
|
},
|
||||||
"account-settings": "Account Einstellungen",
|
"account-settings": "Account Einstellungen",
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"accept-recommendation-dialog": {
|
"accept-recommendation-dialog": {
|
||||||
"header": "Accept recommendation",
|
"header": {
|
||||||
|
"add-to-dictionary": "Add to dictionary",
|
||||||
|
"request-add-to-dictionary": "Request add to dictionary"
|
||||||
|
},
|
||||||
"multiple-values": "Multiple recommendations selected"
|
"multiple-values": "Multiple recommendations selected"
|
||||||
},
|
},
|
||||||
"account-settings": "Account Settings",
|
"account-settings": "Account Settings",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user