Merge branch 'VM/RED-8463' into 'master'
RED-8463 & RED-8186 See merge request redactmanager/red-ui!318
This commit is contained in:
commit
b2c8fd08f4
@ -104,7 +104,12 @@ export class AuditScreenComponent extends ListingComponent<Audit> implements OnI
|
|||||||
const from = this.form.get('from').value;
|
const from = this.form.get('from').value;
|
||||||
let to = this.form.get('to').value;
|
let to = this.form.get('to').value;
|
||||||
if (to) {
|
if (to) {
|
||||||
to = to.clone().add(1, 'd');
|
const hoursLeft = new Date(to).getHours();
|
||||||
|
const minutesLeft = new Date(to).getMinutes();
|
||||||
|
to = to
|
||||||
|
.clone()
|
||||||
|
.add(24 - hoursLeft - 1, 'h')
|
||||||
|
.add(60 - minutesLeft - 1);
|
||||||
}
|
}
|
||||||
const logsRequestBody: IAuditSearchRequest = {
|
const logsRequestBody: IAuditSearchRequest = {
|
||||||
pageSize: PAGE_SIZE,
|
pageSize: PAGE_SIZE,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<button
|
<button
|
||||||
(click)="switchView(viewModes.STANDARD)"
|
(click)="switchView(viewModes.STANDARD)"
|
||||||
[attr.help-mode-key]="'views'"
|
[attr.help-mode-key]="!isDocumine ? 'views' : ''"
|
||||||
[class.active]="viewModeService.isStandard()"
|
[class.active]="viewModeService.isStandard()"
|
||||||
[matTooltipPosition]="'above'"
|
[matTooltipPosition]="'above'"
|
||||||
[matTooltip]="'file-preview.standard-tooltip' | translate"
|
[matTooltip]="'file-preview.standard-tooltip' | translate"
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { Roles } from '@users/roles';
|
|||||||
import { FileDataService } from '../../services/file-data.service';
|
import { FileDataService } from '../../services/file-data.service';
|
||||||
import { FilePreviewStateService } from '../../services/file-preview-state.service';
|
import { FilePreviewStateService } from '../../services/file-preview-state.service';
|
||||||
import { ViewModeService } from '../../services/view-mode.service';
|
import { ViewModeService } from '../../services/view-mode.service';
|
||||||
|
import { getConfig } from '@iqser/common-ui';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'redaction-view-switch',
|
selector: 'redaction-view-switch',
|
||||||
@ -11,19 +12,20 @@ import { ViewModeService } from '../../services/view-mode.service';
|
|||||||
styleUrls: ['./view-switch.component.scss'],
|
styleUrls: ['./view-switch.component.scss'],
|
||||||
})
|
})
|
||||||
export class ViewSwitchComponent {
|
export class ViewSwitchComponent {
|
||||||
readonly roles = Roles;
|
protected readonly isDocumine = getConfig().IS_DOCUMINE;
|
||||||
readonly viewModes = ViewModes;
|
protected readonly roles = Roles;
|
||||||
readonly canSwitchToDeltaView = computed(() => {
|
protected readonly viewModes = ViewModes;
|
||||||
|
protected readonly canSwitchToDeltaView = computed(() => {
|
||||||
const annotations = this._fileDataService.annotations();
|
const annotations = this._fileDataService.annotations();
|
||||||
const file = this._state.file();
|
const file = this._state.file();
|
||||||
const hasChangeLog = annotations.some(a => a.isChangeLogEntry);
|
const hasChangeLog = annotations.some(a => a.isChangeLogEntry);
|
||||||
return hasChangeLog && !file.isApproved;
|
return hasChangeLog && !file.isApproved;
|
||||||
});
|
});
|
||||||
readonly canSwitchToRedactedView = computed(() => {
|
protected readonly canSwitchToRedactedView = computed(() => {
|
||||||
const file = this._state.file();
|
const file = this._state.file();
|
||||||
return !file.analysisRequired && !file.excluded;
|
return !file.analysisRequired && !file.excluded;
|
||||||
});
|
});
|
||||||
readonly canSwitchToEarmarksView = computed(() => {
|
protected readonly canSwitchToEarmarksView = computed(() => {
|
||||||
const file = this._state.file();
|
const file = this._state.file();
|
||||||
return file.hasHighlights && !file.analysisRequired && !file.excluded;
|
return file.hasHighlights && !file.analysisRequired && !file.excluded;
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user