usermanager route

This commit is contained in:
f43nd1r 2018-11-22 03:14:02 +01:00
parent 04a118528a
commit f0416f0cd1

View file

@ -8,12 +8,15 @@ import com.faendir.acra.model.User;
import com.faendir.acra.security.SecurityUtils;
import com.faendir.acra.service.DataService;
import com.faendir.acra.service.UserService;
import com.faendir.acra.ui.base.HasRoute;
import com.faendir.acra.ui.base.MyGrid;
import com.faendir.acra.ui.base.Path;
import com.faendir.acra.ui.base.popup.Popup;
import com.faendir.acra.ui.base.popup.ValidatedField;
import com.faendir.acra.ui.component.FlexLayout;
import com.faendir.acra.ui.component.Translatable;
import com.faendir.acra.ui.view.MainView;
import com.faendir.acra.ui.view.Overview;
import com.vaadin.flow.component.AttachEvent;
import com.vaadin.flow.component.Composite;
import com.vaadin.flow.component.button.Button;
@ -37,7 +40,7 @@ import java.util.Arrays;
@UIScope
@SpringComponent
@Route(value = "user-manager", layout = MainView.class)
public class UserManager extends Composite<FlexLayout> {
public class UserManager extends Composite<FlexLayout> implements HasRoute {
private final UserService userService;
private final DataService dataService;
@ -101,4 +104,15 @@ public class UserManager extends Composite<FlexLayout> {
}, Messages.NEW_USER);
getContent().add(userGrid, newUser);
}
@NonNull
@Override
public Path.Element<?> getPathElement() {
return new Path.Element<>(getClass(), Messages.USER_MANAGER);
}
@Override
public Parent<?> getLogicalParent() {
return new Parent<>(Overview.class);
}
}