RED-7067, keep disabled state in case initial processing finishes before ocr queue
This commit is contained in:
parent
7e2163180a
commit
f7f9d60953
@ -1,10 +1,10 @@
|
||||
<ng-container *ngIf="componentContext$ | async as ctx">
|
||||
<div>
|
||||
<div
|
||||
[class.error]="file.isError"
|
||||
[class.initial-processing]="file.isInitialProcessing"
|
||||
[matTooltip]="file.filename"
|
||||
[attr.help-mode-key]="'document_in_editor'"
|
||||
[class.error]="file.isError"
|
||||
[class.initial-processing]="file.isInitialProcessing || (ctx.ocrByDefault && !file.lastOCRTime)"
|
||||
[matTooltip]="file.filename"
|
||||
class="table-item-title"
|
||||
matTooltipPosition="above"
|
||||
>
|
||||
|
||||
@ -4,6 +4,7 @@ import { FileAttributes } from '@red/domain';
|
||||
import { FileAttributesService } from '@services/entity-services/file-attributes.service';
|
||||
import { combineLatest, map, ReplaySubject } from 'rxjs';
|
||||
import { ContextComponent } from '@iqser/common-ui/lib/utils';
|
||||
import { DossierTemplatesService } from '@services/dossier-templates/dossier-templates.service';
|
||||
|
||||
interface PartialFile {
|
||||
readonly isError: boolean;
|
||||
@ -18,6 +19,7 @@ interface PartialFile {
|
||||
|
||||
interface FileNameColumnContext {
|
||||
primaryAttribute: string;
|
||||
ocrByDefault: boolean;
|
||||
}
|
||||
|
||||
@Component({
|
||||
@ -27,13 +29,14 @@ interface FileNameColumnContext {
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class FileNameColumnComponent extends ContextComponent<FileNameColumnContext> implements OnInit, OnChanges {
|
||||
readonly #reloadAttribute = new ReplaySubject<void>(1);
|
||||
@Input() file: PartialFile;
|
||||
@Input() dossierTemplateId: string;
|
||||
readonly #reloadAttribute = new ReplaySubject<void>(1);
|
||||
|
||||
constructor(
|
||||
private readonly _fileAttributeService: FileAttributesService,
|
||||
private readonly _primaryFileAttributeService: PrimaryFileAttributeService,
|
||||
private readonly _dossierTemplateService: DossierTemplatesService,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
@ -42,8 +45,10 @@ export class FileNameColumnComponent extends ContextComponent<FileNameColumnCont
|
||||
const primaryAttribute$ = combineLatest([this._fileAttributeService.fileAttributesConfig$, this.#reloadAttribute]).pipe(
|
||||
map(() => this._primaryFileAttributeService.getPrimaryFileAttributeValue(this.file, this.dossierTemplateId)),
|
||||
);
|
||||
const ocrByDefault$ = this._dossierTemplateService.get(this.dossierTemplateId).pipe(map(template => template.ocrByDefault));
|
||||
super._initContext({
|
||||
primaryAttribute: primaryAttribute$,
|
||||
ocrByDefault: ocrByDefault$,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"ADMIN_CONTACT_URL": null,
|
||||
"API_URL": "https://dan.iqser.cloud",
|
||||
"APP_NAME": "RedactManager",
|
||||
"IS_DOCUMINE": true,
|
||||
"IS_DOCUMINE": false,
|
||||
"RULE_EDITOR_DEV_ONLY": false,
|
||||
"AUTO_READ_TIME": 3,
|
||||
"BACKEND_APP_VERSION": "4.4.40",
|
||||
@ -18,8 +18,8 @@
|
||||
"SELECTION_MODE": "structural",
|
||||
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview",
|
||||
"ANNOTATIONS_THRESHOLD": 1000,
|
||||
"THEME": "scm",
|
||||
"BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/scm/",
|
||||
"THEME": "redact",
|
||||
"BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/redact/",
|
||||
"AVAILABLE_NOTIFICATIONS_DAYS": 30,
|
||||
"AVAILABLE_OLD_NOTIFICATIONS_MINUTES": 60,
|
||||
"NOTIFICATIONS_THRESHOLD": 1000,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user