Commit 12fbbb8b by Tuukka Kivilahti

uh, I forgot one

1 parent 47c09beb
......@@ -17,6 +17,8 @@ public interface PlaceMapBeanLocal {
void printPlaceMapToStream(OutputStream outputStream, String filetype, Event event, Integer mapId, Integer userId, List<Integer> placeIds) throws IOException;
public String getSelectPlaceMapUrl(EventMap activeMap, List<Place> selectedPlaces, User user);
public int selectablePlaceCount(User user, Event currentEvent);
// public EventMap findMap(int i);
}
......@@ -53,6 +53,9 @@ public class Product implements EventChildInterface {
@Column(name = "barcode")
private String barcode;
@Column(name = "prepaid")
private boolean prepaid = false;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "product")
private List<Place> places;
......@@ -211,5 +214,19 @@ public class Product implements EventChildInterface {
public List<FoodWaveTemplate> getFoodWaveTemplates() {
return foodWaveTemplates;
}
/**
* @return the prepaid
*/
public boolean isPrepaid() {
return prepaid;
}
/**
* @param prepaid the prepaid to set
*/
public void setPrepaid(boolean prepaid) {
this.prepaid = prepaid;
}
}
......@@ -19,7 +19,7 @@
<h:form>
<h:commandButton image="#{mapView.selectPlaceMapUrl}" actionListener="#{mapView.placeSelectActionListener}" />
<h:outputText value="#{i18n['placeSelect.left']}: #{mapView.placeLeftToSelect}" />
</h:form>
......
......@@ -117,4 +117,10 @@ public class MapView {
public void setSessionHandler(SessionHandler sessionHandler) {
this.sessionHandler = sessionHandler;
}
public String placeLeftToSelect() {
int totalPlaces = placeMapBean.selectablePlaceCount(sessionHandler.getUser(), sessionHandler.getCurrentEvent());
return (totalPlaces - selectedPlaces.size())+"";
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!