diff --git a/src/app/features/metadata/dialogs/resource-tooltip-info/resource-tooltip-info.component.html b/src/app/features/metadata/dialogs/resource-tooltip-info/resource-tooltip-info.component.html index 78f670046..d44c216fb 100644 --- a/src/app/features/metadata/dialogs/resource-tooltip-info/resource-tooltip-info.component.html +++ b/src/app/features/metadata/dialogs/resource-tooltip-info/resource-tooltip-info.component.html @@ -6,7 +6,7 @@ {{ 'project.metadata.resourceInformation.tooltipDialog.secondaryContent' | translate: { resourceName } }}

- {{ 'project.metadata.resourceInformation.tooltipDialog.dataTypeLink' | translate }} + {{ 'project.metadata.resourceInformation.tooltipDialog.thirdContent' | translate }} (); + preprint = select(PreprintStepperSelectors.getPreprint); isPreprintSubmitting = select(PreprintStepperSelectors.isPreprintSubmitting); @@ -83,16 +85,12 @@ export class ReviewStepComponent implements OnInit { } submitPreprint() { - if (this.preprint()?.reviewsState !== ReviewsState.Accepted) { - this.actions.submitPreprint().subscribe({ - complete: () => { - this.toastService.showSuccess('preprints.preprintStepper.common.successMessages.preprintSubmitted'); - this.router.navigate(['/preprints', this.provider()!.id, this.preprint()!.id]); - }, - }); - } else { - this.toastService.showSuccess('preprints.preprintStepper.common.successMessages.preprintSubmitted'); - } + this.actions.submitPreprint().subscribe({ + complete: () => { + this.toastService.showSuccess('preprints.preprintStepper.common.successMessages.preprintSubmitted'); + this.router.navigate(['/preprints', this.provider()!.id, this.preprint()!.id]); + }, + }); } cancelSubmission() { diff --git a/src/app/features/preprints/pages/update-preprint-stepper/update-preprint-stepper.component.ts b/src/app/features/preprints/pages/update-preprint-stepper/update-preprint-stepper.component.ts index 5c4281755..0136d4e05 100644 --- a/src/app/features/preprints/pages/update-preprint-stepper/update-preprint-stepper.component.ts +++ b/src/app/features/preprints/pages/update-preprint-stepper/update-preprint-stepper.component.ts @@ -81,9 +81,7 @@ export class UpdatePreprintStepperComponent implements OnInit, OnDestroy, CanDea isPreprintProviderLoading = select(PreprintProvidersSelectors.isPreprintProviderDetailsLoading); hasBeenSubmitted = select(PreprintStepperSelectors.hasBeenSubmitted); - currentUserIsAdmin = computed(() => { - return this.preprint()?.currentUserPermissions.includes(UserPermissions.Admin) || false; - }); + currentUserIsAdmin = computed(() => this.preprint()?.currentUserPermissions.includes(UserPermissions.Admin) || false); editAndResubmitMode = computed(() => { const providerIsPremod = this.preprintProvider()?.reviewsWorkflow === ProviderReviewsWorkflow.PreModeration; @@ -130,6 +128,7 @@ export class UpdatePreprintStepperComponent implements OnInit, OnDestroy, CanDea currentStep = signal(submitPreprintSteps[0]); isWeb = toSignal(inject(IS_WEB)); + readonly SubmitStepsEnum = PreprintSteps; readonly PreprintSteps = PreprintSteps; constructor() { @@ -149,6 +148,12 @@ export class UpdatePreprintStepperComponent implements OnInit, OnDestroy, CanDea }); } + @HostListener('window:beforeunload', ['$event']) + public onBeforeUnload($event: BeforeUnloadEvent): boolean { + $event.preventDefault(); + return false; + } + canDeactivate(): Observable | boolean { return this.hasBeenSubmitted(); } @@ -181,12 +186,4 @@ export class UpdatePreprintStepperComponent implements OnInit, OnDestroy, CanDea moveToPreviousStep() { this.currentStep.set(this.updateSteps()[this.currentStep()?.index - 1]); } - - @HostListener('window:beforeunload', ['$event']) - public onBeforeUnload($event: BeforeUnloadEvent): boolean { - $event.preventDefault(); - return false; - } - - protected readonly SubmitStepsEnum = PreprintSteps; } diff --git a/src/app/features/registry/components/registration-links-card/registration-links-card.component.html b/src/app/features/registry/components/registration-links-card/registration-links-card.component.html index d0e49c9fe..bd9d2fed0 100644 --- a/src/app/features/registry/components/registration-links-card/registration-links-card.component.html +++ b/src/app/features/registry/components/registration-links-card/registration-links-card.component.html @@ -1,12 +1,16 @@ - - @if (registrationData()) { +@if (registrationData()) { +

-

- {{ registrationData().title || 'project.registrations.card.noTitle' | translate }} -

+
@@ -81,7 +85,7 @@

@@ -113,5 +117,5 @@

{{ 'shared.resources.title' | translate }}

- } - + +} diff --git a/src/app/features/registry/models/linked-nodes.models.ts b/src/app/features/registry/models/linked-nodes.models.ts index acfaa1265..f8f68785b 100644 --- a/src/app/features/registry/models/linked-nodes.models.ts +++ b/src/app/features/registry/models/linked-nodes.models.ts @@ -10,7 +10,6 @@ export interface LinkedNode { dateModified: string; tags: string[]; isPublic: boolean; - contributorsCount?: number; contributors?: ContributorModel[]; htmlUrl: string; apiUrl: string; diff --git a/src/app/features/registry/models/registry-components.models.ts b/src/app/features/registry/models/registry-components.models.ts index 3693f916d..3589177d1 100644 --- a/src/app/features/registry/models/registry-components.models.ts +++ b/src/app/features/registry/models/registry-components.models.ts @@ -11,7 +11,6 @@ export interface RegistryComponentModel { registrationSupplement: string; tags: string[]; isPublic: boolean; - contributorsCount?: number; contributors?: ContributorModel[]; registry?: string; } diff --git a/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.ts b/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.ts index 6c497e4b8..b535c92c8 100644 --- a/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.ts +++ b/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.ts @@ -97,7 +97,11 @@ export class AddContributorDialogComponent implements OnInit, OnDestroy { filter((searchTerm) => !!searchTerm && searchTerm.trim().length > 0), debounceTime(500), distinctUntilChanged(), - switchMap((searchTerm) => this.actions.searchUsers(searchTerm, this.currentPage())), + switchMap((searchTerm) => { + this.currentPage.set(1); + this.first.set(0); + return this.actions.searchUsers(searchTerm, this.currentPage()); + }), takeUntilDestroyed(this.destroyRef) ) .subscribe(() => { diff --git a/src/app/shared/components/contributors/add-unregistered-contributor-dialog/add-unregistered-contributor-dialog.component.ts b/src/app/shared/components/contributors/add-unregistered-contributor-dialog/add-unregistered-contributor-dialog.component.ts index e47f70cc8..946250911 100644 --- a/src/app/shared/components/contributors/add-unregistered-contributor-dialog/add-unregistered-contributor-dialog.component.ts +++ b/src/app/shared/components/contributors/add-unregistered-contributor-dialog/add-unregistered-contributor-dialog.component.ts @@ -60,8 +60,8 @@ export class AddUnregisteredContributorDialogComponent { const contributorData: ContributorAddModel = { fullName: formData.fullName, email: formData.email, - isBibliographic: false, - permission: ContributorPermission.Read, + isBibliographic: true, + permission: ContributorPermission.Write, }; const data: ContributorDialogAddModel = { data: [contributorData], type: AddContributorType.Unregistered }; this.dialogRef.close(data);