More workflow updates (multi drag almost done)

This commit is contained in:
Adina Țeudan 2021-12-06 04:09:11 +02:00
parent c8d48b50f3
commit 067b67efd0
9 changed files with 8 additions and 24 deletions

View File

@ -1,6 +1,6 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';
import { PermissionsService } from '@services/permissions.service';
import { Dossier, File } from '@red/domain';
import { Action, ActionTypes, Dossier, File } from '@red/domain';
import { FileAssignService } from '../../../../shared/services/file-assign.service';
import { DossiersDialogService } from '../../../../services/dossiers-dialog.service';
import { CircleButtonType, CircleButtonTypes, ConfirmationDialogInput, LoadingService, Required } from '@iqser/common-ui';
@ -10,7 +10,6 @@ import { UserPreferenceService } from '@services/user-preference.service';
import { FileManagementService } from '@services/entity-services/file-management.service';
import { ReanalysisService } from '@services/reanalysis.service';
import { FilesService } from '@services/entity-services/files.service';
import { Action, ActionTypes } from '@shared/components/expandable-file-actions/types';
@Component({
selector: 'redaction-dossier-overview-bulk-actions',

View File

@ -1,7 +1,7 @@
<div class="workflow-item">
<div>
<div class="details">
<div [matTooltip]="file.filename" class="filename" matTooltipPosition="above">
<div [matTooltip]="file.filename" [routerLink]="file.routerLink" class="filename pointer" matTooltipPosition="above">
{{ file.filename }}
</div>

View File

@ -12,7 +12,7 @@ import {
ViewChild,
} from '@angular/core';
import { PermissionsService } from '@services/permissions.service';
import { File } from '@red/domain';
import { Action, ActionTypes, File } from '@red/domain';
import { DossiersDialogService } from '../../../services/dossiers-dialog.service';
import {
AutoUnsubscribe,
@ -37,7 +37,6 @@ import { Router } from '@angular/router';
import { ExcludedPagesService } from '../../../screens/file-preview-screen/services/excluded-pages.service';
import { tap } from 'rxjs/operators';
import { DocumentInfoService } from '../../../screens/file-preview-screen/services/document-info.service';
import { Action, ActionTypes } from '@shared/components/expandable-file-actions/types';
import { ExpandableFileActionsComponent } from '@shared/components/expandable-file-actions/expandable-file-actions.component';
@Component({
@ -115,13 +114,6 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy,
private get _buttons(): Action[] {
return [
{
type: ActionTypes.circleBtn,
action: () => this._openDocument(),
tooltip: _('dossier-overview.open-document'),
icon: 'iqser:collapse',
show: this.showOpenDocument,
},
{
type: ActionTypes.circleBtn,
action: $event => this._openDeleteFileDialog($event),
@ -263,10 +255,6 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy,
this._setup();
}
private _openDocument() {
this._router.navigate([this.file.routerLink]).then();
}
private _openDeleteFileDialog($event: MouseEvent) {
this._dialogService.openDialog(
'confirm',
@ -361,8 +349,6 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy,
(this._permissionsService.canAssignUser(this.file) || this._permissionsService.canUnassignUser(this.file)) &&
this.isDossierOverview;
this.showOpenDocument = this.file.canBeOpened && this.isDossierOverviewWorkflow;
this.showReanalyseFilePreview = this.canReanalyse && this.isFilePreview && this.analysisForced;
this.showReanalyseDossierOverview = this.canReanalyse && this.isDossierOverview && this.analysisForced;

View File

@ -41,7 +41,7 @@
(menuOpened)="expanded = true"
*ngIf="hiddenButtons.length > 0"
[attr.aria-expanded]="expanded"
[icon]="'iqser:plus'"
[icon]="'iqser:more-actions'"
[matMenuTriggerFor]="hiddenButtonsMenu"
[type]="buttonType"
></iqser-circle-button>

View File

@ -1,8 +1,7 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { Action, ActionTypes } from './types';
import { Action, ActionTypes, File } from '@red/domain';
import { CircleButtonType, IqserTooltipPosition, Toaster } from '@iqser/common-ui';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { File } from '@red/domain';
import { FileDownloadService } from '@upload-download/services/file-download.service';
import { PermissionsService } from '@services/permissions.service';

View File

@ -728,7 +728,6 @@
},
"ocr-file": "OCR Document",
"ocr-performed": "OCR was performed for this file.",
"open-document": "Open Document",
"quick-filters": {
"assigned-to-me": "Assigned to me",
"assigned-to-others": "Assigned to others",

@ -1 +1 @@
Subproject commit 6286eea9dbfbf4f34de8da4c5ad486e555c99af7
Subproject commit 4c119e2a7870d0778457d22d50ac380316c68e29

View File

@ -11,7 +11,7 @@ export const ActionTypes = {
};
export interface Action {
action?: Function;
action?: (...args: any[]) => void;
tooltip?: string;
icon?: string;
show?: boolean;

View File

@ -4,3 +4,4 @@ export * from './rules';
export * from './watermark';
export * from './default-color-type';
export * from './view-mode';
export * from './expandable-file-actions';