mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-13 14:12:11 +00:00
Added second button to RegattaListComposite.
This commit is contained in:
1 parent
c7303216be
commit
1fdee28ba8
4 files changed
+15
-10
No files matched your search
+4
-1
@@ -18,7 +18,8 @@ public class RegattaConfigImagesBarCell extends ImagesBarCell {
|
||||
public static final String ACTION_CHANGE_OWNERSHIP = DefaultActions.CHANGE_OWNERSHIP.name();
|
||||
public static final String ACTION_CHANGE_ACL = DefaultActions.CHANGE_ACL.name();
|
||||
public static final String ACTION_STOP_TRACKING = "ACTION_STOP_TRACKING";
|
||||
public static final String ACTION_CERTIFICATES_UPDATE = "CERTIFICATES_UPDATE";
|
||||
public static final String ACTION_CERTIFICATES_UPDATE = "ACTION_CERTIFICATES_UPDATE";
|
||||
public static final String ACTION_BOAT_REGISTRATIONS = "ACTION_BOAT_REGISTRATIONS";
|
||||
|
||||
private final StringMessages stringMessages;
|
||||
private static AdminConsoleResources resources = GWT.create(AdminConsoleResources.class);
|
||||
@@ -49,6 +50,8 @@ public class RegattaConfigImagesBarCell extends ImagesBarCell {
|
||||
makeImagePrototype(IconResources.INSTANCE.changeOwnershipIcon())));
|
||||
result.add(new ImageSpec(ACTION_CHANGE_ACL, stringMessages.actionChangeACL(),
|
||||
makeImagePrototype(IconResources.INSTANCE.changeACLIcon())));
|
||||
result.add(new ImageSpec(ACTION_BOAT_REGISTRATIONS, stringMessages.boatRegistrations(),
|
||||
makeImagePrototype(IconResources.INSTANCE.boatRegistrations())));
|
||||
result.add(new ImageSpec(ACTION_CERTIFICATES_UPDATE, stringMessages.updateCertificates(),
|
||||
makeImagePrototype(IconResources.INSTANCE.updateCertificatesIcon())));
|
||||
return result;
|
||||
|
||||
+7
-9
@@ -274,9 +274,8 @@ public class RegattaListComposite extends Composite implements RegattasDisplayer
|
||||
stringMessages);
|
||||
actionsColumn.addAction(RegattaConfigImagesBarCell.ACTION_CHANGE_ACL, DefaultActions.CHANGE_ACL,
|
||||
configACL::openDialog);
|
||||
actionsColumn.addAction(RaceLogTrackingEventManagementImagesBarCell.ACTION_BOAT_REGISTRATIONS,
|
||||
DefaultActions.UPDATE, null); // this::handleBoatRegistration);
|
||||
actionsColumn.addAction(RegattaConfigImagesBarCell.ACTION_CERTIFICATES_UPDATE, regattaDTO -> {
|
||||
actionsColumn.addAction(RegattaConfigImagesBarCell.ACTION_BOAT_REGISTRATIONS, UPDATE, this::handleBoatRegistration);
|
||||
actionsColumn.addAction(RegattaConfigImagesBarCell.ACTION_CERTIFICATES_UPDATE, UPDATE, regattaDTO -> {
|
||||
BoatCertificateAssignmentDialog certificateAssignmentDialog = new BoatCertificateAssignmentDialog(sailingService, userService,
|
||||
regattaDTO.getName(), stringMessages, errorReporter,
|
||||
new DialogCallback<List<CompetitorWithBoatDTO>>() {
|
||||
@@ -416,17 +415,16 @@ public class RegattaListComposite extends Composite implements RegattasDisplayer
|
||||
filterablePanelRegattas.updateAll(allRegattas);
|
||||
}
|
||||
|
||||
private void handleBoatRegistration(StrippedLeaderboardDTOWithSecurity t) {
|
||||
if (t.canBoatsOfCompetitorsChangePerRace) {
|
||||
RegattaDTO regatta = null; //getSelectedRegattas();
|
||||
String boatClassName = regatta.boatClass.getName();
|
||||
private void handleBoatRegistration(RegattaDTO regattaDTO) {
|
||||
if (regattaDTO.canBoatsOfCompetitorsChangePerRace) {
|
||||
String boatClassName = regattaDTO.boatClass.getName();
|
||||
|
||||
new RegattaLogBoatRegistrationDialog(boatClassName, sailingService, null, stringMessages,
|
||||
errorReporter, /* editable */true, t.getName(), t.canBoatsOfCompetitorsChangePerRace,
|
||||
errorReporter, /* editable */true, regattaDTO.getName(), regattaDTO.canBoatsOfCompetitorsChangePerRace,
|
||||
new DialogCallback<Set<BoatDTO>>() {
|
||||
@Override
|
||||
public void ok(Set<BoatDTO> registeredBoats) {
|
||||
sailingService.setBoatRegistrationsInRegattaLog(t.getName(), registeredBoats,
|
||||
sailingService.setBoatRegistrationsInRegattaLog(regattaDTO.getName(), registeredBoats,
|
||||
new AsyncCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(Void result) {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 579 B |
@@ -3,6 +3,7 @@ package com.sap.sse.gwt.client;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
import com.google.gwt.resources.client.ClientBundle.Source;
|
||||
|
||||
public interface IconResources extends ClientBundle {
|
||||
|
||||
@@ -25,4 +26,7 @@ public interface IconResources extends ClientBundle {
|
||||
|
||||
@Source("images/certificates.png")
|
||||
ImageResource updateCertificatesIcon();
|
||||
|
||||
@Source("images/boat_registrations.png")
|
||||
ImageResource boatRegistrations();
|
||||
}
|
||||
Reference in new issue
Block a user