Commit 395704b7 by Riku Silvola

foodwavestuff

1 parent 7c6cc2c4
......@@ -21,6 +21,8 @@ import javax.persistence.TemporalType;
import org.eclipse.persistence.annotations.OptimisticLocking;
import org.eclipse.persistence.annotations.OptimisticLockingType;
import com.sun.istack.internal.logging.Logger;
/**
*
*/
......@@ -103,6 +105,10 @@ public class FoodWave extends GenericEntity {
public void setClosed(boolean waveClosed) {
this.closed = waveClosed;
}
public void toggleClosed() {
this.closed = !isClosed();
}
public List<AccountEvent> getAccountEvents() {
return accountEvents;
......
......@@ -22,9 +22,8 @@
</ui:define>
<ui:define name="content">
<p:dataTable
styleClass="bordertable" value="#{foodWaveView.foodWaves}"
var="foodwave" >
<p:dataTable styleClass="bordertable"
value="#{foodWaveView.foodWaves}" var="foodwave">
<p:column>
<f:facet name="header">
<h:outputText value="${i18n['foodWave.time']}" />
......@@ -56,7 +55,7 @@
<f:facet name="header">
<h:outputText value="${i18n['foodWave.unconfirmedOrders']}" />
</f:facet>
<h:outputText value="#{foodwave.getUnpaidBillLineCount()}" />
<h:outputText value="#{foodwave.unpaidBillLineCount}" />
</p:column>
<p:column>
<f:facet name="header">
......@@ -70,7 +69,16 @@
value="#{i18n['foodWave.show']}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</p:column>
</p:column><!--
<p:column>
<h:outputText value="#{foodwave.closed.toString()}" />
<p:commandButton rendered="#{foodwave.closed}"
value="#{i18n['foodWave.openNow']}"
action="#{foodwave.toggleClosed}" />
<p:commandButton rendered="#{not foodwave.closed}"
value="#{i18n['foodWave.closeNow']}"
action="#{foodwave.toggleClosed}" />
</p:column> -->
</p:dataTable>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!