RED-9762: removed open component view preference.

This commit is contained in:
Nicoleta Panaghiu 2024-08-12 13:42:29 +03:00
parent 3544538c19
commit 8a3d372223
3 changed files with 0 additions and 22 deletions

View File

@ -11,12 +11,6 @@
</mat-slide-toggle>
</div>
<div *ngIf="config.IS_DOCUMINE" class="iqser-input-group">
<mat-slide-toggle color="primary" formControlName="openScmDialogByDefault">
{{ 'preferences-screen.form.open-structured-view-by-default' | translate }}
</mat-slide-toggle>
</div>
<div *allow="roles.getTables" class="iqser-input-group">
<label [translate]="'preferences-screen.form.table-extraction-type'"></label>
<input formControlName="tableExtractionType" />

View File

@ -23,7 +23,6 @@ import { MatCheckbox } from '@angular/material/checkbox';
interface PreferencesForm {
// preferences
autoExpandFiltersOnActions: boolean;
openScmDialogByDefault: boolean;
tableExtractionType: string;
// warnings preferences
loadAllAnnotationsWarning: boolean;
@ -78,7 +77,6 @@ export class PreferencesComponent extends BaseFormComponent implements OnInit {
this.form = this._formBuilder.group({
// preferences
autoExpandFiltersOnActions: [this.userPreferenceService.getAutoExpandFiltersOnActions()],
openScmDialogByDefault: [this.userPreferenceService.getOpenScmDialogByDefault()],
tableExtractionType: [this.userPreferenceService.getTableExtractionType()],
// warnings preferences
loadAllAnnotationsWarning: [this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning)],
@ -105,9 +103,6 @@ export class PreferencesComponent extends BaseFormComponent implements OnInit {
if (this.form.controls.autoExpandFiltersOnActions.value !== this.userPreferenceService.getAutoExpandFiltersOnActions()) {
await this.userPreferenceService.toggleAutoExpandFiltersOnActions();
}
if (this.form.controls.openScmDialogByDefault.value !== this.userPreferenceService.getOpenScmDialogByDefault()) {
await this.userPreferenceService.toggleOpenScmDialogByDefault();
}
if (this.form.controls.tableExtractionType.value !== this.userPreferenceService.getTableExtractionType()) {
await this.userPreferenceService.save(PreferencesKeys.tableExtractionType, this.form.controls.tableExtractionType.value);
@ -137,7 +132,6 @@ export class PreferencesComponent extends BaseFormComponent implements OnInit {
#patchValues() {
this.form.patchValue({
autoExpandFiltersOnActions: this.userPreferenceService.getAutoExpandFiltersOnActions(),
openScmDialogByDefault: this.userPreferenceService.getOpenScmDialogByDefault(),
tableExtractionType: this.userPreferenceService.getTableExtractionType(),
loadAllAnnotationsWarning: this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning),
helpModeDialog: this.userPreferenceService.getBool(KEYS.helpModeDialog),

View File

@ -10,7 +10,6 @@ export const PreferencesKeys = {
filesListingMode: 'Files-Listing-Mode',
autoExpandFiltersOnActions: 'Auto-Expand-Filters-On-Actions',
loadAllAnnotationsWarning: 'Load-All-Annotations-Warning',
openScmDialogByDefault: 'Open-Structured-Component-Management-By-Default',
tableExtractionType: 'Table-Extraction-Type',
addRedactionDefaultOption: 'Add-Redaction-Default',
addHintDefaultOption: 'Add-Hint-Default',
@ -65,15 +64,6 @@ export class UserPreferenceService extends IqserUserPreferenceService {
await this.save(PreferencesKeys.autoExpandFiltersOnActions, nextValue);
}
getOpenScmDialogByDefault(): boolean {
return this._getAttribute(PreferencesKeys.openScmDialogByDefault, 'false') === 'true';
}
async toggleOpenScmDialogByDefault(): Promise<void> {
const nextValue = (!this.getOpenScmDialogByDefault()).toString();
await this.save(PreferencesKeys.openScmDialogByDefault, nextValue);
}
getBool(key: string, defaultValue = 'false') {
return this._getAttribute(key, defaultValue) === 'true';
}