DM-358 - WIP on implementing Help Mode-IDs for DocuMine
This commit is contained in:
parent
3c1122fa99
commit
d7a89c393d
@ -106,14 +106,14 @@ export class ConfigService {
|
||||
label: this._translateService.instant('dossier-listing.quick-filters.owner'),
|
||||
checker: dossierOwnerQuickChecker(userId),
|
||||
disabled: entities.filter(dossierOwnerQuickChecker(userId)).length === 0,
|
||||
helpModeKey: 'filter_dossier_list',
|
||||
helpModeKey: 'quick_filter_dossiers',
|
||||
},
|
||||
{
|
||||
id: 'member',
|
||||
label: this._translateService.instant('dossier-listing.quick-filters.member'),
|
||||
checker: dossierMemberQuickChecker(userId),
|
||||
disabled: entities.filter(dossierMemberQuickChecker(userId)).length === 0,
|
||||
helpModeKey: 'filter_dossier_list',
|
||||
helpModeKey: 'quick_filter_dossiers',
|
||||
},
|
||||
].map(filter => new NestedFilter(filter));
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
>
|
||||
<ng-container slot="right">
|
||||
<redaction-file-download-btn
|
||||
[attr.help-mode-key]="'edit_dossier_in_dossier'"
|
||||
[attr.help-mode-key]="'download_dossier_in_dossier'"
|
||||
[buttonId]="'download-files-btn'"
|
||||
[disabled]="downloadBtnDisabled$ | async"
|
||||
[dossier]="dossier"
|
||||
@ -17,7 +17,7 @@
|
||||
<iqser-circle-button
|
||||
(action)="downloadDossierAsCSV()"
|
||||
*ngIf="permissionsService.canDownloadCsvReport(dossier)"
|
||||
[attr.help-mode-key]="'edit_dossier_in_dossier'"
|
||||
[attr.help-mode-key]="'download_csv'"
|
||||
[disabled]="listingService.areSomeSelected$ | async"
|
||||
[icon]="'iqser:csv'"
|
||||
[tooltip]="'dossier-overview.header-actions.download-csv' | translate"
|
||||
@ -36,7 +36,7 @@
|
||||
<iqser-circle-button
|
||||
(action)="upload.emit()"
|
||||
*ngIf="permissionsService.canUploadFiles(dossier)"
|
||||
[attr.help-mode-key]="'edit_dossier_in_dossier'"
|
||||
[attr.help-mode-key]="'upload_document'"
|
||||
[buttonId]="'upload-document-btn'"
|
||||
[icon]="'iqser:upload'"
|
||||
[tooltip]="'dossier-overview.header-actions.upload-document' | translate"
|
||||
|
||||
@ -116,7 +116,7 @@ export class ConfigService {
|
||||
action: () => this.#openEditDossierDialog(dossierId),
|
||||
icon: 'iqser:edit',
|
||||
hide: !this.#currentUser.isManager && !this._iqserPermissionsService.has(Roles.dossiers.edit),
|
||||
helpModeKey: 'edit_dossier_in_dossier',
|
||||
helpModeKey: 'edit_dossier',
|
||||
disabled$,
|
||||
},
|
||||
];
|
||||
@ -446,28 +446,28 @@ export class ConfigService {
|
||||
required: true,
|
||||
checker: this._recentlyModifiedChecker,
|
||||
disabled: entities.filter(this._recentlyModifiedChecker).length === 0,
|
||||
helpModeKey: 'filter_document_list',
|
||||
helpModeKey: 'quick_filters_documents',
|
||||
},
|
||||
{
|
||||
id: 'assigned-to-me',
|
||||
label: this._translateService.instant('dossier-overview.quick-filters.assigned-to-me'),
|
||||
checker: this._assignedToMeChecker,
|
||||
disabled: entities.filter(this._assignedToMeChecker).length === 0,
|
||||
helpModeKey: 'filter_document_list',
|
||||
helpModeKey: 'quick_filters_documents',
|
||||
},
|
||||
{
|
||||
id: 'unassigned',
|
||||
label: this._translateService.instant('dossier-overview.quick-filters.unassigned'),
|
||||
checker: this._unassignedChecker,
|
||||
disabled: entities.filter(this._unassignedChecker).length === 0,
|
||||
helpModeKey: 'filter_document_list',
|
||||
helpModeKey: 'quick_filters_documents',
|
||||
},
|
||||
{
|
||||
id: 'assigned-to-others',
|
||||
label: this._translateService.instant('dossier-overview.quick-filters.assigned-to-others'),
|
||||
checker: this._assignedToOthersChecker,
|
||||
disabled: entities.filter(this._assignedToOthersChecker).length === 0,
|
||||
helpModeKey: 'filter_document_list',
|
||||
helpModeKey: 'quick_filters_documents',
|
||||
},
|
||||
].map(filter => new NestedFilter(filter));
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ export class ConfigService {
|
||||
hide: !this._permissionsService.canCreateDossier(dossierTemplate),
|
||||
icon: 'iqser:plus',
|
||||
type: 'primary',
|
||||
helpModeKey: 'new_dossier_button',
|
||||
helpModeKey: 'new_dossier',
|
||||
},
|
||||
];
|
||||
}
|
||||
@ -226,14 +226,14 @@ export class ConfigService {
|
||||
label: this._translateService.instant('dossier-listing.quick-filters.owner'),
|
||||
checker: dossierOwnerQuickChecker(userId),
|
||||
disabled: entities.filter(dossierOwnerQuickChecker(userId)).length === 0,
|
||||
helpModeKey: 'filter_dossier_list',
|
||||
helpModeKey: 'quick_filter_dossiers',
|
||||
},
|
||||
{
|
||||
id: 'member',
|
||||
label: this._translateService.instant('dossier-listing.quick-filters.member'),
|
||||
checker: dossierMemberQuickChecker(userId),
|
||||
disabled: entities.filter(dossierMemberQuickChecker(userId)).length === 0,
|
||||
helpModeKey: 'filter_dossier_list',
|
||||
helpModeKey: 'quick_filter_dossiers',
|
||||
},
|
||||
].map(filter => new NestedFilter(filter));
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div *ngIf="viewedPages$ | async as viewedPages" class="pages" id="pages">
|
||||
<div *ngIf="viewedPages$ | async as viewedPages" class="pages" id="pages" [attr.help-mode-key]="'workload_page_list'">
|
||||
<redaction-page-indicator
|
||||
(pageSelected)="pageSelectedByClick($event)"
|
||||
*ngFor="let pageNumber of pages; trackBy: trackBy"
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<iqser-circle-button
|
||||
(action)="editingReviewer = true"
|
||||
*ngIf="_canAssignOrUnassign() && !!file.assignee"
|
||||
[attr.help-mode-key]="'document_features_in_editor'"
|
||||
[attr.help-mode-key]="'editor_assign_user'"
|
||||
[buttonId]="'change-assignee'"
|
||||
[icon]="'iqser:edit'"
|
||||
[tooltip]="assignTooltip() | translate"
|
||||
|
||||
@ -30,11 +30,12 @@
|
||||
class="ml-8"
|
||||
icon="red:extract"
|
||||
tooltipPosition="below"
|
||||
[attr.help-mode-key]="'editor_scm'"
|
||||
></iqser-circle-button>
|
||||
|
||||
<redaction-file-actions
|
||||
[dossier]="state.dossier()"
|
||||
[fileActionsHelpModeKey]="'editor_document_features'"
|
||||
[helpModeKeyPrefix]="'editor'"
|
||||
[file]="file"
|
||||
[minWidth]="width"
|
||||
type="file-preview"
|
||||
@ -53,6 +54,7 @@
|
||||
[icon]="fullScreen ? 'red:exit-fullscreen' : 'red:fullscreen'"
|
||||
[tooltip]="'file-preview.fullscreen' | translate"
|
||||
class="ml-2"
|
||||
[attr.help-mode-key]="'editor_full_screen'"
|
||||
></iqser-circle-button>
|
||||
|
||||
<!-- Dev Mode Features-->
|
||||
@ -73,6 +75,7 @@
|
||||
[tooltip]="'common.close' | translate"
|
||||
class="ml-8"
|
||||
icon="iqser:close"
|
||||
[attr.help-mode-key]="'editor_close'"
|
||||
></iqser-circle-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<iqser-circle-button
|
||||
(action)="openEditDossierDialog(dossier.id)"
|
||||
*allow="roles.dossiers.read; if: currentUser.isUser"
|
||||
[attr.help-mode-key]="'edit_dossier_dossier_info'"
|
||||
[attr.help-mode-key]="'edit_dossier'"
|
||||
[icon]="
|
||||
((iqserPermissionsService.has$(roles.dossiers.edit) | async) && currentUser.isManager) || canEditDossierDictionary
|
||||
? 'iqser:edit'
|
||||
|
||||
@ -11,13 +11,14 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-template #actions (longPress)="forceReanalysisAction($event)" redactionLongPress>
|
||||
<div [attr.help-mode-key]="fileActionsHelpModeKey" class="file-actions">
|
||||
<div class="file-actions">
|
||||
<redaction-expandable-file-actions
|
||||
[actions]="buttons"
|
||||
[id]="'actions-for-' + file.fileId"
|
||||
[maxWidth]="maxWidth"
|
||||
[minWidth]="minWidth"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[helpModeKeyPrefix]="helpModeKeyPrefix"
|
||||
></redaction-expandable-file-actions>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
@ -41,7 +41,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
@Input({ required: true }) type: 'file-preview' | 'dossier-overview-list' | 'dossier-overview-workflow';
|
||||
@Input() maxWidth: number;
|
||||
@Input() minWidth: number;
|
||||
@Input() fileActionsHelpModeKey: 'document_features_in_dossier' | 'editor_document_features' = 'document_features_in_dossier';
|
||||
@Input() helpModeKeyPrefix: 'dossier' | 'editor' = 'dossier';
|
||||
readonly currentUser = getCurrentUser<User>();
|
||||
toggleTooltip?: string;
|
||||
assignTooltip?: string;
|
||||
@ -112,6 +112,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltip: _('dossier-overview.delete.action'),
|
||||
icon: 'iqser:trash',
|
||||
show: this.showDelete,
|
||||
helpModeKey: 'delete_file',
|
||||
},
|
||||
{
|
||||
id: 'assign-btn',
|
||||
@ -120,6 +121,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltip: this.assignTooltip,
|
||||
icon: 'red:assign',
|
||||
show: this.showAssign,
|
||||
helpModeKey: 'assign_user',
|
||||
},
|
||||
{
|
||||
id: 'assign-to-me-btn',
|
||||
@ -128,6 +130,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltip: _('dossier-overview.assign-me'),
|
||||
icon: 'red:assign-me',
|
||||
show: this.showAssignToSelf,
|
||||
helpModeKey: 'assign_user',
|
||||
},
|
||||
{
|
||||
id: 'open-import-redactions-dialog-btn',
|
||||
@ -145,6 +148,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltipClass: 'small',
|
||||
show: this._permissionsService.canDownloadRedactedFile() && !!this.file.lastProcessed,
|
||||
disabled: this.file.processingStatus === ProcessingFileStatuses.ERROR,
|
||||
helpModeKey: 'download',
|
||||
},
|
||||
{
|
||||
id: 'toggle-document-info-btn',
|
||||
@ -154,6 +158,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
ariaExpanded: toObservable(this._documentInfoService?.shown, { injector: this._injector }),
|
||||
icon: 'red:status-info',
|
||||
show: !!this._documentInfoService,
|
||||
helpModeKey: 'document_info',
|
||||
},
|
||||
{
|
||||
id: 'toggle-exclude-pages-btn',
|
||||
@ -172,6 +177,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltip: _('dossier-overview.back-to-new'),
|
||||
icon: 'red:undo',
|
||||
show: this.showSetToNew,
|
||||
helpModeKey: 'change_status',
|
||||
},
|
||||
{
|
||||
id: 'set-file-under-approval-btn',
|
||||
@ -180,6 +186,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltip: _('dossier-overview.under-approval'),
|
||||
icon: 'red:ready-for-approval',
|
||||
show: this.showUnderApproval,
|
||||
helpModeKey: 'change_status',
|
||||
},
|
||||
{
|
||||
id: 'set-file-under-review-btn',
|
||||
@ -188,6 +195,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltip: _('dossier-overview.under-review'),
|
||||
icon: 'red:undo',
|
||||
show: this.showUnderReview,
|
||||
helpModeKey: 'change_status',
|
||||
},
|
||||
{
|
||||
id: 'set-file-approved-btn',
|
||||
@ -197,6 +205,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
icon: 'red:approved',
|
||||
disabled: !this.file.canBeApproved,
|
||||
show: this.showApprove,
|
||||
helpModeKey: 'change_status',
|
||||
},
|
||||
{
|
||||
id: 'toggle-automatic-analysis-btn',
|
||||
@ -205,6 +214,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltip: _('dossier-overview.stop-auto-analysis'),
|
||||
icon: 'red:disable-analysis',
|
||||
show: this.canDisableAutoAnalysis,
|
||||
helpModeKey: 'stop_analysis',
|
||||
},
|
||||
{
|
||||
id: 'reanalyse-file-preview-btn',
|
||||
@ -215,6 +225,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
icon: 'iqser:refresh',
|
||||
show: this.showReanalyseFilePreview,
|
||||
disabled: this.file.isProcessing,
|
||||
helpModeKey: 'stop_analysis',
|
||||
},
|
||||
{
|
||||
id: 'toggle-automatic-analysis-btn',
|
||||
@ -224,6 +235,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
buttonType: this.isFilePreview ? CircleButtonTypes.warn : CircleButtonTypes.default,
|
||||
icon: 'red:enable-analysis',
|
||||
show: this.canEnableAutoAnalysis,
|
||||
helpModeKey: 'stop_analysis',
|
||||
},
|
||||
{
|
||||
id: 'set-under-approval-btn',
|
||||
@ -232,6 +244,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltip: _('dossier-overview.under-approval'),
|
||||
icon: 'red:undo',
|
||||
show: this.showUndoApproval,
|
||||
helpModeKey: 'change_status',
|
||||
},
|
||||
{
|
||||
id: 'ocr-file-btn',
|
||||
@ -248,6 +261,7 @@ export class FileActionsComponent implements OnChanges {
|
||||
tooltip: _('dossier-overview.reanalyse.action'),
|
||||
icon: 'iqser:refresh',
|
||||
show: this.showReanalyseDossierOverview,
|
||||
helpModeKey: 'stop_analysis',
|
||||
},
|
||||
{
|
||||
id: 'toggle-analysis-btn',
|
||||
@ -258,9 +272,12 @@ export class FileActionsComponent implements OnChanges {
|
||||
class: { 'mr-24': this.isDossierOverviewList },
|
||||
checked: !this.file.excluded,
|
||||
show: this.showToggleAnalysis,
|
||||
helpModeKey: 'disable_redaction',
|
||||
},
|
||||
];
|
||||
|
||||
console.log(actions.filter(btn => btn.show));
|
||||
|
||||
return actions.filter(btn => btn.show);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<button
|
||||
[routerLinkActive]="'active'"
|
||||
[routerLink]="['..', DOSSIERS_ROUTE]"
|
||||
[attr.help-mode-key]="'dossier_list'"
|
||||
[attr.help-mode-key]="'active_archived_dossiers'"
|
||||
class="red-tab"
|
||||
id="active-button"
|
||||
>
|
||||
@ -13,7 +13,7 @@
|
||||
[disabled]="dossierTemplate.numberOfArchivedDossiers === 0"
|
||||
[routerLinkActive]="'active'"
|
||||
[routerLink]="['..', ARCHIVE_ROUTE]"
|
||||
[attr.help-mode-key]="'dossier_list'"
|
||||
[attr.help-mode-key]="'active_archived_dossiers'"
|
||||
class="red-tab"
|
||||
id="archived-button"
|
||||
>
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="btn.tooltip | translate"
|
||||
[type]="btn.buttonType || buttonType"
|
||||
[attr.help-mode-key]="helpModeKey(btn)"
|
||||
></iqser-circle-button>
|
||||
|
||||
<!-- download redacted file-->
|
||||
@ -23,6 +24,7 @@
|
||||
[tooltipClass]="btn.tooltipClass"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[type]="buttonType"
|
||||
[attr.help-mode-key]="helpModeKey(btn)"
|
||||
></redaction-file-download-btn>
|
||||
|
||||
<!-- exclude from redaction -->
|
||||
@ -35,6 +37,7 @@
|
||||
[matTooltipPosition]="tooltipPosition"
|
||||
[matTooltip]="btn.tooltip | translate"
|
||||
[ngClass]="btn.class"
|
||||
[attr.help-mode-key]="helpModeKey(btn)"
|
||||
color="primary"
|
||||
iqserStopPropagation
|
||||
></mat-slide-toggle>
|
||||
|
||||
@ -20,6 +20,7 @@ export class ExpandableFileActionsComponent implements OnChanges {
|
||||
@Input() minWidth: number;
|
||||
@Input() buttonType: CircleButtonType;
|
||||
@Input() tooltipPosition: IqserTooltipPosition;
|
||||
@Input() helpModeKeyPrefix: 'dossier' | 'editor';
|
||||
|
||||
displayedButtons: Action[];
|
||||
hiddenButtons: Action[];
|
||||
@ -73,6 +74,10 @@ export class ExpandableFileActionsComponent implements OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
helpModeKey(action: Action) {
|
||||
return action.helpModeKey ? `${this.helpModeKeyPrefix}_${action.helpModeKey}` : '';
|
||||
}
|
||||
|
||||
onButtonClick(button: Action, $event: MouseEvent) {
|
||||
button.action($event);
|
||||
this.matMenu.closeMenu();
|
||||
|
||||
@ -56,11 +56,6 @@
|
||||
"elementKey": "search_entire_application",
|
||||
"documentKey": "search_entire_application"
|
||||
},
|
||||
{
|
||||
"elementKey": "edit_dossier_in_dossier",
|
||||
"documentKey": "edit_dossier_in_dossier",
|
||||
"overlappingElements": ["USER_MENU"]
|
||||
},
|
||||
{
|
||||
"elementKey": "document_features_in_editor",
|
||||
"documentKey": "document_features_in_editor",
|
||||
@ -402,5 +397,114 @@
|
||||
{
|
||||
"elementKey": "edit-file-attributes",
|
||||
"documentKey": "document_list"
|
||||
},
|
||||
{
|
||||
"elementKey": "active_archived_dossiers",
|
||||
"documentKey": "active_archived_dossiers"
|
||||
},
|
||||
{
|
||||
"elementKey": "quick_filter_dossiers",
|
||||
"documentKey": "quick_filter_dossiers"
|
||||
},
|
||||
{
|
||||
"elementKey": "edit_dossier",
|
||||
"documentKey": "edit_dossier"
|
||||
},
|
||||
{
|
||||
"elementKey": "download_dossier_in_dossier",
|
||||
"documentKey": "download_dossier",
|
||||
"overlappingElements": ["USER_MENU"]
|
||||
},
|
||||
{
|
||||
"elementKey": "download_csv",
|
||||
"documentKey": "download_csv",
|
||||
"overlappingElements": ["USER_MENU"]
|
||||
},
|
||||
{
|
||||
"elementKey": "upload_document",
|
||||
"documentKey": "upload_document",
|
||||
"overlappingElements": ["USER_MENU"]
|
||||
},
|
||||
{
|
||||
"elementKey": "close_dossier",
|
||||
"documentKey": "close_dossier",
|
||||
"overlappingElements": ["USER_MENU"]
|
||||
},
|
||||
{
|
||||
"elementKey": "quick_filters_documents",
|
||||
"documentKey": "quick_filters_documents"
|
||||
},
|
||||
{
|
||||
"elementKey": "filter_documents",
|
||||
"documentKey": "filter_documents"
|
||||
},
|
||||
{
|
||||
"elementKey": "dossier_delete_file",
|
||||
"documentKey": "dossier_delete_file"
|
||||
},
|
||||
{
|
||||
"elementKey": "dossier_assign_user",
|
||||
"documentKey": "dossier_assign_user"
|
||||
},
|
||||
{
|
||||
"elementKey": "dossier_change_status",
|
||||
"documentKey": "dossier_change_status"
|
||||
},
|
||||
{
|
||||
"elementKey": "dossier_stop_analysis",
|
||||
"documentKey": "dossier_stop_analysis"
|
||||
},
|
||||
{
|
||||
"elementKey": "dossier_download",
|
||||
"documentKey": "dossier_download"
|
||||
},
|
||||
{
|
||||
"elementKey": "dossier_disable_redaction",
|
||||
"documentKey": "dossier_disable_redaction"
|
||||
},
|
||||
{
|
||||
"elementKey": "workload_page_list",
|
||||
"documentKey": "workload_page_list"
|
||||
},
|
||||
|
||||
{
|
||||
"elementKey": "editor_delete_file",
|
||||
"documentKey": "editor_delete_file"
|
||||
},
|
||||
{
|
||||
"elementKey": "editor_assign_user",
|
||||
"documentKey": "editor_assign_user"
|
||||
},
|
||||
{
|
||||
"elementKey": "editor_change_status",
|
||||
"documentKey": "editor_change_status"
|
||||
},
|
||||
{
|
||||
"elementKey": "editor_stop_analysis",
|
||||
"documentKey": "editor_stop_analysis"
|
||||
},
|
||||
{
|
||||
"elementKey": "editor_download",
|
||||
"documentKey": "editor_download"
|
||||
},
|
||||
{
|
||||
"elementKey": "editor_disable_redaction",
|
||||
"documentKey": "editor_disable_redaction"
|
||||
},
|
||||
{
|
||||
"elementKey": "editor_scm",
|
||||
"documentKey": "editor_scm"
|
||||
},
|
||||
{
|
||||
"elementKey": "editor_document_info",
|
||||
"documentKey": "editor_document_info"
|
||||
},
|
||||
{
|
||||
"elementKey": "editor_full_screen",
|
||||
"documentKey": "editor_full_screen"
|
||||
},
|
||||
{
|
||||
"elementKey": "editor_close",
|
||||
"documentKey": "editor_close"
|
||||
}
|
||||
]
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 60ace0115100fe43591cabe973b5cb0067def173
|
||||
Subproject commit d4d593d24ac4f99dc9455d05906ae37db3c19ac9
|
||||
Loading…
x
Reference in New Issue
Block a user