mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-21 19:50:01 +00:00
confirm if races without competitor registrations should be tracked
This commit is contained in:
1 parent
17f718edc0
commit
8a0d1a9203
6 files changed
+23
-2
No files matched your search
+15
@@ -295,6 +295,21 @@ public class RaceLogTrackingEventManagementPanel extends AbstractLeaderboardConf
|
||||
|
||||
private void startTracking(Set<RaceColumnDTOAndFleetDTOWithNameBasedEquality> races) {
|
||||
final StrippedLeaderboardDTO leaderboard = getSelectedLeaderboard();
|
||||
|
||||
//prompt user if competitor registrations are missing for same races
|
||||
String namesOfRacesMissingRegistrations = "";
|
||||
for (RaceColumnDTOAndFleetDTOWithNameBasedEquality race : races) {
|
||||
if (! race.getB().competitorRegistrationsExist) {
|
||||
namesOfRacesMissingRegistrations += race.getA().getName() + "/" + race.getB().getName() + " ";
|
||||
}
|
||||
}
|
||||
if (! namesOfRacesMissingRegistrations.isEmpty()) {
|
||||
boolean proceed = Window.confirm(stringMessages.competitorRegistrationsMissingProceed(
|
||||
namesOfRacesMissingRegistrations));
|
||||
if (! proceed) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (RaceColumnDTOAndFleetDTOWithNameBasedEquality race : races) {
|
||||
final RaceColumnDTO raceColumn = race.getA();
|
||||
|
||||
+1
@@ -1006,4 +1006,5 @@ public interface StringMessages extends Messages {
|
||||
String authorName();
|
||||
String authorPriority();
|
||||
String removeDenotation();
|
||||
String competitorRegistrationsMissingProceed(String namesOfRaces);
|
||||
}
|
||||
+2
-1
@@ -991,4 +991,5 @@ importWind=Import Wind
|
||||
importWindTooltip=Unchecking this option will drastically lower the amount of data transfered.
|
||||
authorName=Author name
|
||||
authorPriority=Author priority
|
||||
removeDenotation=Remove Denotation
|
||||
removeDenotation=Remove Denotation
|
||||
competitorRegistrationsMissingProceed=At least one of the selected races ({0}) is missing competitor registrations. Proceed anyway?
|
||||
+2
-1
@@ -987,4 +987,5 @@ importWind=Wind importieren
|
||||
importWindTooltip=Diese Option zu deselektieren führt zu einer wesentlich kleineren übertragenen Datenmenge.
|
||||
authorName=Benutzername
|
||||
authorPriority=Benutzer-Priorität
|
||||
removeDenotation=Markierung entfernen
|
||||
removeDenotation=Markierung entfernen
|
||||
competitorRegistrationsMissingProceed=Für mindestens eins der Rennen ({0}) sind keine Teams registriert. Trotzdem fortfahren?
|
||||
+2
@@ -2059,6 +2059,8 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
fleetDTO.courseDefinitionInRaceLog = raceLogTrackingState.isForTracking() ?
|
||||
new LastPublishedCourseDesignFinder(raceLog).analyze() != null : false;
|
||||
|
||||
fleetDTO.competitorRegistrationsExist = ! new RegisteredCompetitorsAnalyzer(raceLog).analyze().isEmpty();
|
||||
|
||||
if (! raceLogTrackingState.isForTracking()) {
|
||||
oneRaceLogDenotableForTracking = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user