Merge branch 'RED-8375' into 'master'
Resolve RED-8375 Closes RED-8375 See merge request redactmanager/red-ui!279
This commit is contained in:
commit
c299188720
@ -5,7 +5,6 @@ import { DetailsRadioOption, IconButtonTypes, IqserDialogComponent, IqserPermiss
|
||||
import { Dictionary, Dossier, IAddRedactionRequest } from '@red/domain';
|
||||
import { ActiveDossiersService } from '@services/dossiers/active-dossiers.service';
|
||||
import { DictionaryService } from '@services/entity-services/dictionary.service';
|
||||
import { JustificationsService } from '@services/entity-services/justifications.service';
|
||||
import { Roles } from '@users/roles';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { getRedactOrHintOptions, RedactOrHintOption, RedactOrHintOptions } from '../../utils/dialog-options';
|
||||
@ -27,7 +26,6 @@ export class AddHintDialogComponent extends IqserDialogComponent<AddHintDialogCo
|
||||
form!: UntypedFormGroup;
|
||||
|
||||
constructor(
|
||||
private readonly _justificationsService: JustificationsService,
|
||||
private readonly _activeDossiersService: ActiveDossiersService,
|
||||
private readonly _dictionaryService: DictionaryService,
|
||||
private readonly _iqserPermissionsService: IqserPermissionsService,
|
||||
@ -36,7 +34,15 @@ export class AddHintDialogComponent extends IqserDialogComponent<AddHintDialogCo
|
||||
super();
|
||||
this.#dossier = _activeDossiersService.find(this.data.dossierId);
|
||||
this.#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
|
||||
this.options = getRedactOrHintOptions(this.#dossier, this.#applyToAllDossiers, this.data.isApprover, false, true, this.#isRss);
|
||||
this.options = getRedactOrHintOptions(
|
||||
this.#dossier,
|
||||
this.#applyToAllDossiers,
|
||||
this.data.isApprover,
|
||||
this.data.isPageExcluded,
|
||||
false,
|
||||
true,
|
||||
this.#isRss,
|
||||
);
|
||||
|
||||
this.form = this.#getForm();
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ export class RedactRecommendationDialogComponent
|
||||
private readonly _dictionaryService: DictionaryService,
|
||||
) {
|
||||
super();
|
||||
this.options = getRedactOrHintOptions(this.#dossier, this.#applyToAllDossiers, this.data.isApprover, true);
|
||||
this.options = getRedactOrHintOptions(this.#dossier, this.#applyToAllDossiers, this.data.isApprover, false, true);
|
||||
|
||||
this.form.controls.option.valueChanges
|
||||
.pipe(
|
||||
|
||||
@ -47,7 +47,7 @@ export class RedactTextDialogComponent
|
||||
) {
|
||||
super();
|
||||
|
||||
this.options = getRedactOrHintOptions(this.#dossier, this.#applyToAllDossiers, this.data.isApprover);
|
||||
this.options = getRedactOrHintOptions(this.#dossier, this.#applyToAllDossiers, this.data.isApprover, this.data.isPageExcluded);
|
||||
this.form = this.#getForm();
|
||||
|
||||
this.form.controls.option.valueChanges
|
||||
|
||||
@ -891,6 +891,7 @@ export class FilePreviewScreenComponent
|
||||
file,
|
||||
applyToAllDossiers: isApprover ? applyDictionaryUpdatesToAllDossiersByDefault : false,
|
||||
isApprover,
|
||||
isPageExcluded: this.state.file().isPageExcluded(this.pdf.currentPage()),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,6 +229,11 @@ export class PdfProxyService {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._state.file().excludedFromAutomaticAnalysis) {
|
||||
this.#disableActions();
|
||||
return;
|
||||
}
|
||||
|
||||
let textPopupElementsToDisable = [...TEXT_POPUPS_TO_TOGGLE];
|
||||
let headerElementsToDisable = [...HEADER_ITEMS_TO_TOGGLE];
|
||||
|
||||
|
||||
@ -69,6 +69,7 @@ export const getRedactOrHintOptions = (
|
||||
dossier: Dossier,
|
||||
applyToAllDossiers: boolean,
|
||||
isApprover: boolean,
|
||||
isPageExcluded = false,
|
||||
isRecommendation = false,
|
||||
isHint = false,
|
||||
isRss = false,
|
||||
@ -95,6 +96,7 @@ export const getRedactOrHintOptions = (
|
||||
descriptionParams: { dossierName: dossier.dossierName },
|
||||
icon: FOLDER_ICON,
|
||||
value: ResizeOptions.IN_DOSSIER,
|
||||
disabled: isPageExcluded,
|
||||
extraOption: {
|
||||
label: translations.inDossier.extraOptionLabel,
|
||||
checked: applyToAllDossiers,
|
||||
|
||||
@ -10,6 +10,7 @@ export interface RedactTextData {
|
||||
file: File;
|
||||
applyToAllDossiers?: boolean;
|
||||
isApprover?: boolean;
|
||||
isPageExcluded?: boolean;
|
||||
}
|
||||
|
||||
export interface EditRedactionData {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user