import redaction btn

This commit is contained in:
Timo Bejan 2022-02-18 16:54:49 +02:00
parent d289faf84d
commit ec7149971c
5 changed files with 14 additions and 13 deletions

View File

@ -296,7 +296,7 @@ export class AnnotationWrapper {
}
private static _setSuperType(annotationWrapper: AnnotationWrapper, redactionLogEntryWrapper: RedactionLogEntry) {
if (redactionLogEntryWrapper.recommendation) {
if (redactionLogEntryWrapper.recommendation && !redactionLogEntryWrapper.redacted) {
annotationWrapper.superType = 'recommendation';
return;
}

View File

@ -38,8 +38,6 @@ import { tap } from 'rxjs/operators';
import { DocumentInfoService } from '../../../screens/file-preview-screen/services/document-info.service';
import { ExpandableFileActionsComponent } from '@shared/components/expandable-file-actions/expandable-file-actions.component';
import { firstValueFrom } from 'rxjs';
import { environment } from '../../../../../../environments/environment';
import { loadCompareDocumentWrapper } from '../../../utils/compare-mode.utils';
import { RedactionImportService } from '../../services/redaction-import.service';
@Component({
@ -153,7 +151,7 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy,
action: $event => this._triggerImportRedactions($event),
tooltip: _('dossier-overview.import-redactions'),
icon: 'iqser:upload',
show: false, // this.showImportRedactions,
show: this.showImportRedactions,
},
{
type: ActionTypes.downloadBtn,
@ -296,12 +294,14 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy,
const fileToImport = files[0];
if (!fileToImport) {
console.error('No file to compare!');
console.error('No file to import!');
return;
}
await firstValueFrom(this._redactionImportService.importRedactions(this.file.dossierId, this.file.fileId, fileToImport)).catch(
exception => {},
error => {
this._toaster.error(_('error.http.generic'), { params: error });
},
);
// reload file
}
@ -417,9 +417,10 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy,
this.showImportRedactions = this._permissionsService.canImportRedactions(this.file);
this.showReanalyseFilePreview = this.canReanalyse && this.isFilePreview && (this.analysisForced || this.canEnableAutoAnalysis);
this.showReanalyseDossierOverview =
this.canReanalyse && this.isDossierOverview && (this.analysisForced || this.canEnableAutoAnalysis);
const showReanalyse = (this.canReanalyse && this.file.excludedFromAutomaticAnalysis) || this.analysisForced;
this.showReanalyseFilePreview = showReanalyse && this.isFilePreview;
this.showReanalyseDossierOverview = showReanalyse && this.isDossierOverview;
this.buttons = this._buttons;

View File

@ -173,7 +173,7 @@ export class PermissionsService {
}
private _canReanalyseFile(file: File): boolean {
return this.isReviewerOrApprover(file) || file.isNew || (file.isError && file.isNew);
return this.isReviewerOrApprover(file) && file.analysisRequired;
}
private _canEnableAutoAnalysis(file: File): boolean {

View File

@ -1,7 +1,7 @@
{
"ADMIN_CONTACT_NAME": null,
"ADMIN_CONTACT_URL": null,
"API_URL": "https://dev-04.iqser.cloud/redaction-gateway-v1",
"API_URL": "https://dev-05.iqser.cloud/redaction-gateway-v1",
"APP_NAME": "RedactManager",
"AUTO_READ_TIME": 3,
"BACKEND_APP_VERSION": "4.4.40",
@ -17,7 +17,7 @@
"MAX_RETRIES_ON_SERVER_ERROR": 3,
"OAUTH_CLIENT_ID": "redaction",
"OAUTH_IDP_HINT": null,
"OAUTH_URL": "https://dev-04.iqser.cloud/auth/realms/redaction",
"OAUTH_URL": "https://dev-05.iqser.cloud/auth/realms/redaction",
"RECENT_PERIOD_IN_HOURS": 24,
"SELECTION_MODE": "structural",
"MANUAL_BASE_URL": "https://docs.redactmanager.com"

@ -1 +1 @@
Subproject commit a9cddbf19b985c887bc772aec6fdd862d1dc848a
Subproject commit f54374859ec75ea73921b9e6a934bd3747f9721d