diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index f7da47400..cda500037 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -2,8 +2,7 @@ import { provideStates } from '@ngxs/store'; import { Routes } from '@angular/router'; -import { CollectionsState } from '@osf/features/collections/store/collections'; -import { ProjectsState } from '@shared/stores'; +import { BookmarksState, ProjectsState } from '@shared/stores'; import { MyProfileResourceFiltersOptionsState } from './features/my-profile/components/filters/store'; import { MyProfileResourceFiltersState } from './features/my-profile/components/my-profile-resource-filters/store'; @@ -74,7 +73,7 @@ export const routes: Routes = [ path: 'my-projects', loadComponent: () => import('./features/my-projects/my-projects.component').then((mod) => mod.MyProjectsComponent), - providers: [provideStates([CollectionsState])], + providers: [provideStates([BookmarksState])], }, { path: 'my-projects/:id', diff --git a/src/app/features/collections/components/add-to-collection/add-to-collection-confirmation-dialog/add-to-collection-confirmation-dialog.component.spec.ts b/src/app/features/collections/components/add-to-collection/add-to-collection-confirmation-dialog/add-to-collection-confirmation-dialog.component.spec.ts new file mode 100644 index 000000000..4f2a45dbb --- /dev/null +++ b/src/app/features/collections/components/add-to-collection/add-to-collection-confirmation-dialog/add-to-collection-confirmation-dialog.component.spec.ts @@ -0,0 +1,22 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AddToCollectionConfirmationDialogComponent } from './add-to-collection-confirmation-dialog.component'; + +describe('AddToCollectionConfirmationDialogComponent', () => { + let component: AddToCollectionConfirmationDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [AddToCollectionConfirmationDialogComponent], + }).compileComponents(); + + fixture = TestBed.createComponent(AddToCollectionConfirmationDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/collections/components/add-to-collection/add-to-collection.component.scss b/src/app/features/collections/components/add-to-collection/add-to-collection.component.scss index 5c7d2b40e..4aca50a66 100644 --- a/src/app/features/collections/components/add-to-collection/add-to-collection.component.scss +++ b/src/app/features/collections/components/add-to-collection/add-to-collection.component.scss @@ -1,4 +1,3 @@ -@use "assets/styles/variables" as var; @use "assets/styles/mixins" as mix; :host { diff --git a/src/app/features/collections/components/add-to-collection/collection-metadata-step/collection-metadata-step.component.spec.ts b/src/app/features/collections/components/add-to-collection/collection-metadata-step/collection-metadata-step.component.spec.ts new file mode 100644 index 000000000..255f463c6 --- /dev/null +++ b/src/app/features/collections/components/add-to-collection/collection-metadata-step/collection-metadata-step.component.spec.ts @@ -0,0 +1,22 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CollectionMetadataStepComponent } from './collection-metadata-step.component'; + +describe('CollectionMetadataStepComponent', () => { + let component: CollectionMetadataStepComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [CollectionMetadataStepComponent], + }).compileComponents(); + + fixture = TestBed.createComponent(CollectionMetadataStepComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.html b/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.html index 1bfc64fbd..39ed90188 100644 --- a/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.html +++ b/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.html @@ -35,7 +35,7 @@

{{ 'collections.addToCollection.projectContributors' | translate }}

class="w-full" [contributors]="projectContributors()" [isLoading]="isContributorsLoading()" - [showCuratorColumn]="true" + [showCuratorColumn]="false" (remove)="handleRemoveContributor($event)" > @@ -43,12 +43,12 @@

{{ 'collections.addToCollection.projectContributors' | translate }}

diff --git a/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.spec.ts b/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.spec.ts new file mode 100644 index 000000000..96f871095 --- /dev/null +++ b/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.spec.ts @@ -0,0 +1,22 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProjectContributorsStepComponent } from './project-contributors-step.component'; + +describe('ProjectContributorsStepComponent', () => { + let component: ProjectContributorsStepComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [ProjectContributorsStepComponent], + }).compileComponents(); + + fixture = TestBed.createComponent(ProjectContributorsStepComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.ts b/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.ts index 3a25ee8f3..c80199e13 100644 --- a/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.ts +++ b/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.ts @@ -42,7 +42,6 @@ export class ProjectContributorsStepComponent { protected readonly projectContributors = select(ContributorsSelectors.getContributors); protected readonly isContributorsLoading = select(ContributorsSelectors.isContributorsLoading); - protected readonly isContributorsSubmitting = select(ContributorsSelectors.isContributorsSubmitting); protected readonly selectedProject = select(ProjectsSelectors.getSelectedProject); private initialContributors = signal([]); diff --git a/src/app/features/collections/components/add-to-collection/project-metadata-step/project-metadata-step.component.html b/src/app/features/collections/components/add-to-collection/project-metadata-step/project-metadata-step.component.html index 53059b808..0f571c820 100644 --- a/src/app/features/collections/components/add-to-collection/project-metadata-step/project-metadata-step.component.html +++ b/src/app/features/collections/components/add-to-collection/project-metadata-step/project-metadata-step.component.html @@ -52,18 +52,10 @@

{{ 'collections.addToCollection.projectMetadata' | translate }}

{{ 'collections.addToCollection.projectMetadataMessage' | translate }}

-
- - - @let titleControl = projectMetadataForm.controls[ProjectMetadataFormControls.Title]; - @if (titleControl.errors?.['required'] && (titleControl.touched || titleControl.dirty)) { - - {{ 'collections.addToCollection.form.fieldRequired' | translate }} - - } -
+