Skip to content

Commit b9435bf

Browse files
committed
fix(bugs): fixed bugs
1 parent dc3e536 commit b9435bf

File tree

14 files changed

+106
-103
lines changed

14 files changed

+106
-103
lines changed

src/app/core/constants/nav-items.constant.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ export const MENU_ITEMS: MenuItem[] = [
6060
label: 'navigation.preprintsSubRoutes.myPreprints',
6161
routerLinkActiveOptions: { exact: false },
6262
},
63+
{
64+
routerLink: '/preprints/my-reviewing',
65+
label: 'navigation.preprintsSubRoutes.myReviewing',
66+
routerLinkActiveOptions: { exact: true },
67+
},
6368
],
6469
},
6570
{

src/app/features/moderation/collection-moderation.routes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ export const collectionModerationRoutes: Routes = [
2626
import('./components/collection-moderation-submissions/collection-moderation-submissions.component').then(
2727
(m) => m.CollectionModerationSubmissionsComponent
2828
),
29-
data: { tab: CollectionModerationTab.AllItems, skipBreadcrumbs: true },
29+
data: { tab: CollectionModerationTab.AllItems },
3030
},
3131
{
3232
path: 'moderators',
3333
loadComponent: () =>
3434
import('./components/moderators-list/moderators-list.component').then((m) => m.ModeratorsListComponent),
35-
data: { resourceType: ResourceType.Collection, tab: CollectionModerationTab.Moderators, skipBreadcrumbs: true },
35+
data: { resourceType: ResourceType.Collection, tab: CollectionModerationTab.Moderators },
3636
providers: [provideStates([ModeratorsState])],
3737
},
3838
{
@@ -41,7 +41,7 @@ export const collectionModerationRoutes: Routes = [
4141
import('./components/notification-settings/notification-settings.component').then(
4242
(m) => m.NotificationSettingsComponent
4343
),
44-
data: { tab: CollectionModerationTab.Settings, skipBreadcrumbs: true },
44+
data: { tab: CollectionModerationTab.Settings },
4545
},
4646
],
4747
},

src/app/features/moderation/pages/my-preprint-reviewing/my-preprint-reviewing.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h2>{{ 'project.overview.recentActivity.title' | translate }}</h2>
1616
</p-card>
1717

1818
<p-card class="col-12 xl:col-5">
19-
<h2>{{ 'navigation.preprintsSubRoutes.myReviewing' | translate }}</h2>
19+
<h2>{{ 'preprints.providers' | translate }}</h2>
2020

2121
<div class="flex flex-column gap-4 mt-4">
2222
@if (isPreprintProvidersLoading()) {

src/app/features/moderation/preprint-moderation.routes.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ export const preprintModerationRoutes: Routes = [
2626
import('./components/registry-submissions/registry-submissions.component').then(
2727
(m) => m.RegistrySubmissionsComponent
2828
),
29-
data: { tab: PreprintModerationTab.Submissions, skipBreadcrumbs: true },
29+
data: { tab: PreprintModerationTab.Submissions },
3030
},
3131
{
3232
path: 'withdrawals',
3333
loadComponent: () =>
3434
import('./components/collection-moderation-submissions/collection-moderation-submissions.component').then(
3535
(m) => m.CollectionModerationSubmissionsComponent
3636
),
37-
data: { tab: PreprintModerationTab.WithdrawalRequests, skipBreadcrumbs: true },
37+
data: { tab: PreprintModerationTab.WithdrawalRequests },
3838
},
3939
{
4040
path: 'moderators',
4141
loadComponent: () =>
4242
import('./components/moderators-list/moderators-list.component').then((m) => m.ModeratorsListComponent),
43-
data: { resourceType: ResourceType.Preprint, tab: PreprintModerationTab.Moderators, skipBreadcrumbs: true },
43+
data: { resourceType: ResourceType.Preprint, tab: PreprintModerationTab.Moderators },
4444
providers: [provideStates([ModeratorsState])],
4545
},
4646
{
@@ -49,15 +49,15 @@ export const preprintModerationRoutes: Routes = [
4949
import('./components/notification-settings/notification-settings.component').then(
5050
(m) => m.NotificationSettingsComponent
5151
),
52-
data: { tab: PreprintModerationTab.Notifications, skipBreadcrumbs: true },
52+
data: { tab: PreprintModerationTab.Notifications },
5353
},
5454
{
5555
path: 'settings',
5656
loadComponent: () =>
5757
import('./components/preprint-moderation-settings/preprint-moderation-settings.component').then(
5858
(m) => m.PreprintModerationSettingsComponent
5959
),
60-
data: { tab: PreprintModerationTab.Settings, skipBreadcrumbs: true },
60+
data: { tab: PreprintModerationTab.Settings },
6161
},
6262
],
6363
},

