forked from hazza/dspace-angular
Merge branch 'feature-relationship-versioning-7.2' into feature-relationship-versioning
This commit is contained in:
@@ -171,12 +171,12 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||
/** Implement behavior for interface {@link ModalBeforeDismiss} */
|
||||
this.modalConfig.beforeDismiss = async function () {
|
||||
if (typeof this?.componentInstance?.beforeDismiss === 'function') {
|
||||
return this.componentInstance.beforeDismiss()
|
||||
return this.componentInstance.beforeDismiss();
|
||||
}
|
||||
|
||||
// fall back to default behavior
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
this.isAuthBlocking$ = this.store.pipe(select(isAuthenticationBlocking)).pipe(
|
||||
distinctUntilChanged()
|
||||
|
@@ -20,6 +20,6 @@ export interface ModalBeforeDismiss {
|
||||
* then the modal won't be dismissed.
|
||||
* Docs: https://ng-bootstrap.github.io/#/components/modal/api#NgbModalOptions
|
||||
*/
|
||||
beforeDismiss(): boolean | Promise<boolean>
|
||||
beforeDismiss(): boolean | Promise<boolean>;
|
||||
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ export class ItemVersionsSummaryModalComponent implements OnInit, ModalBeforeDis
|
||||
versionNumber: number;
|
||||
newVersionSummary: string;
|
||||
firstVersion = true;
|
||||
submitted$: BehaviorSubject<boolean>
|
||||
submitted$: BehaviorSubject<boolean>;
|
||||
|
||||
@Output() createVersionEvent: EventEmitter<string> = new EventEmitter<string>();
|
||||
|
||||
@@ -32,7 +32,7 @@ export class ItemVersionsSummaryModalComponent implements OnInit, ModalBeforeDis
|
||||
|
||||
beforeDismiss(): boolean | Promise<boolean> {
|
||||
// prevent the modal from being dismissed after version creation is initiated
|
||||
return !this.submitted$.getValue()
|
||||
return !this.submitted$.getValue();
|
||||
}
|
||||
|
||||
onModalSubmit() {
|
||||
|
Reference in New Issue
Block a user