Pull request #253: RED-1546: Translations
Merge in RED/ui from RED-1546 to master * commit 'd49b20b712041b907250bb31247d3294b0e3dc4c': (25 commits) Some fixes Fix merge Translation rework: pluralize strings Translation rework: extract strings done Translation rework: select component, other fixes Translation rework: file status, other fixes Translation rework: fixes Translation rework: fixes Translation rework: annotation action messages Translation rework: annotation supertypes, chevron button, others Translation rework: add/edit titles Translation rework: roles Translation rework: file attribute types, languages Translation rework: delete file attributes, dossier attributes, audit categories fix parameter type fix reordered code code cleanup Translation rework: Default colors Translation rework: Confirmation dialog, confirm delete users Translation rework: Circle button ...
This commit is contained in:
commit
7f813538a0
@ -7,7 +7,7 @@ import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from '@angular/common
|
||||
import { BaseScreenComponent } from '@components/base-screen/base-screen.component';
|
||||
import { ApiModule, GeneralSettingsControllerService } from '@redaction/red-ui-http';
|
||||
import { ApiPathInterceptor } from '@utils/api-path-interceptor';
|
||||
import { MissingTranslationHandler, TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { MissingTranslationHandler, TranslateCompiler, TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
||||
import { languageInitializer } from '@i18n/language.initializer';
|
||||
import { LanguageService } from '@i18n/language.service';
|
||||
@ -30,6 +30,7 @@ import { BASE_HREF } from './tokens';
|
||||
import { MONACO_PATH, MonacoEditorModule } from '@materia-ui/ngx-monaco-editor';
|
||||
import { GlobalErrorHandler } from '@utils/global-error-handler.service';
|
||||
import { REDMissingTranslationHandler } from '@utils/missing-translations-handler';
|
||||
import { TranslateMessageFormatCompiler } from 'ngx-translate-messageformat-compiler';
|
||||
import { configurationInitializer } from '@app-config/configuration.initializer';
|
||||
import { AppConfigService } from '@app-config/app-config.service';
|
||||
import { SpotlightSearchComponent } from '@components/spotlight-search/spotlight-search.component';
|
||||
@ -82,6 +83,10 @@ const components = [
|
||||
provide: TranslateLoader,
|
||||
useFactory: httpLoaderFactory,
|
||||
deps: [HttpClient]
|
||||
},
|
||||
compiler: {
|
||||
provide: TranslateCompiler,
|
||||
useClass: TranslateMessageFormatCompiler
|
||||
}
|
||||
}),
|
||||
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })
|
||||
|
||||
@ -1,15 +1,8 @@
|
||||
<section>
|
||||
<p
|
||||
*ngIf="!configuredAdminName && !configuredAdminUrl"
|
||||
class="heading-xl"
|
||||
translate="auth-error.heading"
|
||||
></p>
|
||||
<p *ngIf="!configuredAdminName && !configuredAdminUrl" class="heading-xl" translate="auth-error.heading"></p>
|
||||
<p
|
||||
*ngIf="configuredAdminName && configuredAdminUrl"
|
||||
[innerHTML]="
|
||||
'auth-error.heading-with-name-and-link'
|
||||
| translate: { adminName: configuredAdminName, adminUrl: configuredAdminUrl }
|
||||
"
|
||||
[innerHTML]="'auth-error.heading-with-name-and-link' | translate: { adminName: configuredAdminName, adminUrl: configuredAdminUrl }"
|
||||
class="heading-xl"
|
||||
></p>
|
||||
<p
|
||||
|
||||
@ -11,15 +11,10 @@ export class AuthErrorComponent implements OnInit {
|
||||
configuredAdminName: string;
|
||||
configuredAdminUrl: string;
|
||||
|
||||
constructor(
|
||||
private readonly _userService: UserService,
|
||||
private readonly _appConfigService: AppConfigService
|
||||
) {}
|
||||
constructor(private readonly _userService: UserService, private readonly _appConfigService: AppConfigService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.configuredAdminName = this._appConfigService.getConfig(
|
||||
AppConfigKey.ADMIN_CONTACT_NAME
|
||||
);
|
||||
this.configuredAdminName = this._appConfigService.getConfig(AppConfigKey.ADMIN_CONTACT_NAME);
|
||||
this.configuredAdminUrl = this._appConfigService.getConfig(AppConfigKey.ADMIN_CONTACT_URL);
|
||||
}
|
||||
|
||||
|
||||
@ -66,16 +66,17 @@
|
||||
<div class="app-name">{{ titleService.getTitle() }}</div>
|
||||
</div>
|
||||
<div class="menu right flex-2">
|
||||
<redaction-circle-button
|
||||
*ngIf="!isSearchScreen"
|
||||
[icon]="'red:search'"
|
||||
(action)="openSpotlightSearch()"
|
||||
[tooltip]="'search.header-label' | translate"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-notifications *ngIf="userPreferenceService.areDevFeaturesEnabled" class="mr-8"></redaction-notifications>
|
||||
<div class="buttons">
|
||||
<redaction-circle-button
|
||||
(action)="openSpotlightSearch()"
|
||||
*ngIf="!isSearchScreen"
|
||||
[icon]="'red:search'"
|
||||
[tooltip]="'search.header-label' | translate"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-notifications *ngIf="userPreferenceService.areDevFeaturesEnabled"></redaction-notifications>
|
||||
</div>
|
||||
<redaction-user-button [matMenuTriggerFor]="userMenu" [showDot]="showPendingDownloadsDot" [user]="user"></redaction-user-button>
|
||||
|
||||
<mat-menu #userMenu="matMenu" xPosition="before">
|
||||
@ -96,4 +97,5 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="userPreferenceService.areDevFeaturesEnabled" class="dev-mode" translate="dev-mode"></div>
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
|
||||
@ -25,3 +25,12 @@
|
||||
display: flex;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
margin-right: 8px;
|
||||
|
||||
> *:not(:last-child) {
|
||||
margin-right: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import { MatDialog } from '@angular/material/dialog';
|
||||
import { SpotlightSearchComponent } from '@components/spotlight-search/spotlight-search.component';
|
||||
import { SpotlightSearchAction } from '@components/spotlight-search/spotlight-search-action';
|
||||
import { SpotlightSearchDialogData } from '@components/spotlight-search/spotlight-search-dialog-data';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
interface MenuItem {
|
||||
name: string;
|
||||
@ -26,23 +27,23 @@ interface MenuItem {
|
||||
export class BaseScreenComponent {
|
||||
readonly userMenuItems: MenuItem[] = [
|
||||
{
|
||||
name: 'top-bar.navigation-items.my-account.children.my-profile',
|
||||
name: _('top-bar.navigation-items.my-account.children.my-profile'),
|
||||
routerLink: '/main/my-profile',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
name: 'top-bar.navigation-items.my-account.children.admin',
|
||||
name: _('top-bar.navigation-items.my-account.children.admin'),
|
||||
routerLink: '/main/admin',
|
||||
show: this.permissionsService.isManager() || this.permissionsService.isUserAdmin(),
|
||||
action: this.appStateService.reset
|
||||
},
|
||||
{
|
||||
name: 'top-bar.navigation-items.my-account.children.downloads',
|
||||
name: _('top-bar.navigation-items.my-account.children.downloads'),
|
||||
routerLink: '/main/downloads',
|
||||
show: this.permissionsService.isUser()
|
||||
},
|
||||
{
|
||||
name: 'top-bar.navigation-items.my-account.children.trash',
|
||||
name: _('top-bar.navigation-items.my-account.children.trash'),
|
||||
routerLink: '/main/admin/trash',
|
||||
show: this.permissionsService.isManager() || this.permissionsService.isUserAdmin()
|
||||
}
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
<div class="page-header">
|
||||
<div class="actions flex-1">
|
||||
<redaction-circle-button
|
||||
[tooltip]="'common.close' | translate"
|
||||
icon="red:close"
|
||||
redactionNavigateLastDossiersScreen
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -14,47 +14,30 @@
|
||||
<div class="content-container">
|
||||
<div class="header-item">
|
||||
<span class="all-caps-label">
|
||||
{{
|
||||
'downloads-list.table-header.title'
|
||||
| translate: { length: fileDownloadService.downloads.length }
|
||||
}}
|
||||
{{ 'downloads-list.table-header.title' | translate: { length: fileDownloadService.downloads.length } }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div [class.no-data]="noData" class="table-header" redactionSyncWidth="table-item">
|
||||
<redaction-table-col-name
|
||||
label="downloads-list.table-col-names.name"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
label="downloads-list.table-col-names.size"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
label="downloads-list.table-col-names.date"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
label="downloads-list.table-col-names.status"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name [label]="'downloads-list.table-col-names.name' | translate"></redaction-table-col-name>
|
||||
<redaction-table-col-name [label]="'downloads-list.table-col-names.size' | translate"></redaction-table-col-name>
|
||||
<redaction-table-col-name [label]="'downloads-list.table-col-names.date' | translate"></redaction-table-col-name>
|
||||
<redaction-table-col-name [label]="'downloads-list.table-col-names.status' | translate"></redaction-table-col-name>
|
||||
<div></div>
|
||||
<div class="scrollbar-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<redaction-empty-state
|
||||
*ngIf="noData"
|
||||
[text]="'downloads-list.no-data.title' | translate"
|
||||
icon="red:download"
|
||||
screen="downloads-list"
|
||||
></redaction-empty-state>
|
||||
|
||||
<cdk-virtual-scroll-viewport [itemSize]="80" redactionHasScrollbar>
|
||||
<!-- Table lines -->
|
||||
<div
|
||||
*cdkVirtualFor="let download of fileDownloadService.downloads"
|
||||
class="table-item"
|
||||
>
|
||||
<div *cdkVirtualFor="let download of fileDownloadService.downloads" class="table-item">
|
||||
<div>
|
||||
<div
|
||||
[class.no-bold]="download.lastDownload"
|
||||
class="table-item-title heading"
|
||||
>
|
||||
<div [class.no-bold]="download.lastDownload" class="table-item-title heading">
|
||||
{{ download.filename }}
|
||||
</div>
|
||||
</div>
|
||||
@ -78,16 +61,16 @@
|
||||
<redaction-circle-button
|
||||
(action)="downloadItem(download)"
|
||||
*ngIf="download.status === 'READY' && !download.inProgress"
|
||||
[tooltip]="'downloads-list.actions.download' | translate"
|
||||
icon="red:download"
|
||||
tooltip="downloads-list.actions.download"
|
||||
type="dark-bg"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="deleteItem(download)"
|
||||
[tooltip]="'downloads-list.actions.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="downloads-list.actions.delete"
|
||||
type="dark-bg"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
|
||||
@ -1,14 +1,5 @@
|
||||
<redaction-circle-button
|
||||
[matMenuTriggerFor]="overlay"
|
||||
[showDot]="hasUnread"
|
||||
icon="red:notification"
|
||||
></redaction-circle-button>
|
||||
<mat-menu
|
||||
#overlay="matMenu"
|
||||
backdropClass="notifications-backdrop"
|
||||
class="notifications-menu"
|
||||
xPosition="before"
|
||||
>
|
||||
<redaction-circle-button [matMenuTriggerFor]="overlay" [showDot]="hasUnread" icon="red:notification"></redaction-circle-button>
|
||||
<mat-menu #overlay="matMenu" backdropClass="notifications-backdrop" class="notifications-menu" xPosition="before">
|
||||
<div *ngFor="let group of groupedNotifications | sortBy: 'desc':'dateString'">
|
||||
<div class="all-caps-label">{{ day(group) }}</div>
|
||||
<div
|
||||
@ -24,10 +15,7 @@
|
||||
</div>
|
||||
<div
|
||||
(click)="toggleRead(notification, $event)"
|
||||
[matTooltip]="
|
||||
(notification.read ? 'notifications.mark-unread' : 'notifications.mark-read')
|
||||
| translate
|
||||
"
|
||||
[matTooltip]="(notification.read ? 'notifications.mark-unread' : 'notifications.mark-read') | translate"
|
||||
class="dot"
|
||||
matTooltipPosition="before"
|
||||
></div>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<label translate="top-bar.navigation-items.my-account.children.language.label"></label>
|
||||
<mat-select formControlName="language">
|
||||
<mat-option *ngFor="let language of languages" [value]="language">
|
||||
{{ 'top-bar.navigation-items.my-account.children.language.' + language | translate }}
|
||||
{{ translations[language] | translate }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</div>
|
||||
|
||||
@ -7,6 +7,7 @@ import { TranslateService } from '@ngx-translate/core';
|
||||
import { UserControllerService } from '@redaction/red-ui-http';
|
||||
import { AppConfigKey, AppConfigService } from '@app-config/app-config.service';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { languagesTranslations } from '../../translations/languages-translations';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
|
||||
@Component({
|
||||
@ -17,6 +18,7 @@ import { LoadingService } from '@services/loading.service';
|
||||
export class UserProfileScreenComponent implements OnInit {
|
||||
formGroup: FormGroup;
|
||||
changePasswordUrl: any;
|
||||
translations = languagesTranslations;
|
||||
|
||||
private _profileModel: ProfileModel;
|
||||
|
||||
|
||||
@ -7,10 +7,7 @@ import { LoadingService } from '@services/loading.service';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CompositeRouteGuard implements CanActivate {
|
||||
constructor(
|
||||
protected readonly _injector: Injector,
|
||||
private readonly _loadingService: LoadingService
|
||||
) {}
|
||||
constructor(protected readonly _injector: Injector, private readonly _loadingService: LoadingService) {}
|
||||
|
||||
async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean> {
|
||||
this._loadingService.start();
|
||||
@ -24,10 +21,7 @@ export class CompositeRouteGuard implements CanActivate {
|
||||
if (canActivateResult instanceof Promise) {
|
||||
canActivateResult = from(canActivateResult);
|
||||
}
|
||||
if (
|
||||
typeof canActivateResult === 'boolean' ||
|
||||
canActivateResult instanceof UrlTree
|
||||
) {
|
||||
if (typeof canActivateResult === 'boolean' || canActivateResult instanceof UrlTree) {
|
||||
canActivateResult = of(canActivateResult);
|
||||
}
|
||||
|
||||
|
||||
10
apps/red-ui/src/app/models/default-color-key.model.ts
Normal file
10
apps/red-ui/src/app/models/default-color-key.model.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export type DefaultColorType =
|
||||
| 'analysisColor'
|
||||
| 'defaultColor'
|
||||
| 'dictionaryRequestColor'
|
||||
| 'manualRedactionColor'
|
||||
| 'notRedacted'
|
||||
| 'previewColor'
|
||||
| 'requestAdd'
|
||||
| 'requestRemove'
|
||||
| 'updatedColor';
|
||||
@ -31,11 +31,7 @@ export class AnnotationPermissions {
|
||||
);
|
||||
}
|
||||
|
||||
static forUser(
|
||||
isApprover: boolean,
|
||||
user: UserWrapper,
|
||||
annotations: AnnotationWrapper | AnnotationWrapper[]
|
||||
) {
|
||||
static forUser(isApprover: boolean, user: UserWrapper, annotations: AnnotationWrapper | AnnotationWrapper[]) {
|
||||
if (!isArray(annotations)) {
|
||||
annotations = [annotations];
|
||||
}
|
||||
@ -44,38 +40,26 @@ export class AnnotationPermissions {
|
||||
|
||||
for (const annotation of annotations) {
|
||||
const permissions: AnnotationPermissions = new AnnotationPermissions();
|
||||
permissions.canUndo =
|
||||
(!isApprover && annotation.isSuggestion) ||
|
||||
(isApprover && annotation.isUndoableActionForApprover);
|
||||
permissions.canUndo = (!isApprover && annotation.isSuggestion) || (isApprover && annotation.isUndoableActionForApprover);
|
||||
|
||||
permissions.canForceRedaction = annotation.isSkipped && !permissions.canUndo;
|
||||
|
||||
permissions.canAcceptRecommendation = annotation.isRecommendation;
|
||||
|
||||
permissions.canMarkAsFalsePositive =
|
||||
annotation.canBeMarkedAsFalsePositive && !annotation.force;
|
||||
permissions.canMarkTextOnlyAsFalsePositive =
|
||||
annotation.canBeMarkedAsFalsePositiveWithTextOnly && !annotation.force;
|
||||
permissions.canMarkAsFalsePositive = annotation.canBeMarkedAsFalsePositive && !annotation.force;
|
||||
permissions.canMarkTextOnlyAsFalsePositive = annotation.canBeMarkedAsFalsePositiveWithTextOnly && !annotation.force;
|
||||
|
||||
permissions.canRemoveOrSuggestToRemoveOnlyHere =
|
||||
annotation.isRedacted && !annotation.force;
|
||||
permissions.canRemoveOrSuggestToRemoveOnlyHere = annotation.isRedacted && !annotation.force;
|
||||
permissions.canRemoveOrSuggestToRemoveFromDictionary =
|
||||
annotation.isRedacted &&
|
||||
!annotation.isManualRedaction &&
|
||||
annotation.isModifyDictionary &&
|
||||
!annotation.force;
|
||||
annotation.isRedacted && !annotation.isManualRedaction && annotation.isModifyDictionary && !annotation.force;
|
||||
|
||||
permissions.canAcceptSuggestion =
|
||||
isApprover && (annotation.isSuggestion || annotation.isDeclinedSuggestion);
|
||||
permissions.canAcceptSuggestion = isApprover && (annotation.isSuggestion || annotation.isDeclinedSuggestion);
|
||||
permissions.canRejectSuggestion =
|
||||
isApprover &&
|
||||
(annotation.isSuggestion ||
|
||||
(annotation.isReadyForAnalysis &&
|
||||
!permissions.canUndo &&
|
||||
annotation.superType !== 'pending-analysis'));
|
||||
(annotation.isReadyForAnalysis && !permissions.canUndo && annotation.superType !== 'pending-analysis'));
|
||||
|
||||
permissions.canChangeLegalBasis =
|
||||
!annotation.isManualRedaction && annotation.isRedacted;
|
||||
permissions.canChangeLegalBasis = !annotation.isManualRedaction && annotation.isRedacted;
|
||||
|
||||
permissions.canRecategorizeImage = annotation.isImage;
|
||||
|
||||
|
||||
@ -1,26 +1,30 @@
|
||||
import { Comment, Point, Rectangle } from '@redaction/red-ui-http';
|
||||
import { RedactionLogEntryWrapper } from './redaction-log-entry.wrapper';
|
||||
import { annotationTypesTranslations } from '../../translations/annotation-types-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
export type AnnotationSuperType =
|
||||
| 'add-dictionary'
|
||||
| 'remove-dictionary'
|
||||
| 'remove-only-here'
|
||||
| 'change-legal-basis'
|
||||
| 'suggestion-change-legal-basis'
|
||||
| 'suggestion-recategorize-image'
|
||||
| 'suggestion-add-dictionary'
|
||||
| 'suggestion-force-redaction'
|
||||
| 'suggestion-remove-dictionary'
|
||||
| 'suggestion-add'
|
||||
| 'suggestion-remove'
|
||||
| 'skipped'
|
||||
| 'redaction'
|
||||
| 'manual-redaction'
|
||||
| 'recommendation'
|
||||
| 'hint'
|
||||
| 'pending-analysis'
|
||||
| 'declined-suggestion';
|
||||
|
||||
export class AnnotationWrapper {
|
||||
superType:
|
||||
| 'add-dictionary'
|
||||
| 'remove-dictionary'
|
||||
| 'remove-only-here'
|
||||
| 'change-legal-basis'
|
||||
| 'suggestion-change-legal-basis'
|
||||
| 'suggestion-recategorize-image'
|
||||
| 'suggestion-add-dictionary'
|
||||
| 'suggestion-force-redaction'
|
||||
| 'suggestion-remove-dictionary'
|
||||
| 'suggestion-add'
|
||||
| 'suggestion-remove'
|
||||
| 'skipped'
|
||||
| 'redaction'
|
||||
| 'manual-redaction'
|
||||
| 'recommendation'
|
||||
| 'hint'
|
||||
| 'pending-analysis'
|
||||
| 'declined-suggestion';
|
||||
superType: AnnotationSuperType;
|
||||
|
||||
dictionary: string;
|
||||
color: string;
|
||||
@ -65,7 +69,7 @@ export class AnnotationWrapper {
|
||||
}
|
||||
|
||||
get descriptor() {
|
||||
return this.isModifyDictionary ? 'dictionary' : 'type';
|
||||
return this.isModifyDictionary ? _('dictionary') : _('type');
|
||||
}
|
||||
|
||||
get hasTextAfter() {
|
||||
@ -213,7 +217,7 @@ export class AnnotationWrapper {
|
||||
this._createContent(annotationWrapper, redactionLogEntry);
|
||||
this._setSuperType(annotationWrapper, redactionLogEntry);
|
||||
this._handleRecommendations(annotationWrapper, redactionLogEntry);
|
||||
annotationWrapper.typeLabel = 'annotation-type.' + annotationWrapper.superType;
|
||||
annotationWrapper.typeLabel = annotationTypesTranslations[annotationWrapper.superType];
|
||||
|
||||
return annotationWrapper;
|
||||
}
|
||||
|
||||
@ -77,19 +77,13 @@ export class FileDataModel {
|
||||
|
||||
const reasonAnnotationIds = [];
|
||||
this.redactionLog.redactionLogEntry?.forEach(redactionLogEntry => {
|
||||
if (
|
||||
redactionLogEntry.manual &&
|
||||
(redactionLogEntry.status === 'APPROVED' ||
|
||||
redactionLogEntry.status === 'REQUESTED')
|
||||
) {
|
||||
if (redactionLogEntry.manual && (redactionLogEntry.status === 'APPROVED' || redactionLogEntry.status === 'REQUESTED')) {
|
||||
// for dictionary entries -> I.E accepted recommendations or false positives,
|
||||
// check reason
|
||||
reasonAnnotationIds.push(redactionLogEntry.reason);
|
||||
}
|
||||
|
||||
const existingChangeLogEntry = this.redactionChangeLog?.redactionLogEntry?.find(
|
||||
rle => rle.id === redactionLogEntry.id
|
||||
);
|
||||
const existingChangeLogEntry = this.redactionChangeLog?.redactionLogEntry?.find(rle => rle.id === redactionLogEntry.id);
|
||||
|
||||
// copy the redactionLog Entry
|
||||
const redactionLogEntryWrapper: RedactionLogEntryWrapper = {};
|
||||
|
||||
@ -5,16 +5,9 @@ export class ManualAnnotationResponse {
|
||||
annotationId;
|
||||
commentId;
|
||||
|
||||
constructor(
|
||||
public manualRedactionEntryWrapper: ManualRedactionEntryWrapper,
|
||||
public manualAddResponse: ManualAddResponse
|
||||
) {
|
||||
this.annotationId = manualAddResponse?.annotationId
|
||||
? manualAddResponse.annotationId
|
||||
: new Date().getTime();
|
||||
this.commentId = manualAddResponse?.commentId
|
||||
? manualAddResponse.commentId
|
||||
: new Date().getTime();
|
||||
constructor(public manualRedactionEntryWrapper: ManualRedactionEntryWrapper, public manualAddResponse: ManualAddResponse) {
|
||||
this.annotationId = manualAddResponse?.annotationId ? manualAddResponse.annotationId : new Date().getTime();
|
||||
this.commentId = manualAddResponse?.commentId ? manualAddResponse.commentId : new Date().getTime();
|
||||
}
|
||||
|
||||
get dictionary() {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<redaction-side-nav [title]="type">
|
||||
<redaction-side-nav [title]="translations[type] | translate">
|
||||
<ng-container *ngFor="let item of items[type]">
|
||||
<div
|
||||
*ngIf="
|
||||
@ -12,7 +12,7 @@
|
||||
class="item"
|
||||
routerLinkActive="active"
|
||||
>
|
||||
{{ item.label || item.screen | translate }}
|
||||
{{ item.label | translate }}
|
||||
</div>
|
||||
</ng-container>
|
||||
</redaction-side-nav>
|
||||
|
||||
@ -2,6 +2,10 @@ import { Component, Input } from '@angular/core';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { UserPreferenceService } from '@services/user-preference.service';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { adminSideNavTranslations } from '../translations/admin-side-nav-translations';
|
||||
|
||||
type Type = 'settings' | 'dossierTemplates';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-admin-side-nav',
|
||||
@ -9,34 +13,35 @@ import { AppStateService } from '@state/app-state.service';
|
||||
styleUrls: ['./admin-side-nav.component.scss']
|
||||
})
|
||||
export class AdminSideNavComponent {
|
||||
@Input() type: 'settings' | 'dossier-templates';
|
||||
@Input() type: Type;
|
||||
translations = adminSideNavTranslations;
|
||||
|
||||
items: {
|
||||
[key: string]: {
|
||||
[key in Type]: {
|
||||
screen: string;
|
||||
onlyDevMode?: boolean;
|
||||
onlyAdmin?: boolean;
|
||||
onlyManager?: boolean;
|
||||
userManagerOnly?: boolean;
|
||||
label?: string;
|
||||
label: string;
|
||||
}[];
|
||||
} = {
|
||||
settings: [
|
||||
{ screen: 'dossier-templates', onlyManager: true },
|
||||
{ screen: 'digital-signature', onlyAdmin: true },
|
||||
{ screen: 'license-info', label: 'license-information', onlyAdmin: true },
|
||||
{ screen: 'audit', onlyAdmin: true },
|
||||
{ screen: 'users', label: 'user-management', userManagerOnly: true },
|
||||
{ screen: 'general-config', label: 'configurations', onlyAdmin: true }
|
||||
{ screen: 'dossier-templates', label: _('dossier-templates'), onlyManager: true },
|
||||
{ screen: 'digital-signature', label: _('digital-signature'), onlyAdmin: true },
|
||||
{ screen: 'license-info', label: _('license-information'), onlyAdmin: true },
|
||||
{ screen: 'audit', label: _('audit'), onlyAdmin: true },
|
||||
{ screen: 'users', label: _('user-management'), userManagerOnly: true },
|
||||
{ screen: 'general-config', label: _('configurations'), onlyAdmin: true }
|
||||
],
|
||||
'dossier-templates': [
|
||||
{ screen: 'dictionaries' },
|
||||
{ screen: 'rules', onlyDevMode: true, label: 'rule-editor' },
|
||||
{ screen: 'default-colors' },
|
||||
{ screen: 'watermark' },
|
||||
{ screen: 'file-attributes' },
|
||||
{ screen: 'dossier-attributes' },
|
||||
{ screen: 'reports' }
|
||||
dossierTemplates: [
|
||||
{ screen: 'dictionaries', label: _('dictionaries') },
|
||||
{ screen: 'rules', onlyDevMode: true, label: _('rule-editor') },
|
||||
{ screen: 'default-colors', label: _('default-colors') },
|
||||
{ screen: 'watermark', label: _('watermark') },
|
||||
{ screen: 'file-attributes', label: _('file-attributes') },
|
||||
{ screen: 'dossier-attributes', label: _('dossier-attributes') },
|
||||
{ screen: 'reports', label: _('reports') }
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
@ -10,9 +10,7 @@
|
||||
<mat-icon svgIcon="red:arrow-right"></mat-icon>
|
||||
<a
|
||||
[class.active]="!appStateService.activeDictionaryType"
|
||||
[routerLink]="
|
||||
'/main/admin/dossier-templates/' + appStateService.activeDossierTemplateId
|
||||
"
|
||||
[routerLink]="'/main/admin/dossier-templates/' + appStateService.activeDossierTemplateId"
|
||||
class="breadcrumb ml-0"
|
||||
>
|
||||
{{ appStateService.activeDossierTemplate.name }}
|
||||
|
||||
@ -12,13 +12,7 @@ import {
|
||||
|
||||
import { curveLinear } from 'd3-shape';
|
||||
import { scaleBand, scaleLinear, scalePoint, scaleTime } from 'd3-scale';
|
||||
import {
|
||||
BaseChartComponent,
|
||||
calculateViewDimensions,
|
||||
ColorHelper,
|
||||
LineSeriesComponent,
|
||||
ViewDimensions
|
||||
} from '@swimlane/ngx-charts';
|
||||
import { BaseChartComponent, calculateViewDimensions, ColorHelper, LineSeriesComponent, ViewDimensions } from '@swimlane/ngx-charts';
|
||||
|
||||
@Component({
|
||||
// eslint-disable-next-line @angular-eslint/component-selector
|
||||
@ -277,9 +271,7 @@ export class ComboChartComponent extends BaseChartComponent {
|
||||
if (this.bandwidth === undefined) {
|
||||
this.bandwidth = width - this.barPadding;
|
||||
}
|
||||
const offset = Math.floor(
|
||||
(width + this.barPadding - (this.bandwidth + this.barPadding) * domain.length) / 2
|
||||
);
|
||||
const offset = Math.floor((width + this.barPadding - (this.bandwidth + this.barPadding) * domain.length) / 2);
|
||||
|
||||
if (this.scaleType === 'time') {
|
||||
scale = scaleTime().range([0, width]).domain(domain);
|
||||
@ -344,12 +336,7 @@ export class ComboChartComponent extends BaseChartComponent {
|
||||
domain = this.yDomain;
|
||||
}
|
||||
this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);
|
||||
this.colorsLine = new ColorHelper(
|
||||
this.colorSchemeLine,
|
||||
this.schemeType,
|
||||
domain,
|
||||
this.customColors
|
||||
);
|
||||
this.colorsLine = new ColorHelper(this.colorSchemeLine, this.schemeType, domain, this.customColors);
|
||||
}
|
||||
|
||||
getLegendOptions() {
|
||||
@ -387,9 +374,7 @@ export class ComboChartComponent extends BaseChartComponent {
|
||||
}
|
||||
|
||||
onActivate(item) {
|
||||
const idx = this.activeEntries.findIndex(
|
||||
d => d.name === item.name && d.value === item.value && d.series === item.series
|
||||
);
|
||||
const idx = this.activeEntries.findIndex(d => d.name === item.name && d.value === item.value && d.series === item.series);
|
||||
if (idx > -1) {
|
||||
return;
|
||||
}
|
||||
@ -399,9 +384,7 @@ export class ComboChartComponent extends BaseChartComponent {
|
||||
}
|
||||
|
||||
onDeactivate(item) {
|
||||
const idx = this.activeEntries.findIndex(
|
||||
d => d.name === item.name && d.value === item.value && d.series === item.series
|
||||
);
|
||||
const idx = this.activeEntries.findIndex(d => d.name === item.name && d.value === item.value && d.series === item.series);
|
||||
|
||||
this.activeEntries.splice(idx, 1);
|
||||
this.activeEntries = [...this.activeEntries];
|
||||
|
||||
@ -1,11 +1,4 @@
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnChanges,
|
||||
Output
|
||||
} from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
|
||||
import { animate, style, transition, trigger } from '@angular/animations';
|
||||
import { formatLabel } from '@swimlane/ngx-charts';
|
||||
|
||||
@ -158,10 +151,7 @@ export class ComboSeriesVerticalComponent implements OnChanges {
|
||||
bar.gradientStops = this.colors.getLinearGradientStops(value);
|
||||
} else {
|
||||
bar.color = this.colors.getColor(bar.offset1);
|
||||
bar.gradientStops = this.colors.getLinearGradientStops(
|
||||
bar.offset1,
|
||||
bar.offset0
|
||||
);
|
||||
bar.gradientStops = this.colors.getLinearGradientStops(bar.offset1, bar.offset0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,9 +179,7 @@ export class ComboSeriesVerticalComponent implements OnChanges {
|
||||
|
||||
isActive(entry): boolean {
|
||||
if (!this.activeEntries) return false;
|
||||
const item = this.activeEntries.find(
|
||||
d => entry.name === d.name && entry.series === d.series
|
||||
);
|
||||
const item = this.activeEntries.find(d => entry.name === d.name && entry.series === d.series);
|
||||
return item !== undefined;
|
||||
}
|
||||
|
||||
|
||||
@ -2,16 +2,16 @@
|
||||
<redaction-circle-button
|
||||
(action)="openDeleteDossierTemplateDialog($event)"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[tooltip]="'dossier-templates-listing.action.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="dossier-templates-listing.action.delete"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="openEditDossierTemplateDialog($event)"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[tooltip]="'dossier-templates-listing.action.edit' | translate"
|
||||
icon="red:edit"
|
||||
tooltip="dossier-templates-listing.action.edit"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<div class="collapsed-wrapper">
|
||||
<redaction-circle-button
|
||||
(action)="toggleCollapse.emit()"
|
||||
[tooltip]="'user-stats.expand' | translate"
|
||||
icon="red:expand"
|
||||
tooltip="user-stats.expand"
|
||||
tooltipPosition="before"
|
||||
></redaction-circle-button>
|
||||
<div class="all-caps-label" translate="user-stats.title"></div>
|
||||
@ -12,8 +12,8 @@
|
||||
<div class="heading-xl flex-1" translate="user-stats.title"></div>
|
||||
<redaction-circle-button
|
||||
(action)="toggleCollapse.emit()"
|
||||
[tooltip]="'user-stats.collapse' | translate"
|
||||
icon="red:collapse"
|
||||
tooltip="user-stats.collapse"
|
||||
tooltipPosition="before"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -23,7 +23,7 @@
|
||||
[config]="chartData"
|
||||
[radius]="63"
|
||||
[strokeWidth]="15"
|
||||
[subtitle]="'user-stats.chart.users'"
|
||||
[subtitle]="'user-stats.chart.users' | translate"
|
||||
direction="row"
|
||||
totalType="sum"
|
||||
></redaction-simple-doughnut-chart>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
<form (submit)="saveDictionary()" [formGroup]="dictionaryForm">
|
||||
<div class="dialog-content">
|
||||
<div class="red-input-group mb-14" *ngIf="!!dictionary">
|
||||
<div *ngIf="!!dictionary" class="red-input-group mb-14">
|
||||
<label translate="add-edit-dictionary.form.name"></label>
|
||||
{{ dictionary.label }}
|
||||
</div>
|
||||
@ -14,9 +14,9 @@
|
||||
<div *ngIf="!dictionary" class="red-input-group required">
|
||||
<label translate="add-edit-dictionary.form.name"></label>
|
||||
<input
|
||||
[placeholder]="'add-edit-dictionary.form.name-placeholder' | translate"
|
||||
formControlName="type"
|
||||
name="type"
|
||||
placeholder="{{ 'add-edit-dictionary.form.name-placeholder' | translate }}"
|
||||
type="text"
|
||||
/>
|
||||
<span class="hint" translate="add-edit-dictionary.form.name-hint"></span>
|
||||
@ -25,9 +25,9 @@
|
||||
<div class="red-input-group required w-75">
|
||||
<label translate="add-edit-dictionary.form.rank"></label>
|
||||
<input
|
||||
[placeholder]="'add-edit-dictionary.form.rank-placeholder' | translate"
|
||||
formControlName="rank"
|
||||
name="rank"
|
||||
placeholder="{{ 'add-edit-dictionary.form.rank-placeholder' | translate }}"
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
@ -35,10 +35,10 @@
|
||||
<div class="red-input-group required">
|
||||
<label translate="add-edit-dictionary.form.color"></label>
|
||||
<input
|
||||
[placeholder]="'add-edit-dictionary.form.color-placeholder' | translate"
|
||||
class="hex-color-input"
|
||||
formControlName="hexColor"
|
||||
name="hexColor"
|
||||
placeholder="{{ 'add-edit-dictionary.form.color-placeholder' | translate }}"
|
||||
type="text"
|
||||
/>
|
||||
<div
|
||||
@ -56,11 +56,9 @@
|
||||
<div class="red-input-group w-450">
|
||||
<label translate="add-edit-dictionary.form.description"></label>
|
||||
<textarea
|
||||
[placeholder]="'add-edit-dictionary.form.description-placeholder' | translate"
|
||||
formControlName="description"
|
||||
name="description"
|
||||
placeholder="{{
|
||||
'add-edit-dictionary.form.description-placeholder' | translate
|
||||
}}"
|
||||
redactionHasScrollbar
|
||||
rows="4"
|
||||
type="text"
|
||||
@ -85,31 +83,18 @@
|
||||
</div>
|
||||
|
||||
<div class="red-input-group">
|
||||
<mat-checkbox
|
||||
color="primary"
|
||||
formControlName="addToDictionaryAction"
|
||||
name="addToDictionaryAction"
|
||||
>
|
||||
<mat-checkbox color="primary" formControlName="addToDictionaryAction" name="addToDictionaryAction">
|
||||
{{ 'add-edit-dictionary.form.add-to-dictionary-action' | translate }}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
<button
|
||||
[disabled]="dictionaryForm.invalid || !changed"
|
||||
color="primary"
|
||||
mat-flat-button
|
||||
type="submit"
|
||||
>
|
||||
<button [disabled]="dictionaryForm.invalid || !changed" color="primary" mat-flat-button type="submit">
|
||||
{{ 'add-edit-dictionary.save' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<redaction-circle-button
|
||||
class="dialog-close"
|
||||
icon="red:close"
|
||||
mat-dialog-close
|
||||
></redaction-circle-button>
|
||||
<redaction-circle-button class="dialog-close" icon="red:close" mat-dialog-close></redaction-circle-button>
|
||||
</section>
|
||||
|
||||
@ -7,6 +7,7 @@ import { Toaster } from '@services/toaster.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TypeValueWrapper } from '@models/file/type-value.wrapper';
|
||||
import { humanize } from '../../../../utils/functions';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-add-edit-dictionary-dialog',
|
||||
@ -41,8 +42,8 @@ export class AddEditDictionaryDialogComponent {
|
||||
}
|
||||
|
||||
get dialogHeader(): string {
|
||||
const i18nString = 'add-edit-dictionary.title.' + (this.dictionary ? 'edit' : 'new');
|
||||
return this._translateService.instant(i18nString, {
|
||||
return this._translateService.instant('add-edit-dictionary.title', {
|
||||
type: this.dictionary ? 'edit' : 'create',
|
||||
name: humanize(this.dictionary?.type)
|
||||
});
|
||||
}
|
||||
@ -89,11 +90,11 @@ export class AddEditDictionaryDialogComponent {
|
||||
() => this._dialogRef.close(true),
|
||||
error => {
|
||||
if (error.status === 409) {
|
||||
this._toaster.error('add-edit-dictionary.error.dictionary-already-exists');
|
||||
this._toaster.error(_('add-edit-dictionary.error.dictionary-already-exists'));
|
||||
} else if (error.status === 400) {
|
||||
this._toaster.error('add-edit-dictionary.error.invalid-color-or-rank');
|
||||
this._toaster.error(_('add-edit-dictionary.error.invalid-color-or-rank'));
|
||||
} else {
|
||||
this._toaster.error('add-edit-dictionary.error.generic');
|
||||
this._toaster.error(_('add-edit-dictionary.error.generic'));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -1,19 +1,21 @@
|
||||
<section class="dialog">
|
||||
<div class="dialog-header heading-l">
|
||||
{{
|
||||
(dossierAttribute ? 'add-edit-dossier-attribute.title.edit' : 'add-edit-dossier-attribute.title.new')
|
||||
| translate: { name: dossierAttribute?.label }
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
[translateParams]="{
|
||||
name: dossierAttribute?.label,
|
||||
type: dossierAttribute ? 'edit' : 'create'
|
||||
}"
|
||||
[translate]="'add-edit-dossier-attribute.title'"
|
||||
class="dialog-header heading-l"
|
||||
></div>
|
||||
|
||||
<form (submit)="saveFileAttribute()" [formGroup]="dossierAttributeForm">
|
||||
<div class="dialog-content">
|
||||
<div class="red-input-group required w-300">
|
||||
<label translate="add-edit-dossier-attribute.form.label"></label>
|
||||
<input
|
||||
[placeholder]="'add-edit-dossier-attribute.form.label-placeholder' | translate"
|
||||
formControlName="label"
|
||||
name="label"
|
||||
placeholder="{{ 'add-edit-dossier-attribute.form.label-placeholder' | translate }}"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
@ -27,7 +29,7 @@
|
||||
<label translate="add-edit-dossier-attribute.form.type"></label>
|
||||
<mat-select formControlName="type">
|
||||
<mat-option *ngFor="let type of typeOptions" [value]="type">
|
||||
{{ 'dossier-attribute-types.' + type | translate }}
|
||||
{{ translations[type] | translate }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</div>
|
||||
|
||||
@ -3,11 +3,13 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { DossierAttributeConfig, FileAttributeConfig } from '@redaction/red-ui-http';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { LoadingService } from '../../../../services/loading.service';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { Toaster } from '../../../../services/toaster.service';
|
||||
import { AutoUnsubscribeComponent } from '../../../shared/base/auto-unsubscribe.component';
|
||||
import { Toaster } from '@services/toaster.service';
|
||||
import { AutoUnsubscribeComponent } from '@shared/base/auto-unsubscribe.component';
|
||||
import { DossierAttributesService } from '@shared/services/controller-wrappers/dossier-attributes.service';
|
||||
import { dossierAttributeTypesTranslations } from '../../translations/dossier-attribute-types-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-add-edit-dossier-attribute-dialog',
|
||||
@ -17,6 +19,7 @@ import { DossierAttributesService } from '@shared/services/controller-wrappers/d
|
||||
export class AddEditDossierAttributeDialogComponent extends AutoUnsubscribeComponent implements OnDestroy {
|
||||
dossierAttributeForm: FormGroup;
|
||||
dossierAttribute: DossierAttributeConfig;
|
||||
translations = dossierAttributeTypesTranslations;
|
||||
dossierTemplateId: string;
|
||||
readonly typeOptions = [
|
||||
DossierAttributeConfig.TypeEnum.TEXT,
|
||||
@ -76,10 +79,10 @@ export class AddEditDossierAttributeDialogComponent extends AutoUnsubscribeCompo
|
||||
() => {
|
||||
this.dialogRef.close(true);
|
||||
},
|
||||
(error: HttpErrorResponse) => {
|
||||
this._loadingService.stop();
|
||||
this._toaster.error('add-edit-dossier-attribute.error.generic', { error: error });
|
||||
}
|
||||
);
|
||||
(error: HttpErrorResponse) => {
|
||||
this._loadingService.stop();
|
||||
this._toaster.error(_('add-edit-dossier-attribute.error.generic'), { error: error });
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +1,21 @@
|
||||
<section class="dialog">
|
||||
<div class="dialog-header heading-l">
|
||||
{{
|
||||
(dossierTemplate ? 'add-edit-dossier-template.title.edit' : 'add-edit-dossier-template.title.new')
|
||||
| translate: { name: dossierTemplate?.name }
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
[translateParams]="{
|
||||
type: dossierTemplate ? 'edit' : 'create',
|
||||
name: dossierTemplate?.name
|
||||
}"
|
||||
[translate]="'add-edit-dossier-template.title'"
|
||||
class="dialog-header heading-l"
|
||||
></div>
|
||||
|
||||
<form (submit)="saveDossierTemplate()" [formGroup]="dossierTemplateForm">
|
||||
<div class="dialog-content">
|
||||
<div class="red-input-group required w-300">
|
||||
<label translate="add-edit-dossier-template.form.name"></label>
|
||||
<input
|
||||
[placeholder]="'add-edit-dossier-template.form.name-placeholder' | translate"
|
||||
formControlName="name"
|
||||
name="name"
|
||||
placeholder="{{ 'add-edit-dossier-template.form.name-placeholder' | translate }}"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
@ -21,9 +23,9 @@
|
||||
<div class="red-input-group w-400">
|
||||
<label translate="add-edit-dossier-template.form.description"></label>
|
||||
<textarea
|
||||
[placeholder]="'add-edit-dossier-template.form.description-placeholder' | translate"
|
||||
formControlName="description"
|
||||
name="description"
|
||||
placeholder="{{ 'add-edit-dossier-template.form.description-placeholder' | translate }}"
|
||||
rows="4"
|
||||
type="text"
|
||||
></textarea>
|
||||
@ -83,7 +85,6 @@
|
||||
[optionTemplate]="reportTemplateOptionTemplate"
|
||||
[options]="availableReportTypes"
|
||||
[valueMapper]="reportTemplateValueMapper"
|
||||
[translatePrefix]="'report-type.'"
|
||||
class="mr-16"
|
||||
formControlName="reportTemplateIds"
|
||||
></redaction-select>
|
||||
@ -95,8 +96,7 @@
|
||||
length: dossierTemplateForm.controls['downloadFileTypes'].value.length
|
||||
}
|
||||
"
|
||||
[options]="downloadTypesEnum"
|
||||
[translatePrefix]="'download-type.'"
|
||||
[options]="downloadTypes"
|
||||
formControlName="downloadFileTypes"
|
||||
></redaction-select>
|
||||
</div>
|
||||
|
||||
@ -5,12 +5,14 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import * as moment from 'moment';
|
||||
import { Moment } from 'moment';
|
||||
import {
|
||||
Dossier,
|
||||
DossierTemplateControllerService,
|
||||
DossierTemplateModel,
|
||||
ReportTemplate,
|
||||
ReportTemplateControllerService
|
||||
} from '@redaction/red-ui-http';
|
||||
import { applyIntervalConstraints } from '@utils/date-inputs-utils';
|
||||
import { downloadTypesTranslations } from '../../../../translations/download-types-translations';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-add-edit-dossier-template-dialog',
|
||||
@ -21,8 +23,12 @@ export class AddEditDossierTemplateDialogComponent implements OnInit {
|
||||
dossierTemplateForm: FormGroup;
|
||||
hasValidFrom: boolean;
|
||||
hasValidTo: boolean;
|
||||
downloadTypesEnum = ['ORIGINAL', 'PREVIEW', 'REDACTED'];
|
||||
availableReportTypes = [];
|
||||
downloadTypesEnum: Dossier.DownloadFileTypesEnum[] = ['ORIGINAL', 'PREVIEW', 'REDACTED'];
|
||||
downloadTypes: { key: Dossier.DownloadFileTypesEnum; label: string }[] = this.downloadTypesEnum.map(type => ({
|
||||
key: type,
|
||||
label: downloadTypesTranslations[type]
|
||||
}));
|
||||
availableReportTypes: ReportTemplate[] = [];
|
||||
|
||||
private _previousValidFrom: Moment;
|
||||
private _previousValidTo: Moment;
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
<section class="dialog">
|
||||
<div class="dialog-header heading-l">
|
||||
{{
|
||||
(fileAttribute
|
||||
? 'add-edit-file-attribute.title.edit'
|
||||
: 'add-edit-file-attribute.title.new'
|
||||
) | translate: { name: fileAttribute?.label }
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
[translateParams]="{
|
||||
type: fileAttribute ? 'edit' : 'create',
|
||||
name: fileAttribute?.label
|
||||
}"
|
||||
[translate]="'add-edit-file-attribute.title'"
|
||||
class="dialog-header heading-l"
|
||||
></div>
|
||||
|
||||
<form (submit)="saveFileAttribute()" [formGroup]="fileAttributeForm">
|
||||
<div class="dialog-content">
|
||||
<div class="red-input-group required w-300">
|
||||
<label translate="add-edit-file-attribute.form.name"></label>
|
||||
<input
|
||||
[placeholder]="'add-edit-file-attribute.form.name-placeholder' | translate"
|
||||
formControlName="label"
|
||||
name="label"
|
||||
placeholder="{{ 'add-edit-file-attribute.form.name-placeholder' | translate }}"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
@ -23,11 +23,9 @@
|
||||
<div class="red-input-group required w-300">
|
||||
<label translate="add-edit-file-attribute.form.column-header"></label>
|
||||
<input
|
||||
[placeholder]="'add-edit-file-attribute.form.column-header-placeholder' | translate"
|
||||
formControlName="csvColumnHeader"
|
||||
name="csvColumnHeader"
|
||||
placeholder="{{
|
||||
'add-edit-file-attribute.form.column-header-placeholder' | translate
|
||||
}}"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
@ -36,7 +34,7 @@
|
||||
<label translate="add-edit-file-attribute.form.type"></label>
|
||||
<mat-select formControlName="type">
|
||||
<mat-option *ngFor="let type of typeOptions" [value]="type">
|
||||
{{ 'file-attribute-types.' + type | translate }}
|
||||
{{ translations[type] | translate }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</div>
|
||||
@ -49,31 +47,18 @@
|
||||
</div>
|
||||
|
||||
<div class="red-input-group mt-0">
|
||||
<mat-checkbox
|
||||
color="primary"
|
||||
formControlName="primaryAttribute"
|
||||
name="primaryAttribute"
|
||||
>
|
||||
<mat-checkbox color="primary" formControlName="primaryAttribute" name="primaryAttribute">
|
||||
{{ 'add-edit-file-attribute.form.primary' | translate }}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog-actions">
|
||||
<button
|
||||
[disabled]="fileAttributeForm.invalid || !changed"
|
||||
color="primary"
|
||||
mat-flat-button
|
||||
type="submit"
|
||||
>
|
||||
<button [disabled]="fileAttributeForm.invalid || !changed" color="primary" mat-flat-button type="submit">
|
||||
{{ 'add-edit-file-attribute.save' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<redaction-circle-button
|
||||
class="dialog-close"
|
||||
icon="red:close"
|
||||
mat-dialog-close
|
||||
></redaction-circle-button>
|
||||
<redaction-circle-button class="dialog-close" icon="red:close" mat-dialog-close></redaction-circle-button>
|
||||
</section>
|
||||
|
||||
@ -3,6 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { FileAttributeConfig } from '@redaction/red-ui-http';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { fileAttributeTypesTranslations } from '../../translations/file-attribute-types-translations';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-add-edit-file-attribute-dialog',
|
||||
@ -13,11 +14,8 @@ export class AddEditFileAttributeDialogComponent {
|
||||
fileAttributeForm: FormGroup;
|
||||
fileAttribute: FileAttributeConfig;
|
||||
dossierTemplateId: string;
|
||||
readonly typeOptions = [
|
||||
FileAttributeConfig.TypeEnum.TEXT,
|
||||
FileAttributeConfig.TypeEnum.NUMBER,
|
||||
FileAttributeConfig.TypeEnum.DATE
|
||||
];
|
||||
readonly typeOptions = [FileAttributeConfig.TypeEnum.TEXT, FileAttributeConfig.TypeEnum.NUMBER, FileAttributeConfig.TypeEnum.DATE];
|
||||
translations = fileAttributeTypesTranslations;
|
||||
|
||||
constructor(
|
||||
private readonly _appStateService: AppStateService,
|
||||
@ -32,10 +30,7 @@ export class AddEditFileAttributeDialogComponent {
|
||||
this.fileAttributeForm = this._formBuilder.group({
|
||||
label: [this.fileAttribute?.label, Validators.required],
|
||||
csvColumnHeader: [this.fileAttribute?.csvColumnHeader, Validators.required],
|
||||
type: [
|
||||
this.fileAttribute?.type || FileAttributeConfig.TypeEnum.TEXT,
|
||||
Validators.required
|
||||
],
|
||||
type: [this.fileAttribute?.type || FileAttributeConfig.TypeEnum.TEXT, Validators.required],
|
||||
readonly: [this.fileAttribute ? !this.fileAttribute.editable : false],
|
||||
primaryAttribute: [this.fileAttribute?.primaryAttribute]
|
||||
});
|
||||
|
||||
@ -13,9 +13,5 @@
|
||||
[user]="user"
|
||||
></redaction-reset-password>
|
||||
|
||||
<redaction-circle-button
|
||||
class="dialog-close"
|
||||
icon="red:close"
|
||||
mat-dialog-close
|
||||
></redaction-circle-button>
|
||||
<redaction-circle-button class="dialog-close" icon="red:close" mat-dialog-close></redaction-circle-button>
|
||||
</section>
|
||||
|
||||
@ -10,10 +10,7 @@ import { User } from '@redaction/red-ui-http';
|
||||
export class AddEditUserDialogComponent {
|
||||
resettingPassword = false;
|
||||
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<AddEditUserDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public user: User
|
||||
) {}
|
||||
constructor(public dialogRef: MatDialogRef<AddEditUserDialogComponent>, @Inject(MAT_DIALOG_DATA) public user: User) {}
|
||||
|
||||
toggleResetPassword() {
|
||||
this.resettingPassword = !this.resettingPassword;
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
<div
|
||||
[translateParams]="{ userName: userName }"
|
||||
[translate]="'reset-password-dialog.header'"
|
||||
class="dialog-header heading-l"
|
||||
></div>
|
||||
<div [translateParams]="{ userName: userName }" [translate]="'reset-password-dialog.header'" class="dialog-header heading-l"></div>
|
||||
|
||||
<form (submit)="save()" [formGroup]="passwordForm">
|
||||
<div class="dialog-content">
|
||||
@ -17,10 +13,6 @@
|
||||
{{ 'reset-password-dialog.actions.save' | translate }}
|
||||
</button>
|
||||
|
||||
<div
|
||||
(click)="toggleResetPassword.emit()"
|
||||
class="all-caps-label cancel"
|
||||
translate="reset-password-dialog.actions.cancel"
|
||||
></div>
|
||||
<div (click)="toggleResetPassword.emit()" class="all-caps-label cancel" translate="reset-password-dialog.actions.cancel"></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
<div class="dialog-header heading-l">
|
||||
{{ (user ? 'add-edit-user.title.edit' : 'add-edit-user.title.new') | translate }}
|
||||
</div>
|
||||
<div
|
||||
[translateParams]="{
|
||||
type: user ? 'edit' : 'create'
|
||||
}"
|
||||
[translate]="'add-edit-user.title'"
|
||||
class="dialog-header heading-l"
|
||||
></div>
|
||||
|
||||
<form (submit)="save()" [formGroup]="userForm">
|
||||
<div class="dialog-content">
|
||||
@ -23,7 +27,7 @@
|
||||
<label translate="add-edit-user.form.role"></label>
|
||||
<div class="roles-wrapper">
|
||||
<mat-checkbox *ngFor="let role of ROLES" [formControlName]="role" color="primary">
|
||||
{{ 'roles.' + role | translate }}
|
||||
{{ translations[role] | translate }}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
@ -37,30 +41,18 @@
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
<button
|
||||
[disabled]="userForm.invalid || !changed"
|
||||
color="primary"
|
||||
mat-flat-button
|
||||
type="submit"
|
||||
>
|
||||
{{
|
||||
(user ? 'add-edit-user.actions.save-changes' : 'add-edit-user.actions.save')
|
||||
| translate
|
||||
}}
|
||||
<button [disabled]="userForm.invalid || !changed" color="primary" mat-flat-button type="submit">
|
||||
{{ (user ? 'add-edit-user.actions.save-changes' : 'add-edit-user.actions.save') | translate }}
|
||||
</button>
|
||||
|
||||
<redaction-icon-button
|
||||
(action)="delete()"
|
||||
*ngIf="user"
|
||||
[label]="'add-edit-user.actions.delete' | translate"
|
||||
icon="red:trash"
|
||||
text="add-edit-user.actions.delete"
|
||||
type="show-bg"
|
||||
></redaction-icon-button>
|
||||
|
||||
<div
|
||||
class="all-caps-label cancel"
|
||||
mat-dialog-close
|
||||
translate="add-edit-user.actions.cancel"
|
||||
></div>
|
||||
<div class="all-caps-label cancel" mat-dialog-close translate="add-edit-user.actions.cancel"></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -3,6 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { User, UserControllerService } from '@redaction/red-ui-http';
|
||||
import { AdminDialogService } from '../../../services/admin-dialog.service';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
import { rolesTranslations } from '../../../../../translations/roles-translations';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-user-details',
|
||||
@ -15,6 +16,7 @@ export class UserDetailsComponent implements OnInit {
|
||||
@Output() closeDialog = new EventEmitter<any>();
|
||||
userForm: FormGroup;
|
||||
readonly ROLES = ['RED_USER', 'RED_MANAGER', 'RED_USER_ADMIN', 'RED_ADMIN'];
|
||||
translations = rolesTranslations;
|
||||
private readonly _ROLE_REQUIREMENTS = { RED_MANAGER: 'RED_USER', RED_ADMIN: 'RED_USER_ADMIN' };
|
||||
|
||||
constructor(
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
<section class="dialog">
|
||||
<div class="dialog-header heading-l">
|
||||
{{
|
||||
'confirm-delete-file-attribute.title.' + type
|
||||
| translate: { name: fileAttribute?.label }
|
||||
'confirm-delete-file-attribute.title'
|
||||
| translate
|
||||
: {
|
||||
type: type,
|
||||
name: fileAttribute?.label
|
||||
}
|
||||
}}
|
||||
</div>
|
||||
|
||||
@ -22,23 +26,20 @@
|
||||
[class.error]="!checkbox.value && showToast"
|
||||
color="primary"
|
||||
>
|
||||
{{ 'confirm-delete-file-attribute.' + checkbox.label | translate }}
|
||||
{{ checkbox.label | translate: { type: type } }}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
<button (click)="deleteFileAttribute()" color="primary" mat-flat-button>
|
||||
{{ 'confirm-delete-file-attribute.delete.' + type | translate }}
|
||||
{{ 'confirm-delete-file-attribute.delete' | translate: { type: type } }}
|
||||
</button>
|
||||
<div
|
||||
(click)="cancel()"
|
||||
[translate]="'confirm-delete-file-attribute.cancel.' + type"
|
||||
[translateParams]="{ type: type }"
|
||||
[translate]="'confirm-delete-file-attribute.cancel'"
|
||||
class="all-caps-label cancel"
|
||||
></div>
|
||||
</div>
|
||||
<redaction-circle-button
|
||||
class="dialog-close"
|
||||
icon="red:close"
|
||||
mat-dialog-close
|
||||
></redaction-circle-button>
|
||||
<redaction-circle-button class="dialog-close" icon="red:close" mat-dialog-close></redaction-circle-button>
|
||||
</section>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { FileAttributeConfig } from '@redaction/red-ui-http';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-confirm-delete-file-attribute-dialog',
|
||||
@ -10,8 +11,8 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
export class ConfirmDeleteFileAttributeDialogComponent {
|
||||
fileAttribute: FileAttributeConfig;
|
||||
checkboxes = [
|
||||
{ value: false, label: 'impacted-documents.' + this.type },
|
||||
{ value: false, label: 'lost-details' }
|
||||
{ value: false, label: _('confirm-delete-file-attribute.impacted-documents') },
|
||||
{ value: false, label: _('confirm-delete-file-attribute.lost-details') }
|
||||
];
|
||||
showToast = false;
|
||||
|
||||
@ -27,7 +28,7 @@ export class ConfirmDeleteFileAttributeDialogComponent {
|
||||
}
|
||||
|
||||
get type(): 'bulk' | 'single' {
|
||||
return !this.fileAttribute ? 'bulk' : 'single';
|
||||
return this.fileAttribute ? 'single' : 'bulk';
|
||||
}
|
||||
|
||||
deleteFileAttribute() {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<section class="dialog">
|
||||
<div [translate]="'confirm-delete-users.title.' + type" class="dialog-header heading-l"></div>
|
||||
<div [translateParams]="{ usersCount: users.length }" [translate]="'confirm-delete-users.title'" class="dialog-header heading-l"></div>
|
||||
|
||||
<div *ngIf="showToast" class="inline-dialog-toast toast-error">
|
||||
<div translate="confirm-delete-users.toast-error"></div>
|
||||
@ -18,25 +18,26 @@
|
||||
color="primary"
|
||||
>
|
||||
{{
|
||||
'confirm-delete-users.' + checkbox.label
|
||||
| translate: { dossiersCount: dossiersCount }
|
||||
checkbox.label
|
||||
| translate
|
||||
: {
|
||||
dossiersCount: dossiersCount,
|
||||
usersCount: users.length
|
||||
}
|
||||
}}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
<button (click)="deleteUser()" color="primary" mat-flat-button>
|
||||
{{ 'confirm-delete-users.delete.' + type | translate }}
|
||||
{{ 'confirm-delete-users.delete' | translate: { usersCount: users.length } }}
|
||||
</button>
|
||||
<div
|
||||
(click)="cancel()"
|
||||
[translate]="'confirm-delete-users.cancel.' + type"
|
||||
[translateParams]="{ usersCount: users.length }"
|
||||
[translate]="'confirm-delete-users.cancel'"
|
||||
class="all-caps-label cancel"
|
||||
></div>
|
||||
</div>
|
||||
<redaction-circle-button
|
||||
class="dialog-close"
|
||||
icon="red:close"
|
||||
mat-dialog-close
|
||||
></redaction-circle-button>
|
||||
<redaction-circle-button class="dialog-close" icon="red:close" mat-dialog-close></redaction-circle-button>
|
||||
</section>
|
||||
|
||||
@ -3,6 +3,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { User, UserControllerService } from '@redaction/red-ui-http';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-confirm-delete-users-dialog',
|
||||
@ -11,8 +12,8 @@ import { LoadingService } from '@services/loading.service';
|
||||
})
|
||||
export class ConfirmDeleteUsersDialogComponent {
|
||||
checkboxes = [
|
||||
{ value: false, label: 'impacted-dossiers' },
|
||||
{ value: false, label: 'impacted-documents.' + this.type }
|
||||
{ value: false, label: _('confirm-delete-users.impacted-dossiers') },
|
||||
{ value: false, label: _('confirm-delete-users.impacted-documents') }
|
||||
];
|
||||
showToast = false;
|
||||
dossiersCount: number;
|
||||
@ -38,10 +39,6 @@ export class ConfirmDeleteUsersDialogComponent {
|
||||
return this.checkboxes[0].value && this.checkboxes[1].value;
|
||||
}
|
||||
|
||||
get type(): 'bulk' | 'single' {
|
||||
return this.users.length > 1 ? 'bulk' : 'single';
|
||||
}
|
||||
|
||||
async deleteUser() {
|
||||
if (this.valid) {
|
||||
this._loadingService.start();
|
||||
|
||||
@ -1,18 +1,15 @@
|
||||
<section class="dialog">
|
||||
<div
|
||||
[translate]="'default-colors-screen.types.' + this.colorKey"
|
||||
class="dialog-header heading-l"
|
||||
></div>
|
||||
<div [translate]="translations[colorKey]" class="dialog-header heading-l"></div>
|
||||
|
||||
<form (submit)="saveColors()" [formGroup]="colorForm">
|
||||
<div class="dialog-content">
|
||||
<div class="red-input-group required">
|
||||
<label translate="edit-color-dialog.form.color"></label>
|
||||
<input
|
||||
[placeholder]="'edit-color-dialog.form.color-placeholder' | translate"
|
||||
class="hex-color-input"
|
||||
formControlName="color"
|
||||
name="color"
|
||||
placeholder="{{ 'edit-color-dialog.form.color-placeholder' | translate }}"
|
||||
type="text"
|
||||
/>
|
||||
<div
|
||||
@ -23,10 +20,7 @@
|
||||
class="input-icon"
|
||||
>
|
||||
<mat-icon
|
||||
*ngIf="
|
||||
!colorForm.get('color').value ||
|
||||
colorForm.get('color').value?.length === 0
|
||||
"
|
||||
*ngIf="!colorForm.get('color').value || colorForm.get('color').value?.length === 0"
|
||||
svgIcon="red:color-picker"
|
||||
></mat-icon>
|
||||
</div>
|
||||
@ -34,20 +28,11 @@
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
<button
|
||||
[disabled]="colorForm.invalid || !changed"
|
||||
color="primary"
|
||||
mat-flat-button
|
||||
type="submit"
|
||||
>
|
||||
<button [disabled]="colorForm.invalid || !changed" color="primary" mat-flat-button type="submit">
|
||||
{{ 'edit-color-dialog.save' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<redaction-circle-button
|
||||
class="dialog-close"
|
||||
icon="red:close"
|
||||
mat-dialog-close
|
||||
></redaction-circle-button>
|
||||
<redaction-circle-button class="dialog-close" icon="red:close" mat-dialog-close></redaction-circle-button>
|
||||
</section>
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { Colors, DictionaryControllerService } from '@redaction/red-ui-http';
|
||||
import { Toaster } from '../../../../services/toaster.service';
|
||||
import { Toaster } from '@services/toaster.service';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { DefaultColorType } from '@models/default-color-key.model';
|
||||
import { defaultColorsTranslations } from '../../translations/default-colors-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-edit-color-dialog',
|
||||
@ -12,8 +15,9 @@ import { TranslateService } from '@ngx-translate/core';
|
||||
})
|
||||
export class EditColorDialogComponent {
|
||||
readonly colors: Colors;
|
||||
readonly colorKey: string;
|
||||
readonly colorKey: DefaultColorType;
|
||||
colorForm: FormGroup;
|
||||
translations = defaultColorsTranslations;
|
||||
private readonly _initialColor: string;
|
||||
private readonly _dossierTemplateId: string;
|
||||
|
||||
@ -24,7 +28,7 @@ export class EditColorDialogComponent {
|
||||
private readonly _translateService: TranslateService,
|
||||
private readonly _dialogRef: MatDialogRef<EditColorDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA)
|
||||
private readonly _data: { colors: Colors; colorKey: string; dossierTemplateId: string }
|
||||
private readonly _data: { colors: Colors; colorKey: DefaultColorType; dossierTemplateId: string }
|
||||
) {
|
||||
this.colors = _data.colors;
|
||||
this.colorKey = _data.colorKey;
|
||||
@ -49,10 +53,10 @@ export class EditColorDialogComponent {
|
||||
try {
|
||||
await this._dictionaryControllerService.setColors(colors, this._dossierTemplateId).toPromise();
|
||||
this._dialogRef.close(true);
|
||||
const color = this._translateService.instant(`default-colors-screen.types.${this.colorKey}`);
|
||||
this._toaster.info('edit-color-dialog.success', { params: { color: color } });
|
||||
const color = this._translateService.instant(defaultColorsTranslations[this.colorKey]);
|
||||
this._toaster.info(_('edit-color-dialog.success'), { params: { color: color } });
|
||||
} catch (e) {
|
||||
this._toaster.error('edit-color-dialog.error');
|
||||
this._toaster.error(_('edit-color-dialog.error'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,23 +13,23 @@
|
||||
<ng-container *ngIf="screenStateService.areSomeEntitiesSelected$ | async">
|
||||
<redaction-circle-button
|
||||
[matMenuTriggerFor]="readOnlyMenu"
|
||||
[tooltip]="'file-attributes-csv-import.table-header.actions.read-only' | translate"
|
||||
icon="red:read-only"
|
||||
tooltip="file-attributes-csv-import.table-header.actions.read-only"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="deactivateSelection()"
|
||||
[tooltip]="'file-attributes-csv-import.table-header.actions.remove-selected' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="file-attributes-csv-import.table-header.actions.remove-selected"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<div class="separator"></div>
|
||||
|
||||
<redaction-chevron-button
|
||||
[label]="'file-attributes-csv-import.table-header.actions.type' | translate"
|
||||
[matMenuTriggerFor]="typeMenu"
|
||||
text="file-attributes-csv-import.table-header.actions.type"
|
||||
></redaction-chevron-button>
|
||||
|
||||
<mat-menu #readOnlyMenu="matMenu" class="padding-bottom-8">
|
||||
@ -47,7 +47,7 @@
|
||||
|
||||
<mat-menu #typeMenu="matMenu" class="padding-bottom-8">
|
||||
<button (click)="setAttributeForSelection('type', type)" *ngFor="let type of typeOptions" mat-menu-item>
|
||||
{{ 'file-attribute-types.' + type | translate }}
|
||||
{{ translations[type] | translate }}
|
||||
</button>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
@ -56,21 +56,24 @@
|
||||
<div class="table-header" redactionSyncWidth="table-item">
|
||||
<div class="select-oval-placeholder"></div>
|
||||
|
||||
<redaction-table-col-name class="name" label="file-attributes-csv-import.table-col-names.name"></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
[label]="'file-attributes-csv-import.table-col-names.name' | translate"
|
||||
class="name"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name label="file-attributes-csv-import.table-col-names.type"></redaction-table-col-name>
|
||||
<redaction-table-col-name [label]="'file-attributes-csv-import.table-col-names.type' | translate"></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'file-attributes-csv-import.table-col-names.read-only' | translate"
|
||||
class="flex-center"
|
||||
label="file-attributes-csv-import.table-col-names.read-only"
|
||||
leftIcon="red:read-only"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'file-attributes-csv-import.table-col-names.primary' | translate"
|
||||
[rightIconTooltip]="'file-attributes-csv-import.table-col-names.primary-info-tooltip' | translate"
|
||||
class="flex-center"
|
||||
label="file-attributes-csv-import.table-col-names.primary"
|
||||
rightIcon="red:status-info"
|
||||
rightIconTooltip="file-attributes-csv-import.table-col-names.primary-info-tooltip"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<div></div>
|
||||
@ -79,8 +82,8 @@
|
||||
|
||||
<redaction-empty-state
|
||||
*ngIf="screenStateService.noData$ | async"
|
||||
[text]="'file-attributes-csv-import.no-data.title' | translate"
|
||||
icon="red:attribute"
|
||||
screen="file-attributes-csv-import"
|
||||
></redaction-empty-state>
|
||||
|
||||
<cdk-virtual-scroll-viewport [itemSize]="50" redactionHasScrollbar>
|
||||
@ -106,22 +109,22 @@
|
||||
<redaction-circle-button
|
||||
(action)="field.editingName = true"
|
||||
*ngIf="!field.editingName"
|
||||
[tooltip]="'file-attributes-csv-import.action.edit-name' | translate"
|
||||
class="edit-name-button"
|
||||
icon="red:edit"
|
||||
tooltip="file-attributes-csv-import.action.edit-name"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
<ng-container *ngIf="field.editingName">
|
||||
<redaction-circle-button
|
||||
(action)="field.editingName = false; field.name = field.temporaryName"
|
||||
[tooltip]="'file-attributes-csv-import.action.save-name' | translate"
|
||||
icon="red:check"
|
||||
tooltip="file-attributes-csv-import.action.save-name"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
<redaction-circle-button
|
||||
(action)="field.editingName = false; field.temporaryName = field.name"
|
||||
[tooltip]="'file-attributes-csv-import.action.cancel-edit-name' | translate"
|
||||
icon="red:close"
|
||||
tooltip="file-attributes-csv-import.action.cancel-edit-name"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
</ng-container>
|
||||
@ -131,7 +134,7 @@
|
||||
<mat-form-field class="no-label">
|
||||
<mat-select [(ngModel)]="field.type">
|
||||
<mat-option *ngFor="let type of typeOptions" [value]="type">
|
||||
{{ 'file-attribute-types.' + type | translate }}
|
||||
{{ translations[type] | translate }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -148,8 +151,8 @@
|
||||
<redaction-circle-button
|
||||
(action)="field.primaryAttribute = false; toggleFieldActive.emit(field)"
|
||||
[removeTooltip]="true"
|
||||
[tooltip]="'file-attributes-csv-import.action.remove' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="file-attributes-csv-import.action.remove"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
|
||||
@ -6,6 +6,7 @@ import { SearchService } from '@shared/services/search.service';
|
||||
import { ScreenStateService } from '@shared/services/screen-state.service';
|
||||
import { SortingService } from '@services/sorting.service';
|
||||
import { BaseListingComponent } from '@shared/base/base-listing.component';
|
||||
import { fileAttributeTypesTranslations } from '../../../translations/file-attribute-types-translations';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-active-fields-listing',
|
||||
@ -18,6 +19,7 @@ export class ActiveFieldsListingComponent extends BaseListingComponent<Field> im
|
||||
@Output() entitiesChange = new EventEmitter<Field[]>();
|
||||
@Output() setHoveredColumn = new EventEmitter<string>();
|
||||
@Output() toggleFieldActive = new EventEmitter<Field>();
|
||||
translations = fileAttributeTypesTranslations;
|
||||
|
||||
readonly typeOptions = [FileAttributeConfig.TypeEnum.TEXT, FileAttributeConfig.TypeEnum.NUMBER, FileAttributeConfig.TypeEnum.DATE];
|
||||
protected readonly _primaryKey = 'csvColumn';
|
||||
|
||||
@ -51,8 +51,8 @@
|
||||
<redaction-circle-button
|
||||
(action)="readFile()"
|
||||
*ngIf="changedParseConfig"
|
||||
[tooltip]="'file-attributes-csv-import.parse-csv' | translate"
|
||||
icon="red:check"
|
||||
tooltip="file-attributes-csv-import.parse-csv"
|
||||
></redaction-circle-button>
|
||||
</form>
|
||||
</div>
|
||||
@ -91,7 +91,7 @@
|
||||
<div *ngIf="isSearchOpen" class="search-input-container">
|
||||
<redaction-input-with-action
|
||||
[form]="searchService.searchForm"
|
||||
placeholder="file-attributes-csv-import.search.placeholder"
|
||||
[placeholder]="'file-attributes-csv-import.search.placeholder' | translate"
|
||||
type="search"
|
||||
width="full"
|
||||
></redaction-input-with-action>
|
||||
@ -126,9 +126,7 @@
|
||||
class="center"
|
||||
>
|
||||
<div class="csv-part-header">
|
||||
<div class="all-caps-label">
|
||||
{{ 'file-attributes-csv-import.csv-column' + (previewExpanded ? '' : '-preview') | translate }}
|
||||
</div>
|
||||
<div [translate]="'file-attributes-csv-import.csv-column'" class="all-caps-label"></div>
|
||||
<redaction-circle-button
|
||||
(click)="previewExpanded = !previewExpanded"
|
||||
[icon]="previewExpanded ? 'red:expand' : 'red:collapse'"
|
||||
|
||||
@ -6,13 +6,14 @@ import * as Papa from 'papaparse';
|
||||
import { FileAttributeConfig, FileAttributesConfig, FileAttributesControllerService } from '@redaction/red-ui-http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map, startWith } from 'rxjs/operators';
|
||||
import { Toaster } from '../../../../services/toaster.service';
|
||||
import { Toaster } from '@services/toaster.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { FilterService } from '@shared/services/filter.service';
|
||||
import { SearchService } from '@shared/services/search.service';
|
||||
import { ScreenStateService } from '@shared/services/screen-state.service';
|
||||
import { SortingService } from '@services/sorting.service';
|
||||
import { BaseListingComponent } from '@shared/base/base-listing.component';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
export interface Field {
|
||||
id?: string;
|
||||
@ -203,9 +204,9 @@ export class FileAttributesCsvImportDialogComponent extends BaseListingComponent
|
||||
|
||||
try {
|
||||
await this._fileAttributesControllerService.setFileAttributesConfig(fileAttributes, this.dossierTemplateId).toPromise();
|
||||
this._toaster.success('file-attributes-csv-import.save.success', { params: { count: this.activeFields.length } });
|
||||
this._toaster.success(_('file-attributes-csv-import.save.success'), { params: { count: this.activeFields.length } });
|
||||
} catch (e) {
|
||||
this._toaster.error('file-attributes-csv-import.save.error');
|
||||
this._toaster.error(_('file-attributes-csv-import.save.error'));
|
||||
}
|
||||
|
||||
this.dialogRef.close(true);
|
||||
|
||||
@ -6,9 +6,9 @@
|
||||
<div class="red-input-group required w-300">
|
||||
<label translate="smtp-auth-config.form.username"></label>
|
||||
<input
|
||||
[placeholder]="'smtp-auth-config.form.username-placeholder' | translate"
|
||||
formControlName="user"
|
||||
name="user"
|
||||
placeholder="{{ 'smtp-auth-config.form.username-placeholder' | translate }}"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
@ -23,17 +23,9 @@
|
||||
<button [disabled]="authForm.invalid" color="primary" mat-flat-button type="submit">
|
||||
{{ 'smtp-auth-config.actions.save' | translate }}
|
||||
</button>
|
||||
<div
|
||||
class="all-caps-label cancel"
|
||||
mat-dialog-close
|
||||
translate="smtp-auth-config.actions.cancel"
|
||||
></div>
|
||||
<div class="all-caps-label cancel" mat-dialog-close translate="smtp-auth-config.actions.cancel"></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<redaction-circle-button
|
||||
class="dialog-close"
|
||||
icon="red:close"
|
||||
mat-dialog-close
|
||||
></redaction-circle-button>
|
||||
<redaction-circle-button class="dialog-close" icon="red:close" mat-dialog-close></redaction-circle-button>
|
||||
</section>
|
||||
|
||||
@ -10,10 +10,10 @@
|
||||
<div class="actions">
|
||||
<redaction-circle-button
|
||||
*ngIf="permissionsService.isUser()"
|
||||
[tooltip]="'common.close' | translate"
|
||||
class="ml-6"
|
||||
icon="red:close"
|
||||
redactionNavigateLastDossiersScreen
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -35,7 +35,7 @@
|
||||
<mat-form-field class="no-label">
|
||||
<mat-select formControlName="category">
|
||||
<mat-option *ngFor="let category of categories" [value]="category">
|
||||
{{ 'audit-screen.categories.' + category | translate }}
|
||||
{{ translations[category] | translate }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -87,18 +87,31 @@
|
||||
</div>
|
||||
|
||||
<div class="table-header" redactionSyncWidth="table-item">
|
||||
<redaction-table-col-name column="message" label="audit-screen.table-col-names.message"></redaction-table-col-name>
|
||||
<redaction-table-col-name column="date" label="audit-screen.table-col-names.date"></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
[label]="'audit-screen.table-col-names.message' | translate"
|
||||
column="message"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
[label]="'audit-screen.table-col-names.date' | translate"
|
||||
column="date"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
[label]="'audit-screen.table-col-names.user' | translate"
|
||||
class="user-column"
|
||||
column="user"
|
||||
label="audit-screen.table-col-names.user"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name column="category" label="audit-screen.table-col-names.category"></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
[label]="'audit-screen.table-col-names.category' | translate"
|
||||
column="category"
|
||||
></redaction-table-col-name>
|
||||
<div class="scrollbar-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<redaction-empty-state *ngIf="!logs?.totalHits" icon="red:document" screen="audit-screen"></redaction-empty-state>
|
||||
<redaction-empty-state
|
||||
*ngIf="!logs?.totalHits"
|
||||
[text]="'audit-screen.no-data.title' | translate"
|
||||
icon="red:document"
|
||||
></redaction-empty-state>
|
||||
|
||||
<cdk-virtual-scroll-viewport [itemSize]="80" redactionHasScrollbar>
|
||||
<div *cdkVirtualFor="let log of logs?.data" class="table-item">
|
||||
@ -111,7 +124,7 @@
|
||||
<div class="user-column">
|
||||
<redaction-initials-avatar [userId]="log.userId" [withName]="true" size="small"></redaction-initials-avatar>
|
||||
</div>
|
||||
<div [translate]="'audit-screen.categories.' + log.category"></div>
|
||||
<div [translate]="translations[log.category]"></div>
|
||||
<div class="scrollbar-placeholder"></div>
|
||||
</div>
|
||||
</cdk-virtual-scroll-viewport>
|
||||
|
||||
@ -4,8 +4,10 @@ import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { AuditControllerService, AuditResponse, AuditSearchRequest } from '@redaction/red-ui-http';
|
||||
import { Moment } from 'moment';
|
||||
import { applyIntervalConstraints } from '@utils/date-inputs-utils';
|
||||
import { LoadingService } from '../../../../services/loading.service';
|
||||
import { AutoUnsubscribeComponent } from '../../../shared/base/auto-unsubscribe.component';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
import { AutoUnsubscribeComponent } from '@shared/base/auto-unsubscribe.component';
|
||||
import { auditCategoriesTranslations } from '../../translations/audit-categories-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
const PAGE_SIZE = 50;
|
||||
|
||||
@ -15,8 +17,9 @@ const PAGE_SIZE = 50;
|
||||
styleUrls: ['./audit-screen.component.scss']
|
||||
})
|
||||
export class AuditScreenComponent extends AutoUnsubscribeComponent implements OnDestroy {
|
||||
readonly ALL_CATEGORIES = 'all-categories';
|
||||
readonly ALL_USERS = 'audit-screen.all-users';
|
||||
readonly ALL_CATEGORIES = 'allCategories';
|
||||
readonly ALL_USERS = _('audit-screen.all-users');
|
||||
translations = auditCategoriesTranslations;
|
||||
|
||||
filterForm: FormGroup;
|
||||
categories: string[] = [];
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
|
||||
<redaction-circle-button
|
||||
[routerLink]="['../..']"
|
||||
[tooltip]="'common.close' | translate"
|
||||
icon="red:close"
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="red-content-inner">
|
||||
<div class="overlay-shadow"></div>
|
||||
|
||||
<redaction-admin-side-nav type="dossier-templates"></redaction-admin-side-nav>
|
||||
<redaction-admin-side-nav type="dossierTemplates"></redaction-admin-side-nav>
|
||||
|
||||
<div class="content-container">
|
||||
<div class="header-item">
|
||||
@ -28,14 +28,14 @@
|
||||
|
||||
<div class="table-header" redactionSyncWidth="table-item">
|
||||
<redaction-table-col-name
|
||||
[label]="'default-colors-screen.table-col-names.key' | translate"
|
||||
[withSort]="true"
|
||||
column="key"
|
||||
label="default-colors-screen.table-col-names.key"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'default-colors-screen.table-col-names.color' | translate"
|
||||
class="flex-center"
|
||||
label="default-colors-screen.table-col-names.color"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<div></div>
|
||||
@ -46,7 +46,7 @@
|
||||
<!-- Table lines -->
|
||||
<div *cdkVirtualFor="let color of sortedDisplayedEntities$ | async; trackBy: trackByPrimaryKey" class="table-item">
|
||||
<div>
|
||||
<div [translate]="'default-colors-screen.types.' + color.key" class="table-item-title heading"></div>
|
||||
<div [translate]="translations[color.key]" class="table-item-title heading"></div>
|
||||
</div>
|
||||
|
||||
<div class="color-wrapper">
|
||||
@ -58,8 +58,8 @@
|
||||
<redaction-circle-button
|
||||
(action)="openEditColorDialog($event, color)"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[tooltip]="'default-colors-screen.action.edit' | translate"
|
||||
icon="red:edit"
|
||||
tooltip="default-colors-screen.action.edit"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
|
||||
@ -9,7 +9,9 @@ import { FilterService } from '@shared/services/filter.service';
|
||||
import { SearchService } from '@shared/services/search.service';
|
||||
import { ScreenStateService } from '@shared/services/screen-state.service';
|
||||
import { BaseListingComponent } from '@shared/base/base-listing.component';
|
||||
import { SortingService } from '../../../../services/sorting.service';
|
||||
import { DefaultColorType } from '@models/default-color-key.model';
|
||||
import { SortingService } from '@services/sorting.service';
|
||||
import { defaultColorsTranslations } from '../../translations/default-colors-translations';
|
||||
|
||||
@Component({
|
||||
templateUrl: './default-colors-screen.component.html',
|
||||
@ -24,8 +26,9 @@ export class DefaultColorsScreenComponent
|
||||
}>
|
||||
implements OnInit
|
||||
{
|
||||
private _colorsObj: Colors;
|
||||
translations = defaultColorsTranslations;
|
||||
protected readonly _primaryKey = 'key';
|
||||
private _colorsObj: Colors;
|
||||
|
||||
constructor(
|
||||
private readonly _appStateService: AppStateService,
|
||||
@ -44,7 +47,7 @@ export class DefaultColorsScreenComponent
|
||||
await this._loadColors();
|
||||
}
|
||||
|
||||
openEditColorDialog($event: any, color: { key: string; value: string }) {
|
||||
openEditColorDialog($event: any, color: { key: DefaultColorType | string; value: string }) {
|
||||
this._dialogService.openDialog(
|
||||
'editColor',
|
||||
$event,
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
|
||||
<redaction-circle-button
|
||||
[routerLink]="['../..']"
|
||||
[tooltip]="'common.close' | translate"
|
||||
icon="red:close"
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="red-content-inner">
|
||||
<div class="overlay-shadow"></div>
|
||||
|
||||
<redaction-admin-side-nav type="dossier-templates"></redaction-admin-side-nav>
|
||||
<redaction-admin-side-nav type="dossierTemplates"></redaction-admin-side-nav>
|
||||
|
||||
<div class="content-container">
|
||||
<div class="header-item">
|
||||
@ -36,23 +36,23 @@
|
||||
<redaction-circle-button
|
||||
(action)="openDeleteDictionariesDialog($event)"
|
||||
*ngIf="canBulkDelete$(permissionsService.isAdmin()) | async"
|
||||
[tooltip]="'dictionary-listing.bulk.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="dictionary-listing.bulk.delete"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<div class="attributes-actions-container">
|
||||
<redaction-input-with-action
|
||||
[form]="searchService.searchForm"
|
||||
placeholder="dictionary-listing.search"
|
||||
[placeholder]="'dictionary-listing.search' | translate"
|
||||
type="search"
|
||||
></redaction-input-with-action>
|
||||
<div class="actions">
|
||||
<redaction-icon-button
|
||||
(action)="openAddEditDictionaryDialog()"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[label]="'dictionary-listing.add-new' | translate"
|
||||
icon="red:plus"
|
||||
text="dictionary-listing.add-new"
|
||||
type="primary"
|
||||
></redaction-icon-button>
|
||||
</div>
|
||||
@ -63,21 +63,21 @@
|
||||
<div class="select-oval-placeholder"></div>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'dictionary-listing.table-col-names.type' | translate"
|
||||
[withSort]="true"
|
||||
column="label"
|
||||
label="dictionary-listing.table-col-names.type"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'dictionary-listing.table-col-names.order-of-importance' | translate"
|
||||
[withSort]="true"
|
||||
class="flex-center"
|
||||
column="rank"
|
||||
label="dictionary-listing.table-col-names.order-of-importance"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'dictionary-listing.table-col-names.hint-redaction' | translate"
|
||||
class="flex-center"
|
||||
label="dictionary-listing.table-col-names.hint-redaction"
|
||||
></redaction-table-col-name>
|
||||
<div></div>
|
||||
<div class="scrollbar-placeholder"></div>
|
||||
@ -86,12 +86,16 @@
|
||||
<redaction-empty-state
|
||||
(action)="openAddEditDictionaryDialog()"
|
||||
*ngIf="screenStateService.noData$ | async"
|
||||
[buttonLabel]="'dictionary-listing.no-data.action' | translate"
|
||||
[showButton]="permissionsService.isAdmin()"
|
||||
[text]="'dictionary-listing.no-data.title' | translate"
|
||||
icon="red:dictionary"
|
||||
screen="dictionary-listing"
|
||||
></redaction-empty-state>
|
||||
|
||||
<redaction-empty-state *ngIf="noMatch$ | async" screen="dictionary-listing" type="no-match"></redaction-empty-state>
|
||||
<redaction-empty-state
|
||||
*ngIf="noMatch$ | async"
|
||||
[text]="'dictionary-listing.no-match.title' | translate"
|
||||
></redaction-empty-state>
|
||||
|
||||
<cdk-virtual-scroll-viewport [itemSize]="80" redactionHasScrollbar>
|
||||
<div
|
||||
@ -134,15 +138,15 @@
|
||||
<div *ngIf="permissionsService.isAdmin()" class="action-buttons">
|
||||
<redaction-circle-button
|
||||
(action)="openDeleteDictionariesDialog($event, [dict])"
|
||||
[tooltip]="'dictionary-listing.action.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="dictionary-listing.action.delete"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="openAddEditDictionaryDialog($event, dict)"
|
||||
[tooltip]="'dictionary-listing.action.edit' | translate"
|
||||
icon="red:edit"
|
||||
tooltip="dictionary-listing.action.edit"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -159,7 +163,7 @@
|
||||
[counterText]="'dictionary-listing.stats.charts.entries' | translate"
|
||||
[radius]="82"
|
||||
[strokeWidth]="15"
|
||||
[subtitle]="'dictionary-listing.stats.charts.types'"
|
||||
[subtitle]="'dictionary-listing.stats.charts.types' | translate"
|
||||
totalType="count"
|
||||
></redaction-simple-doughnut-chart>
|
||||
</div>
|
||||
|
||||
@ -12,7 +12,7 @@ import { LoadingService } from '@services/loading.service';
|
||||
import { FilterService } from '@shared/services/filter.service';
|
||||
import { SearchService } from '@shared/services/search.service';
|
||||
import { ScreenStateService } from '@shared/services/screen-state.service';
|
||||
import { SortingService } from '../../../../services/sorting.service';
|
||||
import { SortingService } from '@services/sorting.service';
|
||||
import { BaseListingComponent } from '@shared/base/base-listing.component';
|
||||
import { AdminDialogService } from '../../services/admin-dialog.service';
|
||||
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
<redaction-circle-button
|
||||
(action)="openDeleteDictionaryDialog($event)"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[tooltip]="'dictionary-overview.action.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="dictionary-overview.action.delete"
|
||||
tooltipPosition="below"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
@ -15,24 +15,24 @@
|
||||
<redaction-circle-button
|
||||
(action)="openEditDictionaryDialog($event)"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[tooltip]="'dictionary-overview.action.edit' | translate"
|
||||
icon="red:edit"
|
||||
tooltip="dictionary-overview.action.edit"
|
||||
tooltipPosition="below"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="download()"
|
||||
[tooltip]="'dictionary-overview.action.download' | translate"
|
||||
icon="red:download"
|
||||
tooltip="dictionary-overview.action.download"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="fileInput.click()"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[tooltip]="'dictionary-overview.action.upload' | translate"
|
||||
icon="red:upload"
|
||||
tooltip="dictionary-overview.action.upload"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
|
||||
@ -40,9 +40,9 @@
|
||||
|
||||
<redaction-circle-button
|
||||
[routerLink]="['..']"
|
||||
[tooltip]="'common.close' | translate"
|
||||
class="ml-6"
|
||||
icon="red:close"
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -51,7 +51,7 @@
|
||||
<div class="flex red-content-inner">
|
||||
<div class="overlay-shadow"></div>
|
||||
|
||||
<redaction-admin-side-nav type="dossier-templates"></redaction-admin-side-nav>
|
||||
<redaction-admin-side-nav type="dossierTemplates"></redaction-admin-side-nav>
|
||||
|
||||
<redaction-dictionary-manager
|
||||
#dictionaryManager
|
||||
|
||||
@ -18,8 +18,9 @@
|
||||
<redaction-empty-state
|
||||
(action)="fileInput.click()"
|
||||
*ngIf="!hasDigitalSignatureSet"
|
||||
[buttonLabel]="'digital-signature-screen.no-data.action' | translate"
|
||||
[text]="'digital-signature-screen.no-data.title' | translate"
|
||||
buttonIcon="red:upload"
|
||||
screen="digital-signature-screen"
|
||||
></redaction-empty-state>
|
||||
|
||||
<div [class.hidden]="!hasDigitalSignatureSet" class="red-input-group required w-300">
|
||||
@ -75,16 +76,16 @@
|
||||
<redaction-icon-button
|
||||
(action)="saveDigitalSignature()"
|
||||
[disabled]="digitalSignatureForm.invalid"
|
||||
[label]="'digital-signature-screen.action.save' | translate"
|
||||
icon="red:check"
|
||||
text="digital-signature-screen.action.save"
|
||||
type="primary"
|
||||
></redaction-icon-button>
|
||||
|
||||
<redaction-icon-button
|
||||
(action)="removeDigitalSignature()"
|
||||
*ngIf="digitalSignatureExists"
|
||||
[label]="'digital-signature-screen.action.delete' | translate"
|
||||
icon="red:trash"
|
||||
text="digital-signature-screen.action.delete"
|
||||
type="primary"
|
||||
></redaction-icon-button>
|
||||
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { DigitalSignature, DigitalSignatureControllerService } from '@redaction/red-ui-http';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { Toaster } from '../../../../services/toaster.service';
|
||||
import { Toaster } from '@services/toaster.service';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { lastIndexOfEnd } from '@utils/functions';
|
||||
import { AutoUnsubscribeComponent } from '../../../shared/base/auto-unsubscribe.component';
|
||||
import { LoadingService } from '../../../../services/loading.service';
|
||||
import { AutoUnsubscribeComponent } from '@shared/base/auto-unsubscribe.component';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-digital-signature-screen',
|
||||
@ -47,13 +48,13 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribeComponent im
|
||||
this.addSubscription = observable.subscribe(
|
||||
() => {
|
||||
this.loadDigitalSignatureAndInitializeForm();
|
||||
this._toaster.success('digital-signature-screen.action.save-success');
|
||||
this._toaster.success(_('digital-signature-screen.action.save-success'));
|
||||
},
|
||||
error => {
|
||||
if (error.status === 400) {
|
||||
this._toaster.error('digital-signature-screen.action.certificate-not-valid-error');
|
||||
this._toaster.error(_('digital-signature-screen.action.certificate-not-valid-error'));
|
||||
} else {
|
||||
this._toaster.error('digital-signature-screen.action.save-error');
|
||||
this._toaster.error(_('digital-signature-screen.action.save-error'));
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -63,9 +64,9 @@ export class DigitalSignatureScreenComponent extends AutoUnsubscribeComponent im
|
||||
this.addSubscription = this._digitalSignatureControllerService.deleteDigitalSignature().subscribe(
|
||||
() => {
|
||||
this.loadDigitalSignatureAndInitializeForm();
|
||||
this._toaster.success('digital-signature-screen.action.delete-success');
|
||||
this._toaster.success(_('digital-signature-screen.action.delete-success'));
|
||||
},
|
||||
() => this._toaster.error('digital-signature-screen.action.delete-error')
|
||||
() => this._toaster.error(_('digital-signature-screen.action.delete-error'))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
|
||||
<redaction-circle-button
|
||||
[routerLink]="['../..']"
|
||||
[tooltip]="'common.close' | translate"
|
||||
icon="red:close"
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="red-content-inner">
|
||||
<div class="overlay-shadow"></div>
|
||||
|
||||
<redaction-admin-side-nav type="dossier-templates"></redaction-admin-side-nav>
|
||||
<redaction-admin-side-nav type="dossierTemplates"></redaction-admin-side-nav>
|
||||
|
||||
<div class="content-container">
|
||||
<div *ngIf="(screenStateService.noData$ | async) === false" class="header-item">
|
||||
@ -39,23 +39,23 @@
|
||||
<redaction-circle-button
|
||||
(action)="openConfirmDeleteAttributeDialog($event)"
|
||||
*ngIf="permissionsService.isAdmin() && screenStateService.areSomeEntitiesSelected$ | async"
|
||||
[tooltip]="'dossier-attributes-listing.bulk.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="dossier-attributes-listing.bulk.delete"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<div class="attributes-actions-container">
|
||||
<redaction-input-with-action
|
||||
[form]="searchService.searchForm"
|
||||
placeholder="dossier-attributes-listing.search"
|
||||
[placeholder]="'dossier-attributes-listing.search' | translate"
|
||||
type="search"
|
||||
></redaction-input-with-action>
|
||||
|
||||
<redaction-icon-button
|
||||
(action)="openAddEditAttributeDialog($event)"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[label]="'dossier-attributes-listing.add-new' | translate"
|
||||
icon="red:plus"
|
||||
text="dossier-attributes-listing.add-new"
|
||||
type="primary"
|
||||
></redaction-icon-button>
|
||||
</div>
|
||||
@ -65,16 +65,21 @@
|
||||
<div class="select-oval-placeholder"></div>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'dossier-attributes-listing.table-col-names.label' | translate"
|
||||
[withSort]="true"
|
||||
column="label"
|
||||
label="dossier-attributes-listing.table-col-names.label"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name label="dossier-attributes-listing.table-col-names.placeholder"></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'dossier-attributes-listing.table-col-names.placeholder' | translate"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'dossier-attributes-listing.table-col-names.type' | translate"
|
||||
[withSort]="true"
|
||||
column="type"
|
||||
label="dossier-attributes-listing.table-col-names.type"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<div></div>
|
||||
<div class="scrollbar-placeholder"></div>
|
||||
</div>
|
||||
@ -82,12 +87,16 @@
|
||||
<redaction-empty-state
|
||||
(action)="openAddEditAttributeDialog($event)"
|
||||
*ngIf="screenStateService.noData$ | async"
|
||||
[buttonLabel]="'dossier-attributes-listing.no-data.action' | translate"
|
||||
[showButton]="permissionsService.isAdmin()"
|
||||
[text]="'dossier-attributes-listing.no-data.title' | translate"
|
||||
icon="red:attribute"
|
||||
screen="dossier-attributes-listing"
|
||||
></redaction-empty-state>
|
||||
|
||||
<redaction-empty-state *ngIf="noMatch$ | async" screen="dossier-attributes-listing" type="no-match"></redaction-empty-state>
|
||||
<redaction-empty-state
|
||||
*ngIf="noMatch$ | async"
|
||||
[text]="'dossier-attributes-listing.no-match.title' | translate"
|
||||
></redaction-empty-state>
|
||||
|
||||
<cdk-virtual-scroll-viewport [itemSize]="50" redactionHasScrollbar>
|
||||
<div
|
||||
@ -107,21 +116,21 @@
|
||||
</div>
|
||||
|
||||
<div class="small-label">
|
||||
{{ 'dossier-attribute-types.' + attribute.type | translate }}
|
||||
{{ translations[attribute.type] | translate }}
|
||||
</div>
|
||||
<div class="actions-container">
|
||||
<div *ngIf="permissionsService.isAdmin()" class="action-buttons">
|
||||
<redaction-circle-button
|
||||
(action)="openAddEditAttributeDialog($event, attribute)"
|
||||
[tooltip]="'dossier-attributes-listing.action.edit' | translate"
|
||||
icon="red:edit"
|
||||
tooltip="dossier-attributes-listing.action.edit"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="openConfirmDeleteAttributeDialog($event, attribute)"
|
||||
[tooltip]="'dossier-attributes-listing.action.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="file-attributes-listing.action.delete"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
|
||||
@ -5,12 +5,13 @@ import { AppStateService } from '@state/app-state.service';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { AdminDialogService } from '../../services/admin-dialog.service';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
import { SortingService } from '../../../../services/sorting.service';
|
||||
import { SortingService } from '@services/sorting.service';
|
||||
import { FilterService } from '@shared/services/filter.service';
|
||||
import { SearchService } from '@shared/services/search.service';
|
||||
import { ScreenStateService } from '@shared/services/screen-state.service';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { DossierAttributesService } from '@shared/services/controller-wrappers/dossier-attributes.service';
|
||||
import { dossierAttributeTypesTranslations } from '../../translations/dossier-attribute-types-translations';
|
||||
|
||||
@Component({
|
||||
templateUrl: './dossier-attributes-listing-screen.component.html',
|
||||
@ -18,6 +19,7 @@ import { DossierAttributesService } from '@shared/services/controller-wrappers/d
|
||||
providers: [FilterService, SearchService, ScreenStateService, SortingService]
|
||||
})
|
||||
export class DossierAttributesListingScreenComponent extends BaseListingComponent<DossierAttributeConfig> implements OnInit {
|
||||
translations = dossierAttributeTypesTranslations;
|
||||
protected readonly _primaryKey = 'label';
|
||||
|
||||
constructor(
|
||||
|
||||
@ -30,23 +30,23 @@
|
||||
<redaction-circle-button
|
||||
(action)="openDeleteTemplatesDialog($event)"
|
||||
*ngIf="canBulkDelete$(permissionsService.isAdmin()) | async"
|
||||
[tooltip]="'dossier-templates-listing.bulk.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="dossier-templates-listing.bulk.delete"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<div class="actions flex-1">
|
||||
<redaction-input-with-action
|
||||
[form]="searchService.searchForm"
|
||||
placeholder="dossier-templates-listing.search"
|
||||
[placeholder]="'dossier-templates-listing.search' | translate"
|
||||
type="search"
|
||||
></redaction-input-with-action>
|
||||
|
||||
<redaction-icon-button
|
||||
(action)="openAddDossierTemplateDialog()"
|
||||
*ngIf="permissionsService.isAdmin() && userPreferenceService.areDevFeaturesEnabled"
|
||||
[label]="'dossier-templates-listing.add-new' | translate"
|
||||
icon="red:plus"
|
||||
text="dossier-templates-listing.add-new"
|
||||
type="primary"
|
||||
></redaction-icon-button>
|
||||
</div>
|
||||
@ -56,23 +56,23 @@
|
||||
<div class="select-oval-placeholder"></div>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'dossier-templates-listing.table-col-names.name' | translate"
|
||||
[withSort]="true"
|
||||
column="name"
|
||||
label="dossier-templates-listing.table-col-names.name"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
[label]="'dossier-templates-listing.table-col-names.created-by' | translate"
|
||||
class="user-column"
|
||||
label="dossier-templates-listing.table-col-names.created-by"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
[label]="'dossier-templates-listing.table-col-names.created-on' | translate"
|
||||
[withSort]="true"
|
||||
column="dateAdded"
|
||||
label="dossier-templates-listing.table-col-names.created-on"
|
||||
></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
[label]="'dossier-templates-listing.table-col-names.modified-on' | translate"
|
||||
[withSort]="true"
|
||||
column="dateModified"
|
||||
label="dossier-templates-listing.table-col-names.modified-on"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<div class="scrollbar-placeholder"></div>
|
||||
@ -80,11 +80,14 @@
|
||||
|
||||
<redaction-empty-state
|
||||
*ngIf="screenStateService.noData$ | async"
|
||||
[text]="'dossier-templates-listing.no-data.title' | translate"
|
||||
icon="red:template"
|
||||
screen="dossier-templates-listing"
|
||||
></redaction-empty-state>
|
||||
|
||||
<redaction-empty-state *ngIf="noMatch$ | async" screen="dossier-templates-listing" type="no-match"></redaction-empty-state>
|
||||
<redaction-empty-state
|
||||
*ngIf="noMatch$ | async"
|
||||
[text]="'dossier-templates-listing.no-match.title' | translate"
|
||||
></redaction-empty-state>
|
||||
|
||||
<cdk-virtual-scroll-viewport [itemSize]="80" redactionHasScrollbar>
|
||||
<div
|
||||
|
||||
@ -10,7 +10,7 @@ import { FilterService } from '@shared/services/filter.service';
|
||||
import { SearchService } from '@shared/services/search.service';
|
||||
import { ScreenStateService } from '@shared/services/screen-state.service';
|
||||
import { BaseListingComponent } from '@shared/base/base-listing.component';
|
||||
import { SortingService } from '../../../../services/sorting.service';
|
||||
import { SortingService } from '@services/sorting.service';
|
||||
|
||||
@Component({
|
||||
templateUrl: './dossier-templates-listing-screen.component.html',
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
|
||||
<redaction-circle-button
|
||||
[routerLink]="['../..']"
|
||||
[tooltip]="'common.close' | translate"
|
||||
icon="red:close"
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="red-content-inner">
|
||||
<div class="overlay-shadow"></div>
|
||||
|
||||
<redaction-admin-side-nav type="dossier-templates"></redaction-admin-side-nav>
|
||||
<redaction-admin-side-nav type="dossierTemplates"></redaction-admin-side-nav>
|
||||
|
||||
<div class="content-container">
|
||||
<div class="header-item">
|
||||
@ -38,15 +38,15 @@
|
||||
<redaction-circle-button
|
||||
(click)="openConfirmDeleteAttributeDialog($event)"
|
||||
*ngIf="canBulkDelete$(permissionsService.isAdmin()) | async"
|
||||
[tooltip]="'file-attributes-listing.bulk-actions.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="file-attributes-listing.bulk-actions.delete"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<div class="attributes-actions-container">
|
||||
<redaction-input-with-action
|
||||
[form]="searchService.searchForm"
|
||||
placeholder="file-attributes-listing.search"
|
||||
[placeholder]="'file-attributes-listing.search' | translate"
|
||||
type="search"
|
||||
></redaction-input-with-action>
|
||||
<input #fileInput (change)="importCSV($event.target['files'])" accept=".csv" class="csv-input" type="file" />
|
||||
@ -54,8 +54,8 @@
|
||||
<redaction-circle-button
|
||||
(action)="fileInput.click()"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[tooltip]="'file-attributes-listing.upload-csv' | translate"
|
||||
icon="red:upload"
|
||||
tooltip="file-attributes-listing.upload-csv"
|
||||
tooltipPosition="above"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
@ -63,8 +63,8 @@
|
||||
<redaction-icon-button
|
||||
(action)="openAddEditAttributeDialog($event)"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[label]="'file-attributes-listing.add-new' | translate"
|
||||
icon="red:plus"
|
||||
text="file-attributes-listing.add-new"
|
||||
type="primary"
|
||||
></redaction-icon-button>
|
||||
</div>
|
||||
@ -74,31 +74,33 @@
|
||||
<div class="select-oval-placeholder"></div>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'file-attributes-listing.table-col-names.name' | translate"
|
||||
[withSort]="true"
|
||||
column="label"
|
||||
label="file-attributes-listing.table-col-names.name"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'file-attributes-listing.table-col-names.type' | translate"
|
||||
[withSort]="true"
|
||||
column="type"
|
||||
label="file-attributes-listing.table-col-names.type"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'file-attributes-listing.table-col-names.read-only' | translate"
|
||||
[withSort]="true"
|
||||
class="flex-center"
|
||||
column="editable"
|
||||
label="file-attributes-listing.table-col-names.read-only"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name label="file-attributes-listing.table-col-names.csv-column"></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
[label]="'file-attributes-listing.table-col-names.csv-column' | translate"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name
|
||||
[label]="'file-attributes-listing.table-col-names.primary' | translate"
|
||||
[rightIconTooltip]="'file-attributes-listing.table-col-names.primary-info-tooltip' | translate"
|
||||
class="flex-center"
|
||||
label="file-attributes-listing.table-col-names.primary"
|
||||
rightIcon="red:status-info"
|
||||
rightIconTooltip="file-attributes-listing.table-col-names.primary-info-tooltip"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<div></div>
|
||||
@ -108,11 +110,14 @@
|
||||
|
||||
<redaction-empty-state
|
||||
*ngIf="screenStateService.noData$ | async"
|
||||
[text]="'file-attributes-listing.no-data.title' | translate"
|
||||
icon="red:attribute"
|
||||
screen="file-attributes-listing"
|
||||
></redaction-empty-state>
|
||||
|
||||
<redaction-empty-state *ngIf="noMatch$ | async" screen="file-attributes-listing" type="no-match"></redaction-empty-state>
|
||||
<redaction-empty-state
|
||||
*ngIf="noMatch$ | async"
|
||||
[text]="'file-attributes-listing.no-match.title' | translate"
|
||||
></redaction-empty-state>
|
||||
|
||||
<cdk-virtual-scroll-viewport [itemSize]="80" redactionHasScrollbar>
|
||||
<!-- Table lines -->
|
||||
@ -125,7 +130,7 @@
|
||||
<span>{{ attribute.label }}</span>
|
||||
</div>
|
||||
|
||||
<div [translate]="'file-attribute-types.' + attribute.type" class="small-label"></div>
|
||||
<div [translate]="translations[attribute.type]" class="small-label"></div>
|
||||
|
||||
<div class="center read-only">
|
||||
<mat-icon
|
||||
@ -145,15 +150,15 @@
|
||||
<div *ngIf="permissionsService.isAdmin()" class="action-buttons">
|
||||
<redaction-circle-button
|
||||
(action)="openAddEditAttributeDialog($event, attribute)"
|
||||
[tooltip]="'file-attributes-listing.action.edit' | translate"
|
||||
icon="red:edit"
|
||||
tooltip="file-attributes-listing.action.edit"
|
||||
type="dark-bg"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
<redaction-circle-button
|
||||
(action)="openConfirmDeleteAttributeDialog($event, attribute)"
|
||||
[tooltip]="'file-attributes-listing.action.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="file-attributes-listing.action.delete"
|
||||
type="dark-bg"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
|
||||
@ -8,8 +8,9 @@ import { LoadingService } from '@services/loading.service';
|
||||
import { FilterService } from '@shared/services/filter.service';
|
||||
import { SearchService } from '@shared/services/search.service';
|
||||
import { ScreenStateService } from '@shared/services/screen-state.service';
|
||||
import { SortingService } from '../../../../services/sorting.service';
|
||||
import { SortingService } from '@services/sorting.service';
|
||||
import { BaseListingComponent } from '@shared/base/base-listing.component';
|
||||
import { fileAttributeTypesTranslations } from '../../translations/file-attribute-types-translations';
|
||||
|
||||
@Component({
|
||||
templateUrl: './file-attributes-listing-screen.component.html',
|
||||
@ -18,8 +19,8 @@ import { BaseListingComponent } from '@shared/base/base-listing.component';
|
||||
providers: [FilterService, SearchService, ScreenStateService, SortingService]
|
||||
})
|
||||
export class FileAttributesListingScreenComponent extends BaseListingComponent<FileAttributeConfig> implements OnInit, OnDestroy {
|
||||
translations = fileAttributeTypesTranslations;
|
||||
protected readonly _primaryKey = 'label';
|
||||
|
||||
private _existingConfiguration: FileAttributesConfig;
|
||||
@ViewChild('fileInput') private _fileInput: ElementRef;
|
||||
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
<redaction-icon-button
|
||||
(action)="testConnection()"
|
||||
[disabled]="smtpForm.invalid"
|
||||
text="general-config-screen.actions.test-connection"
|
||||
[label]="'general-config-screen.actions.test-connection' | translate"
|
||||
type="show-bg"
|
||||
></redaction-icon-button>
|
||||
</div>
|
||||
|
||||
@ -12,6 +12,7 @@ import { AppConfigService } from '../../../app-config/app-config.service';
|
||||
import { AutoUnsubscribeComponent } from '../../../shared/base/auto-unsubscribe.component';
|
||||
import { Toaster } from '../../../../services/toaster.service';
|
||||
import { LoadingService } from '../../../../services/loading.service';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-general-config-screen',
|
||||
@ -57,7 +58,7 @@ export class GeneralConfigScreenComponent extends AutoUnsubscribeComponent imple
|
||||
password: [undefined]
|
||||
});
|
||||
|
||||
this.addSubscription = this.configForm.controls.auth.valueChanges.subscribe(auth => {
|
||||
this.addSubscription = this.smtpForm.controls.auth.valueChanges.subscribe(auth => {
|
||||
if (auth) {
|
||||
this.openAuthConfigDialog();
|
||||
}
|
||||
@ -124,9 +125,9 @@ export class GeneralConfigScreenComponent extends AutoUnsubscribeComponent imple
|
||||
this._loadingService.start();
|
||||
try {
|
||||
await this._smtpConfigService.testSMTPConfiguration(this.smtpForm.getRawValue()).toPromise();
|
||||
this._toaster.success('smtp-config-screen.test.success');
|
||||
this._toaster.success(_('general-config-screen.test.success'));
|
||||
} catch (e) {
|
||||
this._toaster.error('smtp-config-screen.test.error');
|
||||
this._toaster.error(_('general-config-screen.test.error'));
|
||||
} finally {
|
||||
this._loadingService.stop();
|
||||
}
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
|
||||
<div>
|
||||
<redaction-page-header
|
||||
[buttonConfigs]="buttonConfigs"
|
||||
[pageLabel]="'license-information' | translate"
|
||||
[showCloseButton]="permissionsService.isUser()"
|
||||
[buttonConfigs]="buttonConfigs"
|
||||
></redaction-page-header>
|
||||
|
||||
<div class="red-content-inner">
|
||||
|
||||
@ -4,9 +4,10 @@ import { LicenseReport, LicenseReportControllerService } from '@redaction/red-ui
|
||||
import { AppConfigService } from '@app-config/app-config.service';
|
||||
import * as moment from 'moment';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { LoadingService } from '../../../../services/loading.service';
|
||||
import { ButtonConfig } from '../../../shared/components/page-header/models/button-config.model';
|
||||
import { IconButtonTypes } from '../../../shared/components/buttons/icon-button/icon-button.component';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
import { ButtonConfig } from '@shared/components/page-header/models/button-config.model';
|
||||
import { IconButtonTypes } from '@shared/components/buttons/icon-button/icon-button.component';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-license-information-screen',
|
||||
@ -35,7 +36,7 @@ export class LicenseInformationScreenComponent implements OnInit {
|
||||
};
|
||||
buttonConfigs: ButtonConfig[] = [
|
||||
{
|
||||
label: this._translateService.instant('license-info-screen.email-report'),
|
||||
label: _('license-info-screen.email-report'),
|
||||
action: () => this.sendMail(),
|
||||
type: IconButtonTypes.PRIMARY
|
||||
}
|
||||
@ -93,6 +94,7 @@ export class LicenseInformationScreenComponent implements OnInit {
|
||||
const subject = this._translateService.instant('license-info-screen.email.title', {
|
||||
licenseCustomer
|
||||
});
|
||||
const lineBreak = '%0D%0A';
|
||||
const body = [
|
||||
this._translateService.instant('license-info-screen.email.body.analyzed', {
|
||||
pages: this.currentInfo.numberOfAnalyzedPages
|
||||
@ -100,7 +102,7 @@ export class LicenseInformationScreenComponent implements OnInit {
|
||||
this._translateService.instant('license-info-screen.email.body.licensed', {
|
||||
pages: this.totalLicensedNumberOfPages
|
||||
})
|
||||
].join('%0D%0A');
|
||||
].join(lineBreak);
|
||||
window.location.href = `mailto:${this.appConfigService.getConfig('LICENSE_EMAIL')}?subject=${subject}&body=${body}`;
|
||||
}
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
|
||||
<redaction-circle-button
|
||||
[routerLink]="['../..']"
|
||||
[tooltip]="'common.close' | translate"
|
||||
icon="red:close"
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="red-content-inner">
|
||||
<div class="overlay-shadow"></div>
|
||||
|
||||
<redaction-admin-side-nav type="dossier-templates"></redaction-admin-side-nav>
|
||||
<redaction-admin-side-nav type="dossierTemplates"></redaction-admin-side-nav>
|
||||
|
||||
<div class="content-container" redactionHasScrollbar>
|
||||
<div class="heading-xl" translate="reports-screen.title"></div>
|
||||
@ -47,8 +47,8 @@
|
||||
<redaction-circle-button
|
||||
(action)="fileInput.click()"
|
||||
*ngIf="permissionsService.isAdmin()"
|
||||
[tooltip]="'reports-screen.upload-document' | translate"
|
||||
icon="red:upload"
|
||||
tooltip="reports-screen.upload-document"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
|
||||
<redaction-circle-button
|
||||
[routerLink]="['../..']"
|
||||
[tooltip]="'common.close' | translate"
|
||||
icon="red:close"
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="red-content-inner">
|
||||
<div class="overlay-shadow"></div>
|
||||
|
||||
<redaction-admin-side-nav type="dossier-templates"></redaction-admin-side-nav>
|
||||
<redaction-admin-side-nav type="dossierTemplates"></redaction-admin-side-nav>
|
||||
|
||||
<div class="editor-container">
|
||||
<ngx-monaco-editor (init)="onCodeEditorInit($event)" [(ngModel)]="codeEditorText" [options]="editorOptions"></ngx-monaco-editor>
|
||||
@ -25,8 +25,8 @@
|
||||
<div *ngIf="hasChanges && permissionsService.isAdmin()" class="changes-box">
|
||||
<redaction-icon-button
|
||||
(action)="save()"
|
||||
[label]="'rules-screen.save-changes' | translate"
|
||||
icon="red:check"
|
||||
text="rules-screen.save-changes"
|
||||
type="primary"
|
||||
></redaction-icon-button>
|
||||
<div (click)="revert()" class="all-caps-label cancel" translate="rules-screen.revert-changes"></div>
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { RulesControllerService } from '@redaction/red-ui-http';
|
||||
import { Toaster } from '../../../../services/toaster.service';
|
||||
import { Toaster } from '@services/toaster.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { saveAs } from 'file-saver';
|
||||
import { ComponentHasChanges } from '@guards/can-deactivate.guard';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { debounce } from '../../../../utils/debounce';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { LoadingService } from '../../../../services/loading.service';
|
||||
import ICodeEditor = monaco.editor.ICodeEditor;
|
||||
import IModelDeltaDecoration = monaco.editor.IModelDeltaDecoration;
|
||||
@ -48,10 +49,6 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit
|
||||
_appStateService.activateDossierTemplate(_activatedRoute.snapshot.params.dossierTemplateId);
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
await this._initialize();
|
||||
}
|
||||
|
||||
get hasChanges(): boolean {
|
||||
return this.currentLines.toString() !== this.initialLines.toString();
|
||||
}
|
||||
@ -65,6 +62,10 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit
|
||||
this.codeEditorTextChanged();
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
await this._initialize();
|
||||
}
|
||||
|
||||
onCodeEditorInit(editor: ICodeEditor) {
|
||||
this._codeEditor = editor;
|
||||
(window as any).monaco.editor.defineTheme('redaction', {
|
||||
@ -96,11 +97,11 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit
|
||||
.then(
|
||||
async () => {
|
||||
await this._initialize();
|
||||
this._toaster.success('rules-screen.success.generic');
|
||||
this._toaster.success(_('rules-screen.success.generic'));
|
||||
},
|
||||
() => {
|
||||
this._loadingService.stop();
|
||||
this._toaster.error('rules-screen.error.generic');
|
||||
this._toaster.error(_('rules-screen.error.generic'));
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@ -60,9 +60,13 @@
|
||||
<div class="scrollbar-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<redaction-empty-state *ngIf="screenStateService.noData$ | async" icon="red:template" screen="trash"></redaction-empty-state>
|
||||
<redaction-empty-state
|
||||
*ngIf="screenStateService.noData$ | async"
|
||||
[text]="'trash.no-data.title' | translate"
|
||||
icon="red:template"
|
||||
></redaction-empty-state>
|
||||
|
||||
<redaction-empty-state *ngIf="noMatch$ | async" screen="trash" type="no-match"></redaction-empty-state>
|
||||
<redaction-empty-state *ngIf="noMatch$ | async" [text]="'trash.no-match.title' | translate"></redaction-empty-state>
|
||||
|
||||
<cdk-virtual-scroll-viewport [itemSize]="itemSize" redactionHasScrollbar>
|
||||
<div *cdkVirtualFor="let entity of sortedDisplayedEntities$ | async; trackBy: trackByPrimaryKey" class="table-item">
|
||||
|
||||
@ -8,7 +8,7 @@ import * as moment from 'moment';
|
||||
import { FilterService } from '@shared/services/filter.service';
|
||||
import { SearchService } from '@shared/services/search.service';
|
||||
import { ScreenStateService } from '@shared/services/screen-state.service';
|
||||
import { SortingService } from '../../../../services/sorting.service';
|
||||
import { SortingService } from '@services/sorting.service';
|
||||
import { BaseListingComponent } from '@shared/base/base-listing.component';
|
||||
import { DossiersService } from '../../../dossier/services/dossiers.service';
|
||||
|
||||
@ -20,8 +20,8 @@ import { DossiersService } from '../../../dossier/services/dossiers.service';
|
||||
})
|
||||
export class TrashScreenComponent extends BaseListingComponent<Dossier> implements OnInit {
|
||||
readonly itemSize = 85;
|
||||
private readonly _deleteRetentionHours = this._appConfigService.getConfig(AppConfigKey.DELETE_RETENTION_HOURS);
|
||||
protected readonly _primaryKey = 'dossierName';
|
||||
private readonly _deleteRetentionHours = this._appConfigService.getConfig(AppConfigKey.DELETE_RETENTION_HOURS);
|
||||
|
||||
constructor(
|
||||
private readonly _appStateService: AppStateService,
|
||||
|
||||
@ -10,22 +10,22 @@
|
||||
<div class="actions">
|
||||
<redaction-input-with-action
|
||||
[form]="searchService.searchForm"
|
||||
placeholder="user-listing.search"
|
||||
[placeholder]="'user-listing.search' | translate"
|
||||
type="search"
|
||||
></redaction-input-with-action>
|
||||
<redaction-icon-button
|
||||
(action)="openAddEditUserDialog($event)"
|
||||
*ngIf="permissionsService.isUserAdmin()"
|
||||
[label]="'user-listing.add-new' | translate"
|
||||
icon="red:plus"
|
||||
text="user-listing.add-new"
|
||||
type="primary"
|
||||
></redaction-icon-button>
|
||||
<redaction-circle-button
|
||||
*ngIf="permissionsService.isUser()"
|
||||
[tooltip]="'common.close' | translate"
|
||||
class="ml-6"
|
||||
icon="red:close"
|
||||
redactionNavigateLastDossiersScreen
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -50,7 +50,11 @@
|
||||
(action)="bulkDelete()"
|
||||
*ngIf="screenStateService.areSomeEntitiesSelected$ | async"
|
||||
[disabled]="(canDeleteSelected$ | async) === false"
|
||||
[tooltip]="(canDeleteSelected$ | async) ? 'user-listing.bulk.delete' : 'user-listing.bulk.delete-disabled'"
|
||||
[tooltip]="
|
||||
(canDeleteSelected$ | async)
|
||||
? ('user-listing.bulk.delete' | translate)
|
||||
: ('user-listing.bulk.delete-disabled' | translate)
|
||||
"
|
||||
icon="red:trash"
|
||||
tooltipPosition="after"
|
||||
type="dark-bg"
|
||||
@ -60,19 +64,22 @@
|
||||
<div class="table-header" redactionSyncWidth="table-item">
|
||||
<div class="select-oval-placeholder"></div>
|
||||
|
||||
<redaction-table-col-name label="user-listing.table-col-names.name"></redaction-table-col-name>
|
||||
<redaction-table-col-name [label]="'user-listing.table-col-names.name' | translate"></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name label="user-listing.table-col-names.email"></redaction-table-col-name>
|
||||
<redaction-table-col-name [label]="'user-listing.table-col-names.email' | translate"></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name class="flex-center" label="user-listing.table-col-names.active"></redaction-table-col-name>
|
||||
<redaction-table-col-name
|
||||
[label]="'user-listing.table-col-names.active' | translate"
|
||||
class="flex-center"
|
||||
></redaction-table-col-name>
|
||||
|
||||
<redaction-table-col-name label="user-listing.table-col-names.roles"></redaction-table-col-name>
|
||||
<redaction-table-col-name [label]="'user-listing.table-col-names.roles' | translate"></redaction-table-col-name>
|
||||
|
||||
<div></div>
|
||||
<div class="scrollbar-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<redaction-empty-state *ngIf="noMatch$ | async" screen="user-listing" type="no-match"></redaction-empty-state>
|
||||
<redaction-empty-state *ngIf="noMatch$ | async" [text]="'user-listing.no-match.title' | translate"></redaction-empty-state>
|
||||
|
||||
<cdk-virtual-scroll-viewport [itemSize]="80" redactionHasScrollbar>
|
||||
<!-- Table lines -->
|
||||
@ -101,15 +108,15 @@
|
||||
<div class="action-buttons">
|
||||
<redaction-circle-button
|
||||
(action)="openAddEditUserDialog($event, user)"
|
||||
[tooltip]="'user-listing.action.edit' | translate"
|
||||
icon="red:edit"
|
||||
tooltip="user-listing.action.edit"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
<redaction-circle-button
|
||||
(action)="openDeleteUsersDialog([user], $event)"
|
||||
[disabled]="user.userId === userService.userId"
|
||||
[tooltip]="'user-listing.action.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="user-listing.action.delete"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
|
||||
@ -15,6 +15,7 @@ import { SortingService } from '@services/sorting.service';
|
||||
import { BaseListingComponent } from '@shared/base/base-listing.component';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { rolesTranslations } from '../../../../translations/roles-translations';
|
||||
|
||||
@Component({
|
||||
templateUrl: './user-listing-screen.component.html',
|
||||
@ -22,11 +23,11 @@ import { map } from 'rxjs/operators';
|
||||
providers: [FilterService, SearchService, ScreenStateService, SortingService]
|
||||
})
|
||||
export class UserListingScreenComponent extends BaseListingComponent<User> implements OnInit {
|
||||
protected readonly _primaryKey = 'userId';
|
||||
readonly canDeleteSelected$ = this._canDeleteSelected$;
|
||||
|
||||
collapsedDetails = false;
|
||||
chartData: DoughnutChartConfig[] = [];
|
||||
translations = rolesTranslations;
|
||||
protected readonly _primaryKey = 'userId';
|
||||
@ViewChildren(InitialsAvatarComponent)
|
||||
private readonly _avatars: QueryList<InitialsAvatarComponent>;
|
||||
|
||||
@ -65,9 +66,10 @@ export class UserListingScreenComponent extends BaseListingComponent<User> imple
|
||||
}
|
||||
|
||||
getDisplayRoles(user: User) {
|
||||
const separator = ', ';
|
||||
return (
|
||||
user.roles.map(role => this._translateService.instant('roles.' + role)).join(', ') ||
|
||||
this._translateService.instant('roles.NO_ROLE')
|
||||
user.roles.map(role => this._translateService.instant(this.translations[role])).join(separator) ||
|
||||
this._translateService.instant(this.translations['NO_ROLE'])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
|
||||
<redaction-circle-button
|
||||
[routerLink]="['../..']"
|
||||
[tooltip]="'common.close' | translate"
|
||||
icon="red:close"
|
||||
tooltip="common.close"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="red-content-inner">
|
||||
<div class="overlay-shadow"></div>
|
||||
|
||||
<redaction-admin-side-nav type="dossier-templates"></redaction-admin-side-nav>
|
||||
<redaction-admin-side-nav type="dossierTemplates"></redaction-admin-side-nav>
|
||||
|
||||
<div class="content-container">
|
||||
<div #viewer class="viewer"></div>
|
||||
@ -25,8 +25,8 @@
|
||||
<redaction-icon-button
|
||||
(action)="save()"
|
||||
[disabled]="configForm.invalid"
|
||||
[label]="'watermark-screen.action.save' | translate"
|
||||
icon="red:check"
|
||||
text="watermark-screen.action.save"
|
||||
type="primary"
|
||||
></redaction-icon-button>
|
||||
<div (click)="revert()" class="all-caps-label cancel" translate="watermark-screen.action.revert"></div>
|
||||
@ -77,10 +77,10 @@
|
||||
<div class="red-input-group w-150">
|
||||
<label class="all-caps-label mb-5" translate="watermark-screen.form.color"></label>
|
||||
<input
|
||||
[placeholder]="'add-edit-dictionary.form.color-placeholder' | translate"
|
||||
class="hex-color-input"
|
||||
formControlName="hexColor"
|
||||
name="hexColor"
|
||||
placeholder="{{ 'add-edit-dictionary.form.color-placeholder' | translate }}"
|
||||
type="text"
|
||||
/>
|
||||
<div
|
||||
|
||||
@ -7,10 +7,11 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { debounce } from '@utils/debounce';
|
||||
import { WatermarkControllerService, WatermarkModelRes } from '@redaction/red-ui-http';
|
||||
import { Toaster } from '../../../../services/toaster.service';
|
||||
import { Toaster } from '@services/toaster.service';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { BASE_HREF } from '../../../../tokens';
|
||||
import { stampPDFPage } from '../../../../utils/page-stamper';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { LoadingService } from '../../../../services/loading.service';
|
||||
|
||||
export const DEFAULT_WATERMARK: WatermarkModelRes = {
|
||||
@ -84,9 +85,11 @@ export class WatermarkScreenComponent implements OnInit {
|
||||
observable.toPromise().then(
|
||||
() => {
|
||||
this._loadWatermark();
|
||||
this._toaster.success(watermark.text ? 'watermark-screen.action.change-success' : 'watermark-screen.action.delete-success');
|
||||
this._toaster.success(
|
||||
watermark.text ? _('watermark-screen.action.change-success') : _('watermark-screen.action.delete-success')
|
||||
);
|
||||
},
|
||||
() => this._toaster.error('watermark-screen.action.error')
|
||||
() => this._toaster.error(_('watermark-screen.action.error'))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
export const adminSideNavTranslations = {
|
||||
settings: _('admin-side-nav.settings'),
|
||||
dossierTemplates: _('admin-side-nav.dossier-templates')
|
||||
};
|
||||
@ -0,0 +1,16 @@
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
export const auditCategoriesTranslations: { [key: string]: string } = {
|
||||
allCategories: _('audit-screen.categories.all-categories'),
|
||||
LICENSE: _('audit-screen.categories.license'),
|
||||
DOWNLOAD: _('audit-screen.categories.download'),
|
||||
AUDIT_LOG: _('audit-screen.categories.audit-log'),
|
||||
PROJECT: _('audit-screen.categories.project'),
|
||||
DOSSIER: _('audit-screen.categories.dossier'),
|
||||
DICTIONARY: _('audit-screen.categories.dictionary'),
|
||||
PROJECT_TEMPLATE: _('audit-screen.categories.project-template'),
|
||||
USER: _('audit-screen.categories.user'),
|
||||
DOCUMENT: _('audit-screen.categories.document'),
|
||||
AUDIT: _('audit-screen.categories.audit'),
|
||||
DOSSIER_TEMPLATE: _('audit-screen.categories.dossier-template')
|
||||
};
|
||||
@ -0,0 +1,14 @@
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { DefaultColorType } from '@models/default-color-key.model';
|
||||
|
||||
export const defaultColorsTranslations: { [key in DefaultColorType]: string } = {
|
||||
analysisColor: _('default-colors-screen.types.analysisColor'),
|
||||
defaultColor: _('default-colors-screen.types.defaultColor'),
|
||||
dictionaryRequestColor: _('default-colors-screen.types.dictionaryRequestColor'),
|
||||
manualRedactionColor: _('default-colors-screen.types.manualRedactionColor'),
|
||||
notRedacted: _('default-colors-screen.types.notRedacted'),
|
||||
previewColor: _('default-colors-screen.types.previewColor'),
|
||||
requestAdd: _('default-colors-screen.types.requestAdd'),
|
||||
requestRemove: _('default-colors-screen.types.requestRemove'),
|
||||
updatedColor: _('default-colors-screen.types.updatedColor')
|
||||
};
|
||||
@ -0,0 +1,9 @@
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { DossierAttributeConfig } from '@redaction/red-ui-http';
|
||||
|
||||
export const dossierAttributeTypesTranslations: { [key in DossierAttributeConfig.TypeEnum]: string } = {
|
||||
TEXT: _('dossier-attribute-types.text'),
|
||||
NUMBER: _('dossier-attribute-types.number'),
|
||||
DATE: _('dossier-attribute-types.date'),
|
||||
IMAGE: _('dossier-attribute-types.image')
|
||||
};
|
||||
@ -0,0 +1,8 @@
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { FileAttributeConfig } from '@redaction/red-ui-http';
|
||||
|
||||
export const fileAttributeTypesTranslations: { [key in FileAttributeConfig.TypeEnum]: string } = {
|
||||
TEXT: _('file-attribute-types.text'),
|
||||
NUMBER: _('file-attribute-types.number'),
|
||||
DATE: _('file-attribute-types.date')
|
||||
};
|
||||
@ -1,131 +1,118 @@
|
||||
<div *ngIf="canPerformAnnotationActions" class="annotation-actions" [class.always-visible]="alwaysVisible">
|
||||
<div *ngIf="canPerformAnnotationActions" [class.always-visible]="alwaysVisible" class="annotation-actions">
|
||||
<redaction-circle-button
|
||||
(action)="annotationActionsService.changeLegalBasis($event, annotations, annotationsChanged)"
|
||||
*ngIf="annotationPermissions.canChangeLegalBasis"
|
||||
icon="red:edit"
|
||||
tooltip="annotation-actions.edit-reason.label"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.edit-reason.label' | translate"
|
||||
[type]="btnType"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
icon="red:edit"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="annotationActionsService.convertRecommendationToAnnotation($event, annotations, annotationsChanged)"
|
||||
*ngIf="annotationPermissions.canAcceptRecommendation"
|
||||
icon="red:check"
|
||||
tooltip="annotation-actions.accept-recommendation.label"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.accept-recommendation.label' | translate"
|
||||
[type]="btnType"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
icon="red:check"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="annotationActionsService.acceptSuggestion($event, annotations, annotationsChanged)"
|
||||
*ngIf="annotationPermissions.canAcceptSuggestion"
|
||||
icon="red:check"
|
||||
tooltip="annotation-actions.accept-suggestion.label"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.accept-suggestion.label' | translate"
|
||||
[type]="btnType"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
icon="red:check"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="annotationActionsService.undoDirectAction($event, annotations, annotationsChanged)"
|
||||
*ngIf="annotationPermissions.canUndo"
|
||||
icon="red:undo"
|
||||
tooltip="annotation-actions.undo"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.undo' | translate"
|
||||
[type]="btnType"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
icon="red:undo"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="annotationActionsService.rejectSuggestion($event, annotations, annotationsChanged)"
|
||||
*ngIf="annotationPermissions.canRejectSuggestion"
|
||||
icon="red:trash"
|
||||
tooltip="annotation-actions.reject-suggestion"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.reject-suggestion' | translate"
|
||||
[type]="btnType"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
icon="red:trash"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="annotationActionsService.recategorizeImage($event, annotations, annotationsChanged)"
|
||||
*ngIf="annotationPermissions.canRecategorizeImage"
|
||||
icon="red:thumb-down"
|
||||
tooltip="annotation-actions.recategorize-image"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.recategorize-image' | translate"
|
||||
[type]="btnType"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
icon="red:thumb-down"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="annotationActionsService.markAsFalsePositive($event, annotations, annotationsChanged)"
|
||||
*ngIf="annotationPermissions.canMarkTextOnlyAsFalsePositive && !annotationPermissions.canPerformMultipleRemoveActions"
|
||||
icon="red:thumb-down"
|
||||
tooltip="annotation-actions.remove-annotation.false-positive"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.remove-annotation.false-positive' | translate"
|
||||
[type]="btnType"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
icon="red:thumb-down"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="annotationActionsService.forceRedaction($event, annotations, annotationsChanged)"
|
||||
*ngIf="annotationPermissions.canForceRedaction"
|
||||
icon="red:thumb-up"
|
||||
tooltip="annotation-actions.force-redaction.label"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.force-redaction.label' | translate"
|
||||
[type]="btnType"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
icon="red:thumb-up"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="hideAnnotation($event)"
|
||||
*ngIf="isImage && isVisible"
|
||||
icon="red:visibility-off"
|
||||
tooltip="annotation-actions.hide"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.hide' | translate"
|
||||
[type]="btnType"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
icon="red:visibility-off"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="showAnnotation($event)"
|
||||
*ngIf="isImage && !isVisible"
|
||||
icon="red:visibility"
|
||||
tooltip="annotation-actions.show"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.show' | translate"
|
||||
[type]="btnType"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
icon="red:visibility"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="suggestRemoveAnnotations($event, true)"
|
||||
*ngIf="annotationPermissions.canRemoveOrSuggestToRemoveFromDictionary"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.remove-annotation.remove-from-dict' | translate"
|
||||
[type]="btnType"
|
||||
icon="red:remove-from-dict"
|
||||
tooltip="annotation-actions.remove-annotation.remove-from-dict"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="markAsFalsePositive($event)"
|
||||
*ngIf="annotationPermissions.canMarkAsFalsePositive"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.remove-annotation.false-positive' | translate"
|
||||
[type]="btnType"
|
||||
icon="red:thumb-down"
|
||||
tooltip="annotation-actions.remove-annotation.false-positive"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="suggestRemoveAnnotations($event, false)"
|
||||
*ngIf="annotationPermissions.canRemoveOrSuggestToRemoveOnlyHere"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'annotation-actions.remove-annotation.only-here' | translate"
|
||||
[type]="btnType"
|
||||
icon="red:trash"
|
||||
tooltip="annotation-actions.remove-annotation.only-here"
|
||||
>
|
||||
</redaction-circle-button>
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
|
||||
@ -14,14 +14,10 @@ import { WebViewerInstance } from '@pdftron/webviewer';
|
||||
export class AnnotationActionsComponent implements OnInit {
|
||||
@Input() btnType: 'dark-bg' | 'primary' = 'dark-bg';
|
||||
@Input() tooltipPosition: 'before' | 'above' = 'before';
|
||||
|
||||
@Input() _annotations: AnnotationWrapper[];
|
||||
@Input() canPerformAnnotationActions: boolean;
|
||||
@Input() viewer: WebViewerInstance;
|
||||
@Input() alwaysVisible: boolean;
|
||||
|
||||
@Output() annotationsChanged = new EventEmitter<AnnotationWrapper>();
|
||||
|
||||
annotationPermissions: AnnotationPermissions;
|
||||
|
||||
constructor(
|
||||
@ -30,6 +26,8 @@ export class AnnotationActionsComponent implements OnInit {
|
||||
private _permissionsService: PermissionsService
|
||||
) {}
|
||||
|
||||
private _annotations: AnnotationWrapper[];
|
||||
|
||||
get annotations(): AnnotationWrapper[] {
|
||||
return this._annotations;
|
||||
}
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
<redaction-circle-button
|
||||
(action)="delete()"
|
||||
*ngIf="canDelete"
|
||||
[tooltip]="'dossier-overview.bulk.delete' | translate"
|
||||
icon="red:trash"
|
||||
tooltip="dossier-overview.bulk.delete"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
@ -18,24 +18,24 @@
|
||||
<redaction-circle-button
|
||||
(action)="assignToMe()"
|
||||
*ngIf="canAssignToSelf"
|
||||
[tooltip]="'dossier-overview.assign-me' | translate"
|
||||
icon="red:assign-me"
|
||||
tooltip="dossier-overview.assign-me"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="setToUnderApproval()"
|
||||
*ngIf="canSetToUnderApproval"
|
||||
[tooltip]="'dossier-overview.under-approval' | translate"
|
||||
icon="red:ready-for-approval"
|
||||
tooltip="dossier-overview.under-approval"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="setToUnderReview()"
|
||||
*ngIf="canSetToUnderReview"
|
||||
[tooltip]="'dossier-overview.under-review' | translate"
|
||||
icon="red:undo"
|
||||
tooltip="dossier-overview.under-review"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
(action)="approveDocuments()"
|
||||
*ngIf="isReadyForApproval"
|
||||
[disabled]="!canApprove"
|
||||
[tooltip]="canApprove ? 'dossier-overview.approve' : 'dossier-overview.approve-disabled'"
|
||||
[tooltip]="canApprove ? ('dossier-overview.approve' | translate) : ('dossier-overview.approve-disabled' | translate)"
|
||||
icon="red:approved"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
@ -55,24 +55,24 @@
|
||||
<redaction-circle-button
|
||||
(action)="setToUnderApproval()"
|
||||
*ngIf="canUndoApproval"
|
||||
[tooltip]="'dossier-overview.under-approval' | translate"
|
||||
icon="red:undo"
|
||||
tooltip="dossier-overview.under-approval"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="ocr()"
|
||||
*ngIf="canOcr"
|
||||
[tooltip]="'dossier-overview.ocr-file' | translate"
|
||||
icon="red:ocr"
|
||||
tooltip="dossier-overview.ocr-file"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="reanalyse()"
|
||||
*ngIf="canReanalyse"
|
||||
[tooltip]="'dossier-overview.bulk.reanalyse' | translate"
|
||||
icon="red:refresh"
|
||||
tooltip="dossier-overview.bulk.reanalyse"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
</ng-container>
|
||||
|
||||
@ -6,9 +6,11 @@ import { FileStatusWrapper } from '@models/file/file-status.wrapper';
|
||||
import { FileActionService } from '../../services/file-action.service';
|
||||
import { from, Observable } from 'rxjs';
|
||||
import { DossiersDialogService } from '../../services/dossiers-dialog.service';
|
||||
import { LoadingService } from '../../../../services/loading.service';
|
||||
import { ConfirmationDialogInput } from '../../../shared/dialogs/confirmation-dialog/confirmation-dialog.component';
|
||||
import { ScreenStateService } from '../../../shared/services/screen-state.service';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
import { ConfirmationDialogInput } from '@shared/dialogs/confirmation-dialog/confirmation-dialog.component';
|
||||
import { ScreenStateService } from '@shared/services/screen-state.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-dossier-overview-bulk-actions',
|
||||
@ -27,6 +29,7 @@ export class DossierOverviewBulkActionsComponent {
|
||||
private readonly _permissionsService: PermissionsService,
|
||||
private readonly _fileActionService: FileActionService,
|
||||
private readonly _loadingService: LoadingService,
|
||||
private readonly _translateService: TranslateService,
|
||||
private readonly _screenStateService: ScreenStateService<FileStatusWrapper>
|
||||
) {}
|
||||
|
||||
@ -117,7 +120,9 @@ export class DossierOverviewBulkActionsComponent {
|
||||
|
||||
get assignTooltip() {
|
||||
const allFilesAreUnderApproval = this.selectedFiles.reduce((acc, file) => acc && file.isUnderApproval, true);
|
||||
return allFilesAreUnderApproval ? 'dossier-overview.assign-approver' : 'dossier-overview.assign-reviewer';
|
||||
return allFilesAreUnderApproval
|
||||
? this._translateService.instant('dossier-overview.assign-approver')
|
||||
: this._translateService.instant('dossier-overview.assign-reviewer');
|
||||
}
|
||||
|
||||
delete() {
|
||||
@ -125,8 +130,8 @@ export class DossierOverviewBulkActionsComponent {
|
||||
'confirm',
|
||||
null,
|
||||
new ConfirmationDialogInput({
|
||||
title: 'confirmation-dialog.delete-file.title',
|
||||
question: 'confirmation-dialog.delete-file.question'
|
||||
title: _('confirmation-dialog.delete-file.title'),
|
||||
question: _('confirmation-dialog.delete-file.question')
|
||||
}),
|
||||
async () => {
|
||||
this._loadingService.start();
|
||||
|
||||
@ -22,15 +22,11 @@
|
||||
(action)="addComment()"
|
||||
*ngIf="permissionsService.canAddComment()"
|
||||
[form]="commentForm"
|
||||
[placeholder]="'comments.add-comment' | translate"
|
||||
autocomplete="off"
|
||||
icon="red:collapse"
|
||||
placeholder="comments.add-comment"
|
||||
type="action"
|
||||
width="full"
|
||||
></redaction-input-with-action>
|
||||
|
||||
<div
|
||||
(click)="toggleExpandComments($event)"
|
||||
class="all-caps-label pointer hide-comments"
|
||||
translate="comments.hide-comments"
|
||||
></div>
|
||||
<div (click)="toggleExpandComments($event)" class="all-caps-label pointer hide-comments" translate="comments.hide-comments"></div>
|
||||
|
||||
@ -35,15 +35,13 @@ export class CommentsComponent {
|
||||
addComment(): void {
|
||||
const value = this.commentForm.value.value;
|
||||
if (value) {
|
||||
this._manualAnnotationService
|
||||
.addComment(value, this.annotation.id)
|
||||
.subscribe(commentResponse => {
|
||||
this.annotation.comments.push({
|
||||
text: value,
|
||||
id: commentResponse.commentId,
|
||||
user: this._userService.userId
|
||||
});
|
||||
this._manualAnnotationService.addComment(value, this.annotation.id).subscribe(commentResponse => {
|
||||
this.annotation.comments.push({
|
||||
text: value,
|
||||
id: commentResponse.commentId,
|
||||
user: this._userService.userId
|
||||
});
|
||||
});
|
||||
this.commentForm.reset();
|
||||
}
|
||||
}
|
||||
@ -54,14 +52,12 @@ export class CommentsComponent {
|
||||
}
|
||||
|
||||
deleteComment(comment: Comment): void {
|
||||
this._manualAnnotationService
|
||||
.deleteComment(comment.id, this.annotation.id)
|
||||
.subscribe(() => {
|
||||
this.annotation.comments.splice(this.annotation.comments.indexOf(comment), 1);
|
||||
if (!this.annotation.comments.length) {
|
||||
this._hidden = true;
|
||||
}
|
||||
});
|
||||
this._manualAnnotationService.deleteComment(comment.id, this.annotation.id).subscribe(() => {
|
||||
this.annotation.comments.splice(this.annotation.comments.indexOf(comment), 1);
|
||||
if (!this.annotation.comments.length) {
|
||||
this._hidden = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
isCommentOwner(comment: Comment): boolean {
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
<div>
|
||||
<redaction-circle-button
|
||||
(action)="edit()"
|
||||
[tooltip]="'file-preview.tabs.document-info.edit' | translate"
|
||||
icon="red:edit"
|
||||
tooltip="file-preview.tabs.document-info.edit"
|
||||
tooltipPosition="before"
|
||||
></redaction-circle-button>
|
||||
<redaction-circle-button
|
||||
(action)="closeDocumentInfoView.emit()"
|
||||
[tooltip]="'file-preview.tabs.document-info.close' | translate"
|
||||
icon="red:close"
|
||||
tooltip="file-preview.tabs.document-info.close"
|
||||
tooltipPosition="before"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -26,30 +26,20 @@
|
||||
<div class="section small-label stats-subtitle">
|
||||
<div>
|
||||
<mat-icon svgIcon="red:folder"></mat-icon>
|
||||
<span>{{
|
||||
'file-preview.tabs.document-info.details.dossier'
|
||||
| translate: { dossierName: dossier.name }
|
||||
}}</span>
|
||||
<span>{{ 'file-preview.tabs.document-info.details.dossier' | translate: { dossierName: dossier.name } }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<mat-icon svgIcon="red:document"></mat-icon>
|
||||
<span>{{
|
||||
'file-preview.tabs.document-info.details.pages'
|
||||
| translate: { pages: file.numberOfPages }
|
||||
}}</span>
|
||||
<span>{{ 'file-preview.tabs.document-info.details.pages' | translate: { pages: file.numberOfPages } }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<mat-icon svgIcon="red:calendar"></mat-icon>
|
||||
<span>{{
|
||||
'file-preview.tabs.document-info.details.created-on'
|
||||
| translate: { date: file.added | date: 'mediumDate' }
|
||||
}}</span>
|
||||
<span>{{ 'file-preview.tabs.document-info.details.created-on' | translate: { date: file.added | date: 'mediumDate' } }}</span>
|
||||
</div>
|
||||
<div *ngIf="dossier.dossier.dueDate">
|
||||
<mat-icon svgIcon="red:lightning"></mat-icon>
|
||||
<span>{{
|
||||
'file-preview.tabs.document-info.details.due'
|
||||
| translate: { date: dossier.dossier.dueDate | date: 'mediumDate' }
|
||||
'file-preview.tabs.document-info.details.due' | translate: { date: dossier.dossier.dueDate | date: 'mediumDate' }
|
||||
}}</span>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -14,10 +14,7 @@ export class DocumentInfoComponent {
|
||||
|
||||
fileAttributesConfig: FileAttributesConfig;
|
||||
|
||||
constructor(
|
||||
private readonly _appStateService: AppStateService,
|
||||
private readonly _dialogService: DossiersDialogService
|
||||
) {
|
||||
constructor(private readonly _appStateService: AppStateService, private readonly _dialogService: DossiersDialogService) {
|
||||
this.fileAttributesConfig = this._appStateService.activeFileAttributesConfig;
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
<ng-container *ngIf="appStateService.activeDossier">
|
||||
<div class="collapsed-wrapper">
|
||||
<ng-container *ngTemplateOutlet="collapsible; context: { action: 'expand' }"></ng-container>
|
||||
<ng-container *ngTemplateOutlet="collapsible; context: { action: 'expand', tooltip: (expandTooltip | translate) }"></ng-container>
|
||||
<div class="all-caps-label" translate="dossier-details.title"></div>
|
||||
</div>
|
||||
|
||||
<div class="header-wrapper mt-8">
|
||||
<div class="heading-xl flex-1">{{ appStateService.activeDossier.dossier.dossierName }}</div>
|
||||
<ng-container *ngTemplateOutlet="collapsible; context: { action: 'collapse' }"></ng-container>
|
||||
<ng-container
|
||||
*ngTemplateOutlet="collapsible; context: { action: 'collapse', tooltip: (collapseTooltip | translate) }"
|
||||
></ng-container>
|
||||
</div>
|
||||
|
||||
<div class="mt-24">
|
||||
@ -18,9 +20,9 @@
|
||||
<redaction-circle-button
|
||||
(action)="editingOwner = true"
|
||||
*ngIf="permissionsService.isManager()"
|
||||
[tooltip]="'dossier-details.edit-owner' | translate"
|
||||
class="ml-14"
|
||||
icon="red:edit"
|
||||
tooltip="dossier-details.edit-owner"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
</ng-container>
|
||||
@ -41,7 +43,7 @@
|
||||
[config]="documentsChartData"
|
||||
[radius]="63"
|
||||
[strokeWidth]="15"
|
||||
[subtitle]="'dossier-overview.dossier-details.charts.documents-in-dossier'"
|
||||
[subtitle]="'dossier-overview.dossier-details.charts.documents-in-dossier' | translate"
|
||||
direction="row"
|
||||
></redaction-simple-doughnut-chart>
|
||||
</div>
|
||||
@ -78,11 +80,11 @@
|
||||
></redaction-assign-user-dropdown>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #collapsible let-action="action">
|
||||
<ng-template #collapsible let-action="action" let-tooltip="tooltip">
|
||||
<redaction-circle-button
|
||||
(action)="toggleCollapse.emit()"
|
||||
icon="{{ 'red:' + action }}"
|
||||
tooltip="{{ 'dossier-details.' + action }}"
|
||||
[icon]="'red:' + action"
|
||||
[tooltip]="tooltip"
|
||||
tooltipPosition="before"
|
||||
></redaction-circle-button>
|
||||
</ng-template>
|
||||
|
||||
@ -7,9 +7,11 @@ import { TranslateChartService } from '@services/translate-chart.service';
|
||||
import { StatusSorter } from '@utils/sorters/status-sorter';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { User } from '@redaction/red-ui-http';
|
||||
import { Toaster } from '../../../../services/toaster.service';
|
||||
import { FilterService } from '../../../shared/services/filter.service';
|
||||
import { Toaster } from '@services/toaster.service';
|
||||
import { FilterService } from '@shared/services/filter.service';
|
||||
import { DossierAttributeWithValue } from '@models/dossier-attributes.model';
|
||||
import { fileStatusTranslations } from '../../translations/file-status-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-dossier-details',
|
||||
@ -24,6 +26,8 @@ export class DossierDetailsComponent implements OnInit {
|
||||
@Output() openAssignDossierMembersDialog = new EventEmitter();
|
||||
@Output() openDossierDictionaryDialog = new EventEmitter();
|
||||
@Output() toggleCollapse = new EventEmitter();
|
||||
collapseTooltip = _('dossier-details.collapse');
|
||||
expandTooltip = _('dossier-details.expand');
|
||||
|
||||
readonly needsWorkFilters$ = this.filterService.getFilterModels$('needsWorkFilters');
|
||||
|
||||
@ -68,7 +72,7 @@ export class DossierDetailsComponent implements OnInit {
|
||||
this.documentsChartData.push({
|
||||
value: groups[key].length,
|
||||
color: key,
|
||||
label: key,
|
||||
label: fileStatusTranslations[key],
|
||||
key: key
|
||||
});
|
||||
}
|
||||
|
||||
@ -3,22 +3,18 @@
|
||||
<redaction-circle-button
|
||||
(action)="openEditDossierDialog($event, dossier)"
|
||||
*ngIf="permissionsService.isManager()"
|
||||
[tooltip]="'dossier-listing.edit.action' | translate"
|
||||
icon="red:edit"
|
||||
tooltip="dossier-listing.edit.action"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="reanalyseDossier($event, dossier)"
|
||||
*ngIf="permissionsService.displayReanalyseBtn(dossier)"
|
||||
[tooltip]="'dossier-listing.reanalyse.action' | translate"
|
||||
icon="red:refresh"
|
||||
tooltip="dossier-listing.reanalyse.action"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-file-download-btn
|
||||
[dossier]="dossier"
|
||||
[file]="dossier.files"
|
||||
type="dark-bg"
|
||||
></redaction-file-download-btn>
|
||||
<redaction-file-download-btn [dossier]="dossier" [file]="dossier.files" type="dark-bg"></redaction-file-download-btn>
|
||||
</div>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
[config]="dossiersChartData"
|
||||
[radius]="80"
|
||||
[strokeWidth]="15"
|
||||
[subtitle]="'dossier-listing.stats.charts.dossiers'"
|
||||
[subtitle]="'dossier-listing.stats.charts.dossiers' | translate"
|
||||
></redaction-simple-doughnut-chart>
|
||||
|
||||
<div class="dossier-stats-container">
|
||||
@ -29,6 +29,6 @@
|
||||
[config]="documentsChartData"
|
||||
[radius]="80"
|
||||
[strokeWidth]="15"
|
||||
[subtitle]="'dossier-listing.stats.charts.total-documents'"
|
||||
[subtitle]="'dossier-listing.stats.charts.total-documents' | translate"
|
||||
></redaction-simple-doughnut-chart>
|
||||
</div>
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
(action)="openDeleteFileDialog($event)"
|
||||
*ngIf="permissionsService.canDeleteFile(fileStatus)"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'dossier-overview.delete.action' | translate"
|
||||
[type]="buttonType"
|
||||
icon="red:trash"
|
||||
tooltip="dossier-overview.delete.action"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
@ -32,9 +32,9 @@
|
||||
(action)="assignToMe($event)"
|
||||
*ngIf="canAssignToSelf && screen === 'dossier-overview'"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'dossier-overview.assign-me' | translate"
|
||||
[type]="buttonType"
|
||||
icon="red:assign-me"
|
||||
tooltip="dossier-overview.assign-me"
|
||||
></redaction-circle-button>
|
||||
|
||||
<!-- download redacted file-->
|
||||
@ -50,8 +50,8 @@
|
||||
(action)="toggleViewDocumentInfo()"
|
||||
*ngIf="screen === 'file-preview'"
|
||||
[attr.aria-expanded]="activeDocumentInfo"
|
||||
[tooltip]="'file-preview.document-info' | translate"
|
||||
icon="red:status-info"
|
||||
tooltip="file-preview.document-info"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
|
||||
@ -60,8 +60,8 @@
|
||||
*ngIf="screen === 'file-preview'"
|
||||
[attr.aria-expanded]="activeExcludePages"
|
||||
[showDot]="!!fileStatus.excludedPages?.length"
|
||||
[tooltip]="'file-preview.exclude-pages' | translate"
|
||||
icon="red:exclude-pages"
|
||||
tooltip="file-preview.exclude-pages"
|
||||
tooltipPosition="below"
|
||||
></redaction-circle-button>
|
||||
|
||||
@ -70,9 +70,9 @@
|
||||
(action)="setFileUnderApproval($event)"
|
||||
*ngIf="canSetToUnderApproval"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'dossier-overview.under-approval' | translate"
|
||||
[type]="buttonType"
|
||||
icon="red:ready-for-approval"
|
||||
tooltip="dossier-overview.under-approval"
|
||||
></redaction-circle-button>
|
||||
|
||||
<!-- Back to review -->
|
||||
@ -80,9 +80,9 @@
|
||||
(action)="setFileUnderReview($event, true)"
|
||||
*ngIf="canSetToUnderReview"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'dossier-overview.under-review' | translate"
|
||||
[type]="buttonType"
|
||||
icon="red:undo"
|
||||
tooltip="dossier-overview.under-review"
|
||||
></redaction-circle-button>
|
||||
|
||||
<!-- Approved-->
|
||||
@ -91,7 +91,11 @@
|
||||
*ngIf="permissionsService.isReadyForApproval(fileStatus)"
|
||||
[disabled]="!permissionsService.canApprove(fileStatus)"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="permissionsService.canApprove(fileStatus) ? 'dossier-overview.approve' : 'dossier-overview.approve-disabled'"
|
||||
[tooltip]="
|
||||
permissionsService.canApprove(fileStatus)
|
||||
? ('dossier-overview.approve' | translate)
|
||||
: ('dossier-overview.approve-disabled' | translate)
|
||||
"
|
||||
[type]="buttonType"
|
||||
icon="red:approved"
|
||||
></redaction-circle-button>
|
||||
@ -101,26 +105,26 @@
|
||||
(action)="setFileUnderApproval($event)"
|
||||
*ngIf="canUndoApproval"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'dossier-overview.under-approval' | translate"
|
||||
[type]="buttonType"
|
||||
icon="red:undo"
|
||||
tooltip="dossier-overview.under-approval"
|
||||
></redaction-circle-button>
|
||||
|
||||
<redaction-circle-button
|
||||
(action)="ocrFile($event)"
|
||||
*ngIf="canOcr"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'dossier-overview.ocr-file' | translate"
|
||||
[type]="buttonType"
|
||||
icon="red:ocr"
|
||||
tooltip="dossier-overview.ocr-file"
|
||||
></redaction-circle-button>
|
||||
|
||||
<!-- reanalyse file preview -->
|
||||
<redaction-circle-button
|
||||
(action)="reanalyseFile($event)"
|
||||
*ngIf="canReanalyse && screen === 'file-preview'"
|
||||
[tooltip]="'file-preview.reanalyse-notification' | translate"
|
||||
icon="red:refresh"
|
||||
tooltip="file-preview.reanalyse-notification"
|
||||
tooltipClass="warn small"
|
||||
tooltipPosition="below"
|
||||
type="warn"
|
||||
@ -131,8 +135,8 @@
|
||||
(action)="reanalyseFile($event)"
|
||||
*ngIf="canReanalyse && screen === 'dossier-overview'"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[tooltip]="'dossier-overview.reanalyse.action' | translate"
|
||||
icon="red:refresh"
|
||||
tooltip="dossier-overview.reanalyse.action"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
|
||||
@ -7,6 +7,8 @@ import { DossiersDialogService } from '../../services/dossiers-dialog.service';
|
||||
import { ConfirmationDialogInput } from '@shared/dialogs/confirmation-dialog/confirmation-dialog.component';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
import { FileManagementControllerService } from '@redaction/red-ui-http';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-file-actions',
|
||||
@ -28,7 +30,8 @@ export class FileActionsComponent implements OnInit {
|
||||
private readonly _dialogService: DossiersDialogService,
|
||||
private readonly _fileActionService: FileActionService,
|
||||
private readonly _loadingService: LoadingService,
|
||||
private readonly _fileManagementControllerService: FileManagementControllerService
|
||||
private readonly _fileManagementControllerService: FileManagementControllerService,
|
||||
private readonly _translateService: TranslateService
|
||||
) {}
|
||||
|
||||
get statusBarConfig() {
|
||||
@ -45,10 +48,10 @@ export class FileActionsComponent implements OnInit {
|
||||
|
||||
get toggleTooltip(): string {
|
||||
if (!this.permissionsService.isManager()) {
|
||||
return 'file-preview.toggle-analysis.only-managers';
|
||||
return _('file-preview.toggle-analysis.only-managers');
|
||||
}
|
||||
|
||||
return this.fileStatus?.isExcluded ? 'file-preview.toggle-analysis.enable' : 'file-preview.toggle-analysis.disable';
|
||||
return this.fileStatus?.isExcluded ? _('file-preview.toggle-analysis.enable') : _('file-preview.toggle-analysis.disable');
|
||||
}
|
||||
|
||||
get canAssignToSelf() {
|
||||
@ -84,7 +87,9 @@ export class FileActionsComponent implements OnInit {
|
||||
}
|
||||
|
||||
get assignTooltip() {
|
||||
return this.fileStatus.isUnderApproval ? 'dossier-overview.assign-approver' : 'dossier-overview.assign-reviewer';
|
||||
return this.fileStatus.isUnderApproval
|
||||
? this._translateService.instant('dossier-overview.assign-approver')
|
||||
: this._translateService.instant('dossier-overview.assign-reviewer');
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
@ -115,8 +120,8 @@ export class FileActionsComponent implements OnInit {
|
||||
'confirm',
|
||||
$event,
|
||||
new ConfirmationDialogInput({
|
||||
title: 'confirmation-dialog.delete-file.title',
|
||||
question: 'confirmation-dialog.delete-file.question'
|
||||
title: _('confirmation-dialog.delete-file.title'),
|
||||
question: _('confirmation-dialog.delete-file.question')
|
||||
}),
|
||||
async () => {
|
||||
this._loadingService.start();
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
<div>
|
||||
<redaction-circle-button
|
||||
(action)="actionPerformed.emit('view-exclude-pages')"
|
||||
[tooltip]="'file-preview.tabs.exclude-pages.close' | translate"
|
||||
icon="red:close"
|
||||
tooltip="file-preview.tabs.exclude-pages.close"
|
||||
tooltipPosition="before"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
@ -46,12 +46,12 @@
|
||||
></redaction-round-checkbox>
|
||||
<span class="all-caps-label">{{ selectedAnnotations?.length || 0 }} selected </span>
|
||||
<redaction-annotation-actions
|
||||
*ngIf="selectedAnnotations?.length > 0"
|
||||
(annotationsChanged)="annotationsChanged.emit($event)"
|
||||
[canPerformAnnotationActions]="!isReadOnly"
|
||||
[annotations]="selectedAnnotations"
|
||||
[viewer]="viewer"
|
||||
*ngIf="selectedAnnotations?.length > 0"
|
||||
[alwaysVisible]="true"
|
||||
[annotations]="selectedAnnotations"
|
||||
[canPerformAnnotationActions]="!isReadOnly"
|
||||
[viewer]="viewer"
|
||||
btnType="primary"
|
||||
tooltipPosition="above"
|
||||
></redaction-annotation-actions>
|
||||
@ -99,7 +99,7 @@
|
||||
|
||||
<div style="overflow: hidden; width: 100%">
|
||||
<ng-container *ngIf="!excludePages">
|
||||
<div attr.anotation-page-header="{{ activeViewerPage }}" class="page-separator">
|
||||
<div [attr.anotation-page-header]="activeViewerPage" class="page-separator">
|
||||
<span *ngIf="!!activeViewerPage" class="all-caps-label">
|
||||
<span translate="page"></span> {{ activeViewerPage }} -
|
||||
{{ activeAnnotationsLength || 0 }}
|
||||
@ -130,7 +130,12 @@
|
||||
tabindex="1"
|
||||
>
|
||||
<ng-container *ngIf="activeViewerPage && !displayedAnnotations[activeViewerPage]">
|
||||
<redaction-empty-state [horizontalPadding]="24" [verticalPadding]="40" icon="red:document" screen="file-preview">
|
||||
<redaction-empty-state
|
||||
[horizontalPadding]="24"
|
||||
[text]="'file-preview.no-data.title' | translate"
|
||||
[verticalPadding]="40"
|
||||
icon="red:document"
|
||||
>
|
||||
<ng-container *ngIf="fileData?.fileStatus?.excludedPages?.includes(activeViewerPage)">
|
||||
{{ 'file-preview.tabs.annotations.page-is' | translate }}
|
||||
<a
|
||||
@ -146,16 +151,16 @@
|
||||
<redaction-icon-button
|
||||
(action)="jumpToPreviousWithAnnotations()"
|
||||
[disabled]="activeViewerPage <= displayedPages[0]"
|
||||
[label]="'file-preview.tabs.annotations.jump-to-previous' | translate"
|
||||
icon="red:nav-prev"
|
||||
text="file-preview.tabs.annotations.jump-to-previous"
|
||||
type="show-bg"
|
||||
></redaction-icon-button>
|
||||
<redaction-icon-button
|
||||
(action)="jumpToNextWithAnnotations()"
|
||||
[disabled]="activeViewerPage >= displayedPages[displayedPages.length - 1]"
|
||||
[label]="'file-preview.tabs.annotations.jump-to-next' | translate"
|
||||
class="mt-8"
|
||||
icon="red:nav-next"
|
||||
text="file-preview.tabs.annotations.jump-to-next"
|
||||
type="show-bg"
|
||||
></redaction-icon-button>
|
||||
</div>
|
||||
@ -164,10 +169,10 @@
|
||||
<div
|
||||
(click)="annotationClicked(annotation, $event)"
|
||||
*ngFor="let annotation of displayedAnnotations[activeViewerPage]?.annotations"
|
||||
[attr.annotation-id]="annotation.id"
|
||||
[attr.annotation-page]="activeViewerPage"
|
||||
[class.active]="isSelected(annotation)"
|
||||
[class.multi-select-active]="multiSelectActive"
|
||||
attr.annotation-id="{{ annotation.id }}"
|
||||
attr.annotation-page="{{ activeViewerPage }}"
|
||||
class="annotation-wrapper"
|
||||
>
|
||||
<div class="active-bar-marker"></div>
|
||||
@ -201,7 +206,7 @@
|
||||
<div class="actions-wrapper">
|
||||
<div
|
||||
(click)="toggleExpandComments(annotation, $event)"
|
||||
[matTooltip]="commentsTooltip(annotation)"
|
||||
[matTooltip]="'comments.comments' | translate: { count: annotation.comments?.length }"
|
||||
class="comments-counter"
|
||||
matTooltipPosition="above"
|
||||
>
|
||||
|
||||
@ -20,7 +20,6 @@ import { FileDataModel } from '@models/file/file-data.model';
|
||||
import { FilterModel } from '@shared/components/filters/popup-filter/model/filter.model';
|
||||
import { CommentsComponent } from '../comments/comments.component';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { WebViewerInstance } from '@pdftron/webviewer';
|
||||
|
||||
const COMMAND_KEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Escape'];
|
||||
@ -60,8 +59,7 @@ export class FileWorkloadComponent {
|
||||
constructor(
|
||||
private readonly _permissionsService: PermissionsService,
|
||||
private readonly _changeDetectorRef: ChangeDetectorRef,
|
||||
private readonly _annotationProcessingService: AnnotationProcessingService,
|
||||
private readonly _translateService: TranslateService
|
||||
private readonly _annotationProcessingService: AnnotationProcessingService
|
||||
) {}
|
||||
|
||||
private _annotations: AnnotationWrapper[];
|
||||
@ -114,11 +112,6 @@ export class FileWorkloadComponent {
|
||||
}
|
||||
}
|
||||
|
||||
commentsTooltip({ comments }: AnnotationWrapper): string {
|
||||
const i18nString = 'comments.' + (comments.length === 1 ? 'comment' : 'comments');
|
||||
return this._translateService.instant(i18nString, { count: comments.length });
|
||||
}
|
||||
|
||||
isSelected(annotation: AnnotationWrapper) {
|
||||
return this.selectedAnnotations?.find(a => a?.id === annotation.id);
|
||||
}
|
||||
|
||||
@ -1,34 +1,14 @@
|
||||
<div class="needs-work">
|
||||
<redaction-annotation-icon
|
||||
*ngIf="reanalysisRequired()"
|
||||
[color]="analysisColor"
|
||||
label="A"
|
||||
type="square"
|
||||
></redaction-annotation-icon>
|
||||
<redaction-annotation-icon
|
||||
*ngIf="hasUpdates"
|
||||
[color]="updatedColor"
|
||||
label="U"
|
||||
type="square"
|
||||
></redaction-annotation-icon>
|
||||
<redaction-annotation-icon *ngIf="reanalysisRequired()" [color]="analysisColor" label="A" type="square"></redaction-annotation-icon>
|
||||
<redaction-annotation-icon *ngIf="hasUpdates" [color]="updatedColor" label="U" type="square"></redaction-annotation-icon>
|
||||
<redaction-annotation-icon
|
||||
*ngIf="needsWorkInput.hasRedactions"
|
||||
[color]="redactionColor"
|
||||
label="R"
|
||||
type="square"
|
||||
></redaction-annotation-icon>
|
||||
<redaction-annotation-icon
|
||||
*ngIf="hasImages"
|
||||
[color]="imageColor"
|
||||
label="I"
|
||||
type="square"
|
||||
></redaction-annotation-icon>
|
||||
<redaction-annotation-icon
|
||||
*ngIf="needsWorkInput.hintsOnly"
|
||||
[color]="hintColor"
|
||||
label="H"
|
||||
type="circle"
|
||||
></redaction-annotation-icon>
|
||||
<redaction-annotation-icon *ngIf="hasImages" [color]="imageColor" label="I" type="square"></redaction-annotation-icon>
|
||||
<redaction-annotation-icon *ngIf="needsWorkInput.hintsOnly" [color]="hintColor" label="H" type="circle"></redaction-annotation-icon>
|
||||
<redaction-annotation-icon
|
||||
*ngIf="needsWorkInput.hasRequests"
|
||||
[color]="suggestionColor"
|
||||
|
||||
@ -2,20 +2,17 @@
|
||||
<redaction-input-with-action
|
||||
(action)="excludePagesRange()"
|
||||
[form]="excludePagesForm"
|
||||
[hint]="'file-preview.tabs.exclude-pages.hint' | translate"
|
||||
[placeholder]="'file-preview.tabs.exclude-pages.input-placeholder' | translate"
|
||||
autocomplete="off"
|
||||
hint="file-preview.tabs.exclude-pages.hint"
|
||||
icon="red:check"
|
||||
placeholder="file-preview.tabs.exclude-pages.input-placeholder"
|
||||
type="action"
|
||||
width="full"
|
||||
></redaction-input-with-action>
|
||||
</div>
|
||||
|
||||
<div *ngIf="excludedPagesRanges.length" class="all-caps-label-container">
|
||||
<div
|
||||
class="all-caps-label"
|
||||
translate="file-preview.tabs.exclude-pages.removed-from-redaction"
|
||||
></div>
|
||||
<div class="all-caps-label" translate="file-preview.tabs.exclude-pages.removed-from-redaction"></div>
|
||||
</div>
|
||||
|
||||
<div class="ranges" redactionHasScrollbar>
|
||||
@ -23,14 +20,12 @@
|
||||
<ng-container *ngIf="range.startPage === range.endPage">
|
||||
{{ range.startPage }}
|
||||
</ng-container>
|
||||
<ng-container *ngIf="range.startPage !== range.endPage">
|
||||
{{ range.startPage }}-{{ range.endPage }}
|
||||
</ng-container>
|
||||
<ng-container *ngIf="range.startPage !== range.endPage"> {{ range.startPage }} -{{ range.endPage }} </ng-container>
|
||||
<redaction-circle-button
|
||||
(action)="includePagesRange(range)"
|
||||
*ngIf="permissionsService.canExcludePages()"
|
||||
[tooltip]="'file-preview.tabs.exclude-pages.put-back' | translate"
|
||||
icon="red:undo"
|
||||
tooltip="file-preview.tabs.exclude-pages.put-back"
|
||||
></redaction-circle-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3,8 +3,9 @@ import { PermissionsService } from '@services/permissions.service';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { PageRange, ReanalysisControllerService } from '@redaction/red-ui-http';
|
||||
import { FileDataModel } from '../../../../models/file/file-data.model';
|
||||
import { Toaster } from '../../../../services/toaster.service';
|
||||
import { LoadingService } from '../../../../services/loading.service';
|
||||
import { Toaster } from '@services/toaster.service';
|
||||
import { LoadingService } from '@services/loading.service';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-page-exclusion',
|
||||
@ -78,7 +79,7 @@ export class PageExclusionComponent implements OnChanges {
|
||||
this.excludePagesForm.reset();
|
||||
this.actionPerformed.emit('exclude-pages');
|
||||
} catch (e) {
|
||||
this._toaster.error('file-preview.tabs.exclude-pages.error');
|
||||
this._toaster.error(_('file-preview.tabs.exclude-pages.error'));
|
||||
this._loadingService.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,4 @@
|
||||
import {
|
||||
Component,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnChanges,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
Output,
|
||||
SimpleChanges
|
||||
} from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||
import { ViewedPages, ViewedPagesControllerService } from '@redaction/red-ui-http';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
@ -104,11 +95,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy {
|
||||
|
||||
private _markPageRead() {
|
||||
this._viewedPagesControllerService
|
||||
.addPage(
|
||||
{ page: this.number },
|
||||
this._appStateService.activeDossierId,
|
||||
this._appStateService.activeFileId
|
||||
)
|
||||
.addPage({ page: this.number }, this._appStateService.activeDossierId, this._appStateService.activeFileId)
|
||||
.subscribe(() => {
|
||||
this.viewedPages?.pages?.push(this.number);
|
||||
});
|
||||
@ -116,11 +103,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy {
|
||||
|
||||
private _markPageUnread() {
|
||||
this._viewedPagesControllerService
|
||||
.removePage(
|
||||
this._appStateService.activeDossierId,
|
||||
this._appStateService.activeFileId,
|
||||
this.number
|
||||
)
|
||||
.removePage(this._appStateService.activeDossierId, this._appStateService.activeFileId, this.number)
|
||||
.subscribe(() => {
|
||||
this.viewedPages?.pages?.splice(this.viewedPages?.pages?.indexOf(this.number), 1);
|
||||
});
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user