optimizations
This commit is contained in:
parent
0c3c6857a5
commit
db43e247b9
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit 4d57221daa405b23766b63c9bd76c9147897e556
|
Subproject commit 7b1ffbbcc90af7cb73cb49827d5dc8d16cd5098d
|
|
@ -45,10 +45,10 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||||
this.folderId = params.folderId;
|
this.folderId = params.folderId;
|
||||||
}
|
}
|
||||||
if (params.collectionId) {
|
if (params.collectionId) {
|
||||||
const collection = this.writeableCollections.filter((c) => c.id === params.collectionId);
|
const collection = this.writeableCollections.find((c) => c.id === params.collectionId);
|
||||||
if (collection != null && collection.length > 0) {
|
if (collection != null) {
|
||||||
this.collectionIds = [collection[0].id];
|
this.collectionIds = [collection.id];
|
||||||
this.organizationId = collection[0].organizationId;
|
this.organizationId = collection.organizationId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (params.type) {
|
if (params.type) {
|
||||||
|
|
|
@ -38,6 +38,14 @@ export class ShareComponent extends BaseShareComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async submit(): Promise<boolean> {
|
||||||
|
const success = await super.submit();
|
||||||
|
if (success) {
|
||||||
|
this.location.back();
|
||||||
|
}
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
this.location.back();
|
this.location.back();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue