5
0
mirror of https://github.com/AJMicke/KickerELO.git synced 2026-03-11 21:41:02 +01:00
This commit is contained in:
Anton Micke
2025-02-13 14:51:07 +01:00
parent b5c2f2f21d
commit 76bb3ded81
12 changed files with 100 additions and 109 deletions

View File

@@ -8,6 +8,7 @@ import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.component.textfield.TextField;
import com.vaadin.flow.router.Route;
import org.kickerelo.kickerelo.exception.DuplicatePlayerException;
import org.kickerelo.kickerelo.exception.InvalidDataException;
import org.kickerelo.kickerelo.exception.PlayerNameNotSetException;
import org.kickerelo.kickerelo.service.KickerEloService;
@@ -26,10 +27,11 @@ public class AdminView extends VerticalLayout {
} catch (PlayerNameNotSetException err) {
Notification.show("Spielername darf nicht leer sein").addThemeVariants(NotificationVariant.LUMO_ERROR);
return;
}
catch (DuplicatePlayerException err) {
} catch (DuplicatePlayerException err) {
Notification.show("Spieler existiert bereits").addThemeVariants(NotificationVariant.LUMO_ERROR);
return;
} catch (InvalidDataException err) {
Notification.show("Name zu lang").addThemeVariants(NotificationVariant.LUMO_ERROR);
}
Notification.show("Spieler gespeichert").addThemeVariants(NotificationVariant.LUMO_SUCCESS);
});