Merge branch 'master' into VM/DossierEditorPermissions
This commit is contained in:
commit
eeeadd4f70
@ -1,9 +1,5 @@
|
||||
@use 'variables';
|
||||
|
||||
.mt-2 {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
::ng-deep .notifications-backdrop + .cdk-overlay-connected-position-bounding-box {
|
||||
right: 0 !important;
|
||||
|
||||
@ -20,6 +16,7 @@
|
||||
|
||||
.view-all {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: var(--iqser-primary);
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import { UserPreferenceService } from '@services/user-preference.service';
|
||||
export class LanguageService {
|
||||
constructor(private readonly _translateService: TranslateService, private readonly _userPreferenceService: UserPreferenceService) {
|
||||
_translateService.addLangs(['en', 'de']);
|
||||
_translateService.setDefaultLang('en');
|
||||
}
|
||||
|
||||
get currentLanguage() {
|
||||
|
||||
@ -13,7 +13,3 @@
|
||||
left: 270px;
|
||||
}
|
||||
}
|
||||
|
||||
.mt-44 {
|
||||
margin-top: 44px;
|
||||
}
|
||||
|
||||
@ -10,10 +10,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.mb-14 {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.technical-name {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@ -60,7 +60,6 @@
|
||||
*ngIf="form.get('userId').value !== ALL_USERS"
|
||||
[user]="form.get('userId').value"
|
||||
[withName]="true"
|
||||
size="small"
|
||||
></redaction-initials-avatar>
|
||||
<div *ngIf="form.get('userId').value === ALL_USERS" [translate]="ALL_USERS"></div>
|
||||
</mat-select-trigger>
|
||||
@ -69,7 +68,6 @@
|
||||
*ngIf="userId !== ALL_USERS"
|
||||
[user]="userId"
|
||||
[withName]="true"
|
||||
size="small"
|
||||
></redaction-initials-avatar>
|
||||
<div *ngIf="userId === ALL_USERS" [translate]="ALL_USERS"></div>
|
||||
</mat-option>
|
||||
@ -109,7 +107,7 @@
|
||||
</div>
|
||||
|
||||
<div class="user-column cell">
|
||||
<redaction-initials-avatar [user]="log.userId" [withName]="true" size="small"></redaction-initials-avatar>
|
||||
<redaction-initials-avatar [user]="log.userId" [withName]="true"></redaction-initials-avatar>
|
||||
</div>
|
||||
|
||||
<div [translate]="translations[log.category]" class="cell"></div>
|
||||
|
||||
@ -17,11 +17,3 @@ form {
|
||||
font-size: 16px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.mr-0 {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.mr-20 {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
@ -84,7 +84,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mb-5 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
<iqser-circle-button
|
||||
(action)="hardDelete()"
|
||||
*ngIf="listingService.areSomeSelected$ | async"
|
||||
*ngIf="canDeleteSelected$ | async"
|
||||
[tooltip]="'edit-dossier-dialog.deleted-documents.bulk.delete' | translate"
|
||||
[type]="circleButtonTypes.dark"
|
||||
icon="iqser:trash"
|
||||
@ -48,6 +48,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell user-column">
|
||||
<redaction-initials-avatar [user]="file.assignee" [withName]="true"></redaction-initials-avatar>
|
||||
</div>
|
||||
|
||||
<div class="cell">
|
||||
<iqser-status-bar
|
||||
[configs]="[
|
||||
{
|
||||
color: file.workflowStatus,
|
||||
label: fileStatusTranslations[file.workflowStatus] | translate,
|
||||
length: 1,
|
||||
cssClass: 'all-caps-label'
|
||||
}
|
||||
]"
|
||||
[small]="true"
|
||||
></iqser-status-bar>
|
||||
</div>
|
||||
|
||||
<div class="cell">
|
||||
<span class="small-label">{{ file.softDeleted | date: 'exactDate' }}</span>
|
||||
</div>
|
||||
@ -65,6 +83,7 @@
|
||||
|
||||
<iqser-circle-button
|
||||
(action)="hardDelete([file])"
|
||||
*ngIf="file.canHardDelete"
|
||||
[tooltip]="'edit-dossier-dialog.deleted-documents.action.delete' | translate"
|
||||
[type]="circleButtonTypes.dark"
|
||||
icon="iqser:trash"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Component, forwardRef, Injector, Input, OnInit } from '@angular/core';
|
||||
import { EditDossierSaveResult, EditDossierSectionInterface } from '../edit-dossier-section.interface';
|
||||
import { Dossier, IFile } from '@red/domain';
|
||||
import { Dossier, File, IFile } from '@red/domain';
|
||||
import {
|
||||
CircleButtonTypes,
|
||||
ConfirmationDialogInput,
|
||||
@ -21,8 +21,12 @@ import { distinctUntilChanged, map } from 'rxjs/operators';
|
||||
import { DossiersDialogService } from '../../../services/dossiers-dialog.service';
|
||||
import { FilesService } from '@services/entity-services/files.service';
|
||||
import { FileManagementService } from '@services/entity-services/file-management.service';
|
||||
import { workflowFileStatusTranslations } from '../../../translations/file-status-translations';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { UserService } from '@services/user.service';
|
||||
|
||||
interface FileListItem extends IFile, IListable {
|
||||
readonly canHardDelete: boolean;
|
||||
readonly canRestore: boolean;
|
||||
readonly restoreDate: string;
|
||||
}
|
||||
@ -37,14 +41,18 @@ interface FileListItem extends IFile, IListable {
|
||||
],
|
||||
})
|
||||
export class EditDossierDeletedDocumentsComponent extends ListingComponent<FileListItem> implements EditDossierSectionInterface, OnInit {
|
||||
readonly fileStatusTranslations = workflowFileStatusTranslations;
|
||||
@Input() dossier: Dossier;
|
||||
readonly changed = false;
|
||||
readonly valid = false;
|
||||
readonly canRestoreSelected$ = this._canRestoreSelected$;
|
||||
readonly canDeleteSelected$ = this._canDeleteSelected$;
|
||||
disabled: boolean;
|
||||
readonly tableColumnConfigs: TableColumnConfig<FileListItem>[] = [
|
||||
{ label: _('edit-dossier-dialog.deleted-documents.table-col-names.name'), width: '3fr' },
|
||||
{ label: _('edit-dossier-dialog.deleted-documents.table-col-names.pages') },
|
||||
{ label: _('edit-dossier-dialog.deleted-documents.table-col-names.assignee'), class: 'user-column' },
|
||||
{ label: _('edit-dossier-dialog.deleted-documents.table-col-names.status') },
|
||||
{ label: _('edit-dossier-dialog.deleted-documents.table-col-names.deleted-on'), sortByKey: 'softDeleted', width: '2fr' },
|
||||
{ label: _('edit-dossier-dialog.deleted-documents.table-col-names.time-to-restore'), sortByKey: 'softDeleted', width: '2fr' },
|
||||
];
|
||||
@ -59,6 +67,8 @@ export class EditDossierDeletedDocumentsComponent extends ListingComponent<FileL
|
||||
private readonly _loadingService: LoadingService,
|
||||
private readonly _configService: ConfigService,
|
||||
private readonly _dialogService: DossiersDialogService,
|
||||
private readonly _permissionsService: PermissionsService,
|
||||
private readonly _userService: UserService,
|
||||
) {
|
||||
super(_injector);
|
||||
}
|
||||
@ -70,6 +80,13 @@ export class EditDossierDeletedDocumentsComponent extends ListingComponent<FileL
|
||||
);
|
||||
}
|
||||
|
||||
private get _canDeleteSelected$(): Observable<boolean> {
|
||||
return this.listingService.selectedEntities$.pipe(
|
||||
map(entities => entities.length && !entities.find(file => !file.canHardDelete)),
|
||||
distinctUntilChanged(),
|
||||
);
|
||||
}
|
||||
|
||||
hardDelete(files = this.listingService.selected) {
|
||||
const data = new ConfirmationDialogInput({
|
||||
title: _('confirmation-dialog.permanently-delete-file.title'),
|
||||
@ -133,21 +150,26 @@ export class EditDossierDeletedDocumentsComponent extends ListingComponent<FileL
|
||||
return files.map(file => this._toListItem(file));
|
||||
}
|
||||
|
||||
private _toListItem(file: IFile): FileListItem {
|
||||
const restoreDate = this._getRestoreDate(file.softDeleted);
|
||||
private _toListItem(_file: IFile): FileListItem {
|
||||
const file = new File(_file, this._userService.getNameForId(_file.assignee));
|
||||
const restoreDate = this._getRestoreDate(_file.softDeleted);
|
||||
return {
|
||||
id: file.fileId,
|
||||
...file,
|
||||
restoreDate,
|
||||
searchKey: file.filename,
|
||||
canRestore: this._canRestoreFile(restoreDate),
|
||||
canRestore: this._canRestore(file, restoreDate),
|
||||
canHardDelete: this._canPerformActions(file),
|
||||
};
|
||||
}
|
||||
|
||||
private _canRestoreFile(restoreDate: string): boolean {
|
||||
const { daysLeft, hoursLeft, minutesLeft } = getLeftDateTime(restoreDate);
|
||||
private _canPerformActions(file: File): boolean {
|
||||
return this._userService.currentUser.isManager || this._permissionsService.canDeleteFile(file);
|
||||
}
|
||||
|
||||
return daysLeft >= 0 && hoursLeft >= 0 && minutesLeft >= 0;
|
||||
private _canRestore(file: File, restoreDate: string): boolean {
|
||||
const { daysLeft, hoursLeft, minutesLeft } = getLeftDateTime(restoreDate);
|
||||
return this._canPerformActions(file) && daysLeft + hoursLeft + minutesLeft > 0;
|
||||
}
|
||||
|
||||
private _getRestoreDate(softDeletedTime: string): string {
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<redaction-team-members
|
||||
(remove)="toggleSelected($event)"
|
||||
[canAdd]="false"
|
||||
[canRemove]="true"
|
||||
[canRemove]="!disabled"
|
||||
[dossierId]="dossier.dossierId"
|
||||
[largeSpacing]="true"
|
||||
[memberIds]="selectedApproversList"
|
||||
@ -21,13 +21,11 @@
|
||||
[unremovableMembers]="[selectedOwnerId]"
|
||||
></redaction-team-members>
|
||||
|
||||
<pre *ngIf="selectedApproversList.length === 0" [innerHTML]="'assign-dossier-owner.dialog.no-approvers' | translate" class="info"></pre>
|
||||
|
||||
<div class="all-caps-label mt-16" translate="assign-dossier-owner.dialog.reviewers"></div>
|
||||
<redaction-team-members
|
||||
(remove)="toggleSelected($event)"
|
||||
[canAdd]="false"
|
||||
[canRemove]="true"
|
||||
[canRemove]="!disabled"
|
||||
[dossierId]="dossier.dossierId"
|
||||
[largeSpacing]="true"
|
||||
[memberIds]="selectedReviewers$ | async"
|
||||
@ -35,34 +33,35 @@
|
||||
[unremovableMembers]="[selectedOwnerId]"
|
||||
></redaction-team-members>
|
||||
|
||||
<pre
|
||||
*ngIf="(selectedReviewers$ | async).length === 0"
|
||||
[innerHTML]="'assign-dossier-owner.dialog.no-reviewers' | translate"
|
||||
class="info"
|
||||
></pre>
|
||||
<ng-container *ngIf="(selectedReviewers$ | async).length === 0">
|
||||
<div class="info mt-4">{{ 'assign-dossier-owner.dialog.no-reviewers' | translate }}</div>
|
||||
<div *ngIf="!disabled" class="info">{{ 'assign-dossier-owner.dialog.select-below' | translate }}</div>
|
||||
</ng-container>
|
||||
|
||||
<iqser-input-with-action
|
||||
(valueChange)="setMembersSelectOptions($event)"
|
||||
[(value)]="searchQuery"
|
||||
[placeholder]="'assign-dossier-owner.dialog.search' | translate"
|
||||
[width]="560"
|
||||
class="search-container"
|
||||
></iqser-input-with-action>
|
||||
<ng-container *ngIf="!disabled">
|
||||
<iqser-input-with-action
|
||||
(valueChange)="setMembersSelectOptions($event)"
|
||||
[(value)]="searchQuery"
|
||||
[placeholder]="'assign-dossier-owner.dialog.search' | translate"
|
||||
[width]="560"
|
||||
class="search-container"
|
||||
></iqser-input-with-action>
|
||||
|
||||
<div class="members-list">
|
||||
<div
|
||||
(click)="!isOwner(userId) && toggleSelected(userId)"
|
||||
*ngFor="let userId of membersSelectOptions"
|
||||
[class.selected]="isMemberSelected(userId)"
|
||||
>
|
||||
<redaction-initials-avatar [user]="userId" [withName]="true" size="large"></redaction-initials-avatar>
|
||||
<div class="actions">
|
||||
<div (click)="toggleApprover(userId, $event)" *ngIf="!isOwner(userId)" class="make-approver">
|
||||
<iqser-round-checkbox [active]="isApprover(userId)" class="mr-8"></iqser-round-checkbox>
|
||||
<span translate="assign-dossier-owner.dialog.make-approver"></span>
|
||||
<div class="members-list">
|
||||
<div
|
||||
(click)="!isOwner(userId) && toggleSelected(userId)"
|
||||
*ngFor="let userId of membersSelectOptions"
|
||||
[class.selected]="isMemberSelected(userId)"
|
||||
>
|
||||
<redaction-initials-avatar [user]="userId" [withName]="true" size="large"></redaction-initials-avatar>
|
||||
<div class="actions">
|
||||
<div (click)="toggleApprover(userId, $event)" *ngIf="!isOwner(userId)" class="make-approver">
|
||||
<iqser-round-checkbox [active]="isApprover(userId)" class="mr-8"></iqser-round-checkbox>
|
||||
<span translate="assign-dossier-owner.dialog.make-approver"></span>
|
||||
</div>
|
||||
<mat-icon *ngIf="!isOwner(userId)" svgIcon="iqser:check"></mat-icon>
|
||||
</div>
|
||||
<mat-icon *ngIf="!isOwner(userId)" svgIcon="iqser:check"></mat-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</form>
|
||||
|
||||
@ -60,7 +60,3 @@ redaction-team-members {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { Dossier, IDossierRequest } from '@red/domain';
|
||||
import { AutoUnsubscribe } from '@iqser/common-ui';
|
||||
@ -146,7 +146,10 @@ export class EditDossierTeamComponent extends AutoUnsubscribe implements EditDos
|
||||
|
||||
private _loadData() {
|
||||
this.form = this._formBuilder.group({
|
||||
owner: [this.dossier?.ownerId, Validators.required],
|
||||
owner: {
|
||||
value: this.dossier?.ownerId,
|
||||
disabled: this.disabled,
|
||||
},
|
||||
approvers: [[...this.dossier?.approverIds]],
|
||||
members: [[...this.dossier?.memberIds]],
|
||||
});
|
||||
|
||||
@ -54,7 +54,3 @@ redaction-file-workload {
|
||||
redaction-file-actions:not(.keep-visible) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mt-4 {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
@ -53,10 +53,6 @@
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.ml-2 {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.analysis-progress {
|
||||
padding: 12px 20px;
|
||||
max-width: 400px;
|
||||
|
||||
@ -28,5 +28,5 @@
|
||||
</div>
|
||||
|
||||
<ng-template #avatar let-userId="userId">
|
||||
<redaction-initials-avatar [user]="userId" [withName]="true" color="gray" size="small"></redaction-initials-avatar>
|
||||
<redaction-initials-avatar [user]="userId" [withName]="true" color="gray"></redaction-initials-avatar>
|
||||
</ng-template>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<button [class.overlay]="showDot" mat-button>
|
||||
<redaction-initials-avatar [user]="userService.currentUser$ | async" [withName]="true" size="small"></redaction-initials-avatar>
|
||||
<redaction-initials-avatar [user]="userService.currentUser$ | async" [withName]="true"></redaction-initials-avatar>
|
||||
<mat-icon svgIcon="iqser:arrow-down"></mat-icon>
|
||||
</button>
|
||||
<div *ngIf="showDot" class="dot"></div>
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
:host {
|
||||
@extend .user-button;
|
||||
min-width: fit-content;
|
||||
|
||||
button {
|
||||
padding: 0 10px 0 5px;
|
||||
|
||||
@ -50,10 +50,6 @@ form {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mr-32 {
|
||||
margin-right: 32px;
|
||||
}
|
||||
|
||||
.w-450 {
|
||||
width: 100%;
|
||||
max-width: 450px;
|
||||
|
||||
@ -68,6 +68,7 @@ export class EditorComponent implements OnInit, OnChanges {
|
||||
glyphMargin: true,
|
||||
automaticLayout: true,
|
||||
readOnly: !this.canEdit,
|
||||
extraEditorClassName: this.canEdit ? '' : 'disabled',
|
||||
};
|
||||
}
|
||||
|
||||
@ -79,19 +80,12 @@ export class EditorComponent implements OnInit, OnChanges {
|
||||
this._diffEditor.getModifiedEditor().onDidChangeModelContent(() => {
|
||||
this.value = this._diffEditor.getModel().modified.getValue();
|
||||
});
|
||||
this._setTheme();
|
||||
}
|
||||
|
||||
onCodeEditorInit(editor: ICodeEditor): void {
|
||||
this.codeEditor = editor;
|
||||
(window as any).monaco.editor.defineTheme('redaction', {
|
||||
base: 'vs',
|
||||
inherit: true,
|
||||
rules: [],
|
||||
colors: {
|
||||
'editor.lineHighlightBackground': '#f4f5f7',
|
||||
},
|
||||
});
|
||||
(window as any).monaco.editor.setTheme('redaction');
|
||||
this._setTheme();
|
||||
}
|
||||
|
||||
@Debounce()
|
||||
@ -107,6 +101,34 @@ export class EditorComponent implements OnInit, OnChanges {
|
||||
this._diffEditor?.getModifiedEditor().setValue(this.diffValue);
|
||||
}
|
||||
|
||||
private _defineThemes(): void {
|
||||
(window as any).monaco.editor.defineTheme('redaction', {
|
||||
base: 'vs',
|
||||
inherit: true,
|
||||
rules: [],
|
||||
colors: {
|
||||
'editor.lineHighlightBackground': '#f4f5f7',
|
||||
},
|
||||
});
|
||||
(window as any).monaco.editor.defineTheme('redaction-disabled', {
|
||||
base: 'vs',
|
||||
inherit: true,
|
||||
rules: [],
|
||||
colors: {
|
||||
'editor.background': '#f4f5f7',
|
||||
'editor.foreground': '#9398a0',
|
||||
'editor.lineHighlightBackground': '#f4f5f7',
|
||||
'editorLineNumber.foreground': '#9398a0',
|
||||
'editorActiveLineNumber.foreground': '#9398a0',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
private _setTheme(): void {
|
||||
this._defineThemes();
|
||||
(window as any).monaco.editor.setTheme(this.canEdit ? 'redaction' : 'redaction-disabled');
|
||||
}
|
||||
|
||||
private _handleMarginButtonClick(event: IEditorMouseEvent) {
|
||||
const isMarginButtonClick = event.target.detail.glyphMarginWidth && event.target.detail.glyphMarginWidth !== 0;
|
||||
if (isMarginButtonClick) {
|
||||
|
||||
@ -21,7 +21,3 @@ mat-slide-toggle {
|
||||
color: rgba(var(--iqser-accent-rgb), 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.ml-0 {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
>
|
||||
{{ _user | name: { showInitials: true } }}
|
||||
</div>
|
||||
<div *ngIf="withName" [class.disabled]="disabled" class="clamp-2 username">
|
||||
<div *ngIf="withName" [class.disabled]="disabled" class="clamp-1 username">
|
||||
{{ userName }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { GenericService, RequiredParam, Validate } from '@iqser/common-ui';
|
||||
import { IGeneralConfiguration } from '@red/domain';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class GeneralSettingsService extends GenericService<IGeneralConfiguration> {
|
||||
constructor(protected readonly _injector: Injector, private readonly _userService: UserService) {
|
||||
constructor(protected readonly _injector: Injector) {
|
||||
super(_injector, 'configuration');
|
||||
}
|
||||
|
||||
getGeneralConfigurations() {
|
||||
getGeneralConfigurations(): Observable<IGeneralConfiguration> {
|
||||
return this._getOne(['general']);
|
||||
}
|
||||
|
||||
|
||||
@ -135,7 +135,7 @@ export class PermissionsService {
|
||||
}
|
||||
|
||||
canExcludePages(file: File): boolean {
|
||||
return this.isFileAssignee(file);
|
||||
return this.canPerformAnnotationActions(file);
|
||||
}
|
||||
|
||||
canDeleteComment(comment: IComment, file: File) {
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { catchError, filter, mergeMap, switchMap, take, tap } from 'rxjs/operators';
|
||||
import { catchError, filter, mapTo, switchMap, take, tap } from 'rxjs/operators';
|
||||
import { ConfigService } from '@services/config.service';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import { from, of, throwError } from 'rxjs';
|
||||
import { KeycloakEventType, KeycloakService } from 'keycloak-angular';
|
||||
import { GeneralSettingsService } from '@services/general-settings.service';
|
||||
import { LanguageService } from '@i18n/language.service';
|
||||
import { UserPreferenceService } from '@services/user-preference.service';
|
||||
import { from, iif, of, throwError } from 'rxjs';
|
||||
|
||||
export function configurationInitializer(
|
||||
keycloakService: KeycloakService,
|
||||
@ -15,16 +15,22 @@ export function configurationInitializer(
|
||||
languageService: LanguageService,
|
||||
userPreferenceService: UserPreferenceService,
|
||||
) {
|
||||
const userConfig$ = generalSettingsService.getGeneralConfigurations().pipe(
|
||||
switchMap(config => from(userPreferenceService.reload()).pipe(mapTo(config))),
|
||||
tap(() => languageService.chooseAndSetInitialLanguage()),
|
||||
);
|
||||
|
||||
return () =>
|
||||
keycloakService.keycloakEvents$
|
||||
.pipe(
|
||||
filter(event => event.type === KeycloakEventType.OnReady),
|
||||
switchMap(() => from(keycloakService.isLoggedIn())),
|
||||
switchMap(loggedIn => (!loggedIn ? throwError('Not Logged In') : of({}))),
|
||||
mergeMap(() => generalSettingsService.getGeneralConfigurations()),
|
||||
switchMap(loggedIn => {
|
||||
const hasAnyRedRoles = !!keycloakService.getUserRoles().find(role => role.startsWith('RED_'));
|
||||
return !loggedIn ? throwError('Not Logged In') : of(hasAnyRedRoles);
|
||||
}),
|
||||
switchMap(hasRoles => iif(() => !!hasRoles, userConfig$, of({ displayName: 'RedactManager' }))),
|
||||
tap(configuration => configService.updateDisplayName(configuration.displayName)),
|
||||
switchMap(() => userPreferenceService.reload()),
|
||||
tap(() => languageService.chooseAndSetInitialLanguage()),
|
||||
catchError(() => {
|
||||
title.setTitle('RedactManager');
|
||||
return of({});
|
||||
|
||||
@ -296,10 +296,10 @@
|
||||
"dialog": {
|
||||
"approvers": "Approvers",
|
||||
"make-approver": "Make Approver",
|
||||
"no-approvers": "No approvers yet.\nSelect from the list below.",
|
||||
"no-reviewers": "No reviewers yet.\nSelect from the list below.",
|
||||
"no-reviewers": "No members with \"review only\" permission.",
|
||||
"reviewers": "Reviewers",
|
||||
"search": "Search...",
|
||||
"select-below": "Select from the list below.",
|
||||
"single-user": "Owner"
|
||||
}
|
||||
},
|
||||
@ -878,9 +878,11 @@
|
||||
"title": "There are no deleted documents."
|
||||
},
|
||||
"table-col-names": {
|
||||
"assignee": "Assignee",
|
||||
"deleted-on": "Deleted On",
|
||||
"name": "Name",
|
||||
"pages": "Pages",
|
||||
"status": "Status",
|
||||
"time-to-restore": "Time To Restore"
|
||||
},
|
||||
"table-header": {
|
||||
@ -1309,7 +1311,7 @@
|
||||
"dossier-deleted": "Dossier: <b>{dossierName}</b> has been deleted!",
|
||||
"dossier-owner-removed": "<b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b> owner removed!",
|
||||
"dossier-owner-set": " <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b> owner changed to <b>{user}</b>!",
|
||||
"download-ready": "Your <b><a href='/ui/main/downloads', target=\"_blank\">download</a><b> is ready!",
|
||||
"download-ready": "Your <b><a href='/ui/main/downloads', target=\"_blank\">download</a></b> is ready!",
|
||||
"no-data": "You currently have no notifications",
|
||||
"unassigned-from-file": "You have been unassigned from <b><a href=\"{fileHref}\" target=\"_blank\">{fileName}</a></b> in dossier: <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a><b>!",
|
||||
"user-becomes-dossier-member": "You have been added to dossier: <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b>!",
|
||||
|
||||
@ -1,5 +1,39 @@
|
||||
@use 'variables';
|
||||
|
||||
.monaco-diff-editor {
|
||||
.editor.original {
|
||||
right: 30px !important; // diffOverviewRuler size
|
||||
left: unset !important;
|
||||
}
|
||||
|
||||
.editor.modified {
|
||||
left: 0 !important;
|
||||
width: unset !important;
|
||||
}
|
||||
|
||||
.diffOverview {
|
||||
.diffOverviewRuler.original {
|
||||
left: 15px !important;
|
||||
}
|
||||
|
||||
.diffOverviewRuler.modified {
|
||||
right: 15px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.monaco-editor.disabled {
|
||||
cursor: default;
|
||||
|
||||
.monaco-mouse-cursor-text {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.cursors-layer > .cursor {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.changed-row-marker {
|
||||
background: rgba(variables.$primary, 0.1);
|
||||
}
|
||||
|
||||
@ -32,25 +32,3 @@
|
||||
$iqser-yellow-2: vars.$yellow-2,
|
||||
$iqser-helpmode-primary: vars.$green-2
|
||||
);
|
||||
|
||||
.monaco-diff-editor {
|
||||
.editor.original {
|
||||
right: 30px !important; // diffOverviewRuler size
|
||||
left: unset !important;
|
||||
}
|
||||
|
||||
.editor.modified {
|
||||
left: 0 !important;
|
||||
width: unset !important;
|
||||
}
|
||||
|
||||
.diffOverview {
|
||||
.diffOverviewRuler.original {
|
||||
left: 15px !important;
|
||||
}
|
||||
|
||||
.diffOverviewRuler.modified {
|
||||
right: 15px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.atlassian.bamboo</groupId>
|
||||
<artifactId>bamboo-specs-parent</artifactId>
|
||||
<version>8.0.2</version>
|
||||
<version>8.1.1</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
|
||||
@ -59,7 +59,8 @@ public class PlanSpec {
|
||||
public Plan createDockerBuildPlan() {
|
||||
return new Plan(project(), "Redaction UI", new BambooKey("UI"))
|
||||
.description("Docker build for Redaction UI.")
|
||||
.stages(new Stage("Build Stage").jobs(creatGinCloudPlatformImagesJob("red-ui")))
|
||||
.stages(new Stage("UI Build Stage")
|
||||
.jobs(creatGinCloudPlatformImagesJob("red-ui")))
|
||||
.stages(new Stage("Release")
|
||||
.manual(true)
|
||||
.jobs(createRelease()))
|
||||
@ -70,14 +71,12 @@ public class PlanSpec {
|
||||
}
|
||||
|
||||
public Job creatGinCloudPlatformImagesJob(String project) {
|
||||
return new Job("Build Job: " + project, new BambooKey(project.toUpperCase().replaceAll("-", "")))
|
||||
return new Job("Build Job UI" , new BambooKey("UIBUILD"))
|
||||
.tasks(
|
||||
new CleanWorkingDirectoryTask().description("My clean working directory task"),
|
||||
// Checkout
|
||||
new VcsCheckoutTask().description("Checkout Default Repository")
|
||||
.checkoutItems(new CheckoutItem().defaultRepository().path("redaction-ui")),
|
||||
new VcsCheckoutTask().description("Checkout UI Shared Lib")
|
||||
.checkoutItems(new CheckoutItem().repository("Shared Libraries / common-ui").path("common-ui")),
|
||||
|
||||
// Build
|
||||
new ScriptTask().description("Build")
|
||||
|
||||
@ -5,13 +5,8 @@ set -e
|
||||
imageName="nexus.iqser.com:5001/red/$PROJECT"
|
||||
dockerfileLocation="docker/$PROJECT/Dockerfile"
|
||||
|
||||
echo "submodule status"
|
||||
git submodule status
|
||||
commonUIVersion=$(git submodule status | awk '{ print $1 }' | sed 's|-||g')
|
||||
echo $commonUIVersion
|
||||
cd ../common-ui
|
||||
git checkout $commonUIVersion
|
||||
cd ../redaction-ui
|
||||
mv ../common-ui ./libs/
|
||||
|
||||
echo "On branch $bamboo_planRepository_branchName building project $PROJECT"
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 45a12070bfe5c9aa36f24c4e08da157796e881ab
|
||||
Subproject commit 6527ccd3077bfcb4bedf729bf09edc5bd1449502
|
||||
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "redaction",
|
||||
"version": "3.115.0",
|
||||
"version": "3.132.0",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "nx build",
|
||||
"build-lint-all": "ng lint --project=red-ui --fix && ng lint --project=common-ui --fix && ng build --project=red-ui --configuration production --base-href /ui/",
|
||||
"build-lint-all": "ng build --project=red-ui --configuration production --base-href /ui/",
|
||||
"build-paligo-styles": "mkdir -p dist/paligo-styles && sass --load-path=. paligo-styles/style.scss > dist/paligo-styles/redacto-theme.css",
|
||||
"i18n:extract": "ngx-translate-extract --input ./apps/red-ui/src ./libs/common-ui/src --output apps/red-ui/src/assets/i18n/en.json --clean --sort --format namespaced-json && prettier apps/red-ui/src/assets/i18n/*.json --write",
|
||||
"postinstall": "ngcc --properties es2015 browser module main",
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user