Skip to content

Commit

Permalink
Adjust wrongly named component
Browse files Browse the repository at this point in the history
  • Loading branch information
sven1103 committed Jul 11, 2023
1 parent 2ae870c commit 260c780
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package life.qbic.datamanager;

import java.time.ZoneId;
import life.qbic.authentication.application.notification.NotificationService;
import life.qbic.authentication.application.user.password.NewPassword;
import life.qbic.authentication.application.user.password.NewPasswordInput;
Expand All @@ -14,11 +13,8 @@
import life.qbic.authentication.domain.user.repository.UserRepository;
import life.qbic.broadcasting.Exchange;
import life.qbic.broadcasting.MessageBusSubmission;
import life.qbic.datamanager.ClientDetailsProvider.ClientDetails;
import life.qbic.datamanager.views.projects.overview.components.ProjectCollection;
import life.qbic.domain.concepts.SimpleEventStore;
import life.qbic.domain.concepts.TemporaryEventRepository;
import life.qbic.projectmanagement.application.ProjectInformationService;
import life.qbic.projectmanagement.application.api.SampleCodeService;
import life.qbic.projectmanagement.application.batch.BatchRegistrationService;
import life.qbic.projectmanagement.application.policy.ProjectRegisteredPolicy;
Expand All @@ -30,8 +26,6 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.web.context.annotation.SessionScope;

/**
* <b>App bean configuration class</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import life.qbic.datamanager.views.notifications.SuccessMessage;
import life.qbic.datamanager.views.projects.create.ProjectDraft;
import life.qbic.datamanager.views.projects.create.AddProjectDialog;
import life.qbic.datamanager.views.projects.overview.components.ProjectCollection;
import life.qbic.datamanager.views.projects.overview.components.ProjectCollectionComponent;
import life.qbic.projectmanagement.application.ProjectRegistrationService;
import life.qbic.projectmanagement.domain.project.Project;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -32,14 +32,14 @@ public class ProjectOverviewPage extends Div {
@Serial
private static final long serialVersionUID = 4625607082710157069L;

private final ProjectCollection projectCollection;
private final ProjectCollectionComponent projectCollectionComponent;
private final AddProjectDialog addProjectDialog;
private final ProjectRegistrationService projectRegistrationService;

public ProjectOverviewPage(@Autowired ProjectCollection projectCollection,
public ProjectOverviewPage(@Autowired ProjectCollectionComponent projectCollectionComponent,
AddProjectDialog addProjectDialog,
ProjectRegistrationService projectRegistrationService) {
this.projectCollection = projectCollection;
this.projectCollectionComponent = projectCollectionComponent;
this.addProjectDialog = addProjectDialog;
this.projectRegistrationService = projectRegistrationService;
layoutPage();
Expand All @@ -49,11 +49,11 @@ public ProjectOverviewPage(@Autowired ProjectCollection projectCollection,
}

private void layoutPage() {
add(projectCollection);
add(projectCollectionComponent);
}

private void configurePage() {
projectCollection.addListener(projectCreationClickedEvent ->
projectCollectionComponent.addListener(projectCreationClickedEvent ->
addProjectDialog.open()
);
addProjectDialog.addCancelEventListener(projectCreationDialogUserCancelEvent ->
Expand Down Expand Up @@ -82,7 +82,7 @@ private void createProject(ProjectDraft projectCreationContent) {
.onValue(result -> {
displaySuccessfulProjectCreationNotification();
addProjectDialog.resetAndClose();
projectCollection.refresh();
projectCollectionComponent.refresh();
})
.onError(e -> {
throw e;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
*
* @since 1.0.0
*/
public class ProjectAddSubmitEvent extends ComponentEvent<ProjectCollection> {
public class ProjectAddSubmitEvent extends ComponentEvent<ProjectCollectionComponent> {

@Serial
private static final long serialVersionUID = 28673255958404464L;

public ProjectAddSubmitEvent(ProjectCollection source, boolean fromClient) {
public ProjectAddSubmitEvent(ProjectCollectionComponent source, boolean fromClient) {
super(source, fromClient);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
*/
@SpringComponent
@UIScope
public class ProjectCollection extends PageArea {
public class ProjectCollectionComponent extends PageArea {

private Div controlSection = new Div();
private Div gridSection = new Div();
Expand All @@ -62,8 +62,8 @@ public class ProjectCollection extends PageArea {
private final List<ComponentEventListener<ProjectAddSubmitEvent>> projectCreationClickedListeners = new ArrayList<>();

@Autowired
public ProjectCollection(ClientDetailsProvider clientDetailsProvider,
ProjectInformationService projectInformationService) {
public ProjectCollectionComponent(ClientDetailsProvider clientDetailsProvider,
ProjectInformationService projectInformationService) {
this.title = "Projects";
this.clientDetailsProvider = clientDetailsProvider;
this.projectInformationService = projectInformationService;
Expand Down

0 comments on commit 260c780

Please sign in to comment.