src/app/features/moderation/registry-moderation.routes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,28 @@ export const registryModerationRoutes: Routes = [
2626
import('./components/registry-submissions/registry-submissions.component').then(
2727
(m) => m.RegistrySubmissionsComponent
2828
),
29-
data: { tab: RegistryModerationTab.Submitted, skipBreadcrumbs: true },
29+
data: { tab: RegistryModerationTab.Submitted },
3030
},
3131
{
3232
path: 'pending',
3333
loadComponent: () =>
3434
import('./components/collection-moderation-submissions/collection-moderation-submissions.component').then(
3535
(m) => m.CollectionModerationSubmissionsComponent
3636
),
37-
data: { tab: RegistryModerationTab.Pending, skipBreadcrumbs: true },
37+
data: { tab: RegistryModerationTab.Pending },
3838
},
3939
{
4040
path: 'moderators',
4141
loadComponent: () =>
4242
import('./components/moderators-list/moderators-list.component').then((m) => m.ModeratorsListComponent),
43-
data: { resourceType: ResourceType.Registration, tab: RegistryModerationTab.Moderators, skipBreadcrumbs: true },
43+
data: { resourceType: ResourceType.Registration, tab: RegistryModerationTab.Moderators },
4444
providers: [provideStates([ModeratorsState])],
4545
},
4646
{
4747
path: 'settings',
4848
loadComponent: () =>
4949
import('./components/registry-settings/registry-settings.component').then((m) => m.RegistrySettingsComponent),
50-
data: { tab: RegistryModerationTab.Settings, skipBreadcrumbs: true },
50+
data: { tab: RegistryModerationTab.Settings },
5151
},
5252
],
5353
},

src/app/features/preprints/pages/select-preprint-service/select-preprint-service.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ <h2>{{ 'preprints.selectService.sectionTitle' | translate }}</h2>
66
<span>
77
{{ 'preprints.selectService.description' | translate }}
88
</span>
9-
<a href="https://help.osf.io/article/376-preprints-home-page">{{
10-
'preprints.selectService.learnMore' | translate
11-
}}</a>
9+
<a href="https://help.osf.io/article/376-preprints-home-page">
10+
{{ 'preprints.selectService.learnMore' | translate }}
11+
</a>
1212
</p>
1313
<section class="m-t-48 grid justify-content-center align-items-start gap-4">
1414
@if (areProvidersLoading()) {

src/app/features/preprints/preprints.routes.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export const preprintsRoutes: Routes = [
9393
import('@osf/features/moderation/pages/my-preprint-reviewing/my-preprint-reviewing.component').then(
9494
(m) => m.MyPreprintReviewingComponent
9595
),
96-
data: { skipBreadcrumbs: true },
9796
providers: [provideStates([PreprintModerationState])],
9897
},
9998
],

src/app/features/project/metadata/project-metadata.component.html

