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