Enforced deleteProject UX

This commit is contained in:
Francesco Mangiacrapa 2024-05-10 12:50:51 +02:00
parent c3a923eb69
commit 54545e7048
3 changed files with 35 additions and 6 deletions

View File

@ -10,7 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Integrated new Uri-Resolver-Manager [#27160]
- Added Get Shareable Link facility [#27120]
- Added optional message when performing lifecycle step [#27192]
- Enforced deleteProject method
- Enforced deleteProject method/UX
## [v3.2.2] - 2024-01-11

View File

@ -1409,15 +1409,18 @@ public class GeoPortalDataEntryApp implements EntryPoint {
switch (status) {
case OK:
alertType = AlertType.SUCCESS;
statusMsg = "performed with " + status.getLabel().toUpperCase()+"!";
statusMsg = "performed with " + status.getLabel().toUpperCase()
+ "!";
break;
case WARNING:
alertType = AlertType.WARNING;
statusMsg = "performed with " + status.getLabel().toUpperCase()+"!";
statusMsg = "performed with " + status.getLabel().toUpperCase()
+ "!";
break;
case ERROR:
alertType = AlertType.ERROR;
statusMsg = "performed with " + status.getLabel().toUpperCase()+"!";
statusMsg = "performed with " + status.getLabel().toUpperCase()
+ "!";
break;
default:
alertType = AlertType.INFO;
@ -2003,6 +2006,32 @@ public class GeoPortalDataEntryApp implements EntryPoint {
alert.setClose(false);
hp.add(alert);
VerticalPanel vp = new VerticalPanel();
vp.getElement().getStyle().setMarginTop(20, Unit.PX);
vp.add(new Label("Check outcome in the Publication Report"));
Button buttonShowPublicationReport = new Button(
"Show Publication Report");
buttonShowPublicationReport.setType(ButtonType.INFO);
buttonShowPublicationReport.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
modal.hide();
appManagerBus
.fireEvent(new OperationOnItemEvent<DocumentDV>(
Arrays.asList(resultDocumentDV),
OPERATION_ON_ITEM.VIEW_REPORT));
}
});
buttonShowPublicationReport.getElement().getStyle().setMarginTop(10,
Unit.PX);
buttonShowPublicationReport.getElement().getStyle()
.setMarginBottom(20, Unit.PX);
vp.add(buttonShowPublicationReport);
modal.add(vp);
}
@Override

View File

@ -1014,7 +1014,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
try {
Project deletedP = client.getProjectByID(profileID, projectID);
if(deletedP!=null) {
String error = "The project with id: "+projectID+" still exists";
String error = "The project with id "+projectID+" still exists";
LOG.error(error +". Sending exception..");
throw new Exception(error);
}
@ -1029,7 +1029,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
} catch (Exception e) {
LOG.error("Error on deleting the project with id: " + projectID, e);
throw new Exception(e.getMessage());
throw new Exception("Error occurred on the server side when deleting the project");
}
}