Lines changed: 72 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -24,89 +24,83 @@
2424
@for (tab of tabs(); track $index) {
2525
<p-tabpanel [value]="tab.id">
2626
@if (tab.type === 'project') {
27-
@if (currentProjectLoading()) {
28-
<div class="flex-1 mt-4 md:mt-8 lg:pt-5">
29-
<osf-loading-spinner />
30-
</div>
31-
} @else {
32-
<div class="flex-column flex flex-1 w-full bg-white lg:flex-row">
33-
<div class="col-12 lg:col-6 flex flex-column gap-4">
34-
<p-card>
35-
<div class="flex justify-content-between flex-wrap gap-4">
36-
<div class="flex flex-column gap-2 flex-1">
37-
<h2>
38-
{{ 'project.overview.metadata.dateCreated' | translate }}
39-
</h2>
40-
41-
<p class="m-0 text-color-secondary">
42-
{{ currentProject()?.dateCreated | date: 'MMM d, y, h:mm a' }}
43-
</p>
44-
</div>
45-
46-
<div class="flex flex-column gap-2 flex-1">
47-
<h2>
48-
{{ 'project.overview.metadata.dateUpdated' | translate }}
49-
</h2>
50-
51-
<p class="m-0 text-color-secondary">
52-
{{ currentProject()?.dateModified | date: 'MMM d, y, h:mm a' }}
53-
</p>
54-
</div>
27+
<div class="flex-column flex flex-1 w-full bg-white lg:flex-row">
28+
<div class="col-12 lg:col-6 flex flex-column gap-4">
29+
<p-card>
30+
<div class="flex justify-content-between flex-wrap gap-4">
31+
<div class="flex flex-column gap-2 flex-1">
32+
<h2>
33+
{{ 'project.overview.metadata.dateCreated' | translate }}
34+
</h2>
35+
36+
<p class="m-0 text-color-secondary">
37+
{{ currentProject()?.dateCreated | date: 'MMM d, y, h:mm a' }}
38+
</p>
5539
</div>
56-
</p-card>
57-
58-
<osf-project-metadata-contributors
59-
(openEditContributorDialog)="openEditContributorDialog()"
60-
[currentProject]="currentProject()"
61-
/>
62-
63-
<osf-project-metadata-description
64-
(openEditDescriptionDialog)="openEditDescriptionDialog()"
65-
[currentProject]="currentProject()"
66-
/>
67-
68-
<osf-project-metadata-resource-information
69-
(openEditResourceInformationDialog)="openEditResourceInformationDialog()"
70-
[customItemMetadata]="customItemMetadata()"
71-
/>
72-
73-
<osf-project-metadata-funding
74-
(openEditFundingDialog)="openEditFundingDialog()"
75-
[currentProject]="currentProject()"
76-
/>
77-
78-
<osf-project-metadata-affiliated-institutions
79-
(openEditAffiliatedInstitutionsDialog)="openEditAffiliatedInstitutionsDialog()"
80-
[currentProject]="currentProject()"
81-
/>
82-
</div>
8340

84-
<div class="col-12 lg:col-6 flex flex-column gap-4">
85-
<osf-project-metadata-license
86-
(openEditLicenseDialog)="openEditLicenseDialog()"
87-
[currentProject]="currentProject()"
88-
/>
89-
90-
<osf-project-metadata-publication-doi
91-
(openEditPublicationDoiDialog)="handleEditDoi()"
92-
[currentProject]="currentProject()"
93-
/>
94-
95-
<p-card>
96-
<div class="flex flex-column gap-3">
97-
<h2>{{ 'project.overview.metadata.tags' | translate }}</h2>
98-
99-
<osf-tags-input
100-
(tagsChanged)="onTagsChanged($event)"
101-
[tags]="currentProject()?.tags || []"
102-
></osf-tags-input>
41+
<div class="flex flex-column gap-2 flex-1">
42+
<h2>
43+
{{ 'project.overview.metadata.dateUpdated' | translate }}
44+
</h2>
45+
46+
<p class="m-0 text-color-secondary">
47+
{{ currentProject()?.dateModified | date: 'MMM d, y, h:mm a' }}
48+
</p>
10349
</div>
104-
</p-card>
50+
</div>
51+
</p-card>
10552

106-
<osf-project-metadata-subjects [projectId]="currentProject()?.id" />
107-
</div>
53+
<osf-project-metadata-contributors
54+
(openEditContributorDialog)="openEditContributorDialog()"
55+
[currentProject]="currentProject()"
56+
/>
57+
58+
<osf-project-metadata-description
59+
(openEditDescriptionDialog)="openEditDescriptionDialog()"
60+
[currentProject]="currentProject()"
61+
/>
62+
63+
<osf-project-metadata-resource-information
64+
(openEditResourceInformationDialog)="openEditResourceInformationDialog()"
65+
[customItemMetadata]="customItemMetadata()"
66+
/>
67+
68+
<osf-project-metadata-funding
69+
(openEditFundingDialog)="openEditFundingDialog()"
70+
[currentProject]="currentProject()"
71+
/>
72+
73+
<osf-project-metadata-affiliated-institutions
74+
(openEditAffiliatedInstitutionsDialog)="openEditAffiliatedInstitutionsDialog()"
75+
[currentProject]="currentProject()"
76+
/>
10877
</div>
109-
}
78+
79+
<div class="col-12 lg:col-6 flex flex-column gap-4">
80+
<osf-project-metadata-license
81+
(openEditLicenseDialog)="openEditLicenseDialog()"
82+
[currentProject]="currentProject()"
83+
/>
84+
85+
<osf-project-metadata-publication-doi
86+
(openEditPublicationDoiDialog)="handleEditDoi()"
87+
[currentProject]="currentProject()"
88+
/>
89+
90+
<p-card>
91+
<div class="flex flex-column gap-3">
92+
<h2>{{ 'project.overview.metadata.tags' | translate }}</h2>
93+
94+
<osf-tags-input
95+
(tagsChanged)="onTagsChanged($event)"
96+
[tags]="currentProject()?.tags || []"
97+
></osf-tags-input>
98+
</div>
99+
</p-card>
100+
101+
<osf-project-metadata-subjects [projectId]="currentProject()?.id" />
102+
</div>
103+
</div>
110104
} @else {
111105
<div class="p-6">
112106
@if (selectedCedarTemplate() && selectedCedarRecord()) {

src/app/features/project/metadata/project-metadata.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import {
5555
import { ResourceType } from '@osf/shared/enums';
5656
import { ContributorsSelectors, GetAllContributors } from '@osf/shared/stores';
5757
import { LoadingSpinnerComponent, SubHeaderComponent, TagsInputComponent } from '@shared/components';
58-
import { CustomConfirmationService, ToastService } from '@shared/services';
58+
import { CustomConfirmationService, LoaderService, ToastService } from '@shared/services';
5959

6060
@Component({
6161
selector: 'osf-project-metadata',
@@ -93,6 +93,7 @@ export class ProjectMetadataComponent implements OnInit {
9393
private readonly dialogService = inject(DialogService);
9494
private readonly translateService = inject(TranslateService);
9595
private readonly toastService = inject(ToastService);
96+
private readonly loaderService = inject(LoaderService);
9697
private readonly customConfirmationService = inject(CustomConfirmationService);
9798

9899
tabs = signal<{ id: string; label: string; type: 'project' | 'cedar' }[]>([]);

src/app/features/registries/components/review/review.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<section class="flex flex-column flex-1 p-5 gap-4 w-full">
1+
<section class="flex flex-column flex-1 bg-white p-5 gap-4 w-full">
22
<p-card>
33
<h2 class="mb-4">{{ 'navigation.registration.metadata' | translate }}</h2>
44

0 commit comments

Comments
 (0)