@yuuvis/app-drive 2.1.25 → 2.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,7 @@ import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
|
8
8
|
import * as i1$3 from '@angular/router';
|
|
9
9
|
import { Router, NavigationStart, ActivatedRoute, RouterModule, NavigationEnd } from '@angular/router';
|
|
10
10
|
import * as i2 from '@yuuvis/client-core';
|
|
11
|
-
import { SystemType, ClipboardService, TranslateService, TranslateModule, BaseObjectTypeField, EventService, DmsService, SearchService, BackendService, YuvEventType, ContentStreamField, NotificationService, Utils, RetentionService, SystemService, Situation, Operator, SearchUtils,
|
|
11
|
+
import { SystemType, ClipboardService, TranslateService, TranslateModule, BaseObjectTypeField, EventService, DmsService, SearchService, BackendService, YuvEventType, ContentStreamField, NotificationService, Utils, RetentionService, UserService, SystemService, Situation, Operator, SearchUtils, ObjectConfigService, DeviceService, AppCacheService } from '@yuuvis/client-core';
|
|
12
12
|
import { ActionsService, BASE_ACTION, AbstractContextAction, SelectionRange, ContextmenuComponent, YuvContextMenuTriggerDirective } from '@yuuvis/client-framework/actions';
|
|
13
13
|
import { UploadProgressComponent } from '@yuuvis/client-framework/upload-progress';
|
|
14
14
|
import * as i2$5 from '@yuuvis/client-shell';
|
|
@@ -1124,6 +1124,7 @@ class AddButtonComponent {
|
|
|
1124
1124
|
this.#drive = inject(DriveService);
|
|
1125
1125
|
this.#shell = inject(ShellService);
|
|
1126
1126
|
this.#dialog = inject(MatDialog);
|
|
1127
|
+
this.#user = inject(UserService);
|
|
1127
1128
|
this.translate = inject(TranslateService);
|
|
1128
1129
|
this.fileInput = viewChild.required('fileInput');
|
|
1129
1130
|
this.popoverOpen = false;
|
|
@@ -1136,7 +1137,10 @@ class AddButtonComponent {
|
|
|
1136
1137
|
{ icon: this.icons.folder, label: this.translate.instant('yuv.app.drive.create.folder') },
|
|
1137
1138
|
{ icon: this.icons.file, label: this.translate.instant('yuv.app.drive.create.file') }
|
|
1138
1139
|
];
|
|
1139
|
-
this.flavorListItems = this.#shell.getObjectCreateFlavors().
|
|
1140
|
+
this.flavorListItems = this.#shell.getObjectCreateFlavors().filter(flavor => {
|
|
1141
|
+
const createSOTPermissions = this.#user.userPermissions?.create.secondaryObjectTypes;
|
|
1142
|
+
return !createSOTPermissions || !!(!flavor.sot || flavor.sot && createSOTPermissions?.includes(flavor.sot));
|
|
1143
|
+
}).map((flavor) => ({
|
|
1140
1144
|
label: this.translate.instant(flavor.id),
|
|
1141
1145
|
flavor
|
|
1142
1146
|
}));
|
|
@@ -1144,6 +1148,7 @@ class AddButtonComponent {
|
|
|
1144
1148
|
#drive;
|
|
1145
1149
|
#shell;
|
|
1146
1150
|
#dialog;
|
|
1151
|
+
#user;
|
|
1147
1152
|
#uploadTargetFlavor;
|
|
1148
1153
|
onSelect(idx, isCreateFlavor = false) {
|
|
1149
1154
|
if (isCreateFlavor) {
|
|
@@ -1968,6 +1973,7 @@ class ManageVersionsComponent {
|
|
|
1968
1973
|
this.#drive = inject(DriveService);
|
|
1969
1974
|
this.#shell = inject(ShellService);
|
|
1970
1975
|
this.#eventService = inject(EventService);
|
|
1976
|
+
this.#retention = inject(RetentionService);
|
|
1971
1977
|
this.#dialogData = inject(MAT_DIALOG_DATA);
|
|
1972
1978
|
this.#dialogRef = inject((MatDialogRef));
|
|
1973
1979
|
this.versionsList = this.#drive.state$.versions.versionsList;
|
|
@@ -2005,12 +2011,13 @@ class ManageVersionsComponent {
|
|
|
2005
2011
|
this.disabledRestore = computed(() => {
|
|
2006
2012
|
const selectedVersion = this.selectedVersion();
|
|
2007
2013
|
const list = this.versionsList();
|
|
2008
|
-
return !(selectedVersion && selectedVersion[0].version !== list.length);
|
|
2014
|
+
return !(selectedVersion && selectedVersion[0].version !== list.length && !this.isUnderRetention(this.selectedDmsObject()));
|
|
2009
2015
|
});
|
|
2010
2016
|
}
|
|
2011
2017
|
#drive;
|
|
2012
2018
|
#shell;
|
|
2013
2019
|
#eventService;
|
|
2020
|
+
#retention;
|
|
2014
2021
|
#dialogData;
|
|
2015
2022
|
#dialogRef;
|
|
2016
2023
|
#loadList() {
|
|
@@ -2033,6 +2040,9 @@ class ManageVersionsComponent {
|
|
|
2033
2040
|
error: (err) => this.#drive.setBusy(false)
|
|
2034
2041
|
});
|
|
2035
2042
|
}
|
|
2043
|
+
isUnderRetention(o) {
|
|
2044
|
+
return o && this.#retention.getRetentionState(o).underRetention;
|
|
2045
|
+
}
|
|
2036
2046
|
ngOnInit() {
|
|
2037
2047
|
this.#loadList().subscribe();
|
|
2038
2048
|
}
|