Commit 42a45fe3 by Riku Silvola

Merge branch 'master' of codecrew.fi:bortal

2 parents 7f918cb6 675f6be5
...@@ -207,7 +207,7 @@ public class MenuBean implements MenuBeanLocal { ...@@ -207,7 +207,7 @@ public class MenuBean implements MenuBeanLocal {
foodnavi.addPage(menuitemfacade.findOrCreate("/foodadmin/editTemplate"), ShopPermission.MANAGE_FOODWAVES).setVisible(false); foodnavi.addPage(menuitemfacade.findOrCreate("/foodadmin/editTemplate"), ShopPermission.MANAGE_FOODWAVES).setVisible(false);
foodnavi.addPage(menuitemfacade.findOrCreate("/foodmanager/listFoodwaves"), ShopPermission.MANAGE_FOODWAVES); foodnavi.addPage(menuitemfacade.findOrCreate("/foodmanager/listFoodwaves"), ShopPermission.MANAGE_FOODWAVES);
foodnavi.addPage(menuitemfacade.findOrCreate("/foodmanager/listOrders"), ShopPermission.MANAGE_FOODWAVES); foodnavi.addPage(menuitemfacade.findOrCreate("/foodmanager/listOrders"), ShopPermission.MANAGE_FOODWAVES).setVisible(false);
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<context-param> <context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name> <param-name>javax.faces.PROJECT_STAGE</param-name>
<!-- <param-value>Production</param-value> --> <!-- <param-value>Production</param-value> -->
<param-value>Development</param-value> <param-value>Development</param-value>
</context-param> </context-param>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div id="actionlog"> <div id="actionlog">
<h:form id="refresh"> <h:form id="refresh">
<p:poll interval="1" update="actionlogtable" /> <p:poll interval="1" update="actionlogtable" />
<p:dataTable2styleClass="bordertable" id="actionlogtable" value="#{actionLogMessageView.messages}" var="message" paginator="true" rows="30" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,20,30,50,100"> <p:dataTable styleClass="bordertable" id="actionlogtable" value="#{actionLogMessageView.messages}" var="message" paginator="true" rows="30" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,20,30,50,100" >
<p:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{i18n['actionlog.time']}" /> <h:outputText value="#{i18n['actionlog.time']}" />
......
...@@ -12,13 +12,12 @@ ...@@ -12,13 +12,12 @@
template="/layout/#{sessionHandler.layout}/template.xhtml"> template="/layout/#{sessionHandler.layout}/template.xhtml">
<f:metadata> <f:metadata>
<f:viewParam name="foodwaveid" value="#{foodWaveView.foodWaveId}" /> <f:viewParam name="foodwaveid" value="#{foodWaveView.foodWaveId}" />
<f:event type="preRenderView" <f:event type="preRenderView" listener="#{foodWaveView.initFoodWaveOrderList}" />
listener="#{foodWaveView.initFoodWaveOrderList}" />
<!-- <f:event type="preRenderView" listener="#{foodWaveView.initFoodwaveAccountEventList}" /> --> <!-- <f:event type="preRenderView" listener="#{foodWaveView.initFoodwaveAccountEventList}" /> -->
</f:metadata> </f:metadata>
<ui:define name="title"> <ui:define name="title">
<h1>#{foodWaveView.foodWave.name}</h1> <h1>#{foodWaveView.selectedFoodWave.name}</h1>
</ui:define> </ui:define>
<ui:define name="content"> <ui:define name="content">
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
</composite:interface> </composite:interface>
<composite:implementation> <composite:implementation>
<!-- <h:outputScript target="head" library="script" name="jquery.min.js" /> -->
<!-- <h:outputScript target="head" library="script" name="shopscript.js" /> -->
<h:outputScript library="primefaces" name="jquery/jquery.js" /> <h:outputScript library="primefaces" name="jquery/jquery.js" />
...@@ -84,14 +82,14 @@ ...@@ -84,14 +82,14 @@
</p:column> </p:column>
</p:dataTable> </p:dataTable>
<div>
<h:commandButton action="#{cc.attrs.selectaction}" value="#{i18n[cc.attrs.commitValue]}" > <h:outputLabel for="total" value="#{i18n['foodshop.total']}: "/>
<h:outputText id="total" value="#{foodWaveFoodView.totalPrice}" >
</h:commandButton> <f:convertNumber minFractionDigits="0" maxFractionDigits="2" />
</h:outputText>
<h:commandButton action="#{foodWaveFoodView.buyFromInternet}" value="#{i18n['foodshop.buyFromInternet']}" > </div>
<h:commandButton action="#{cc.attrs.selectaction}" value="#{i18n[cc.attrs.commitValue]}" />
</h:commandButton> <h:commandButton action="#{foodWaveFoodView.buyFromInternet}" value="#{i18n['foodshop.buyFromInternet']}" />
</h:form> </h:form>
......
package fi.insomnia.bortal; package fi.insomnia.bortal;
import java.io.IOException; import java.io.IOException;
import java.util.LinkedList; import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.Queue;
import javax.ejb.EJB; import javax.ejb.EJB;
import javax.enterprise.context.SessionScoped;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import javax.servlet.Filter; import javax.servlet.Filter;
import javax.servlet.FilterChain; import javax.servlet.FilterChain;
...@@ -33,6 +31,7 @@ public class HostnameFilter implements Filter { ...@@ -33,6 +31,7 @@ public class HostnameFilter implements Filter {
@EJB @EJB
private SessionMgmtBeanLocal sessionmgmt; private SessionMgmtBeanLocal sessionmgmt;
private static final String HTTP_TRAIL_NAME = "lanbortal_http_trail";
/** /**
* Default constructor. * Default constructor.
...@@ -48,11 +47,11 @@ public class HostnameFilter implements Filter { ...@@ -48,11 +47,11 @@ public class HostnameFilter implements Filter {
public void destroy() { public void destroy() {
// Nothing... // Nothing...
} }
@SessionScoped
Queue<String> trail = new LinkedList<String>();
/** /**
* @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain) * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain)
*/ */
@SuppressWarnings("unchecked")
@Override @Override
public void doFilter(ServletRequest request, ServletResponse response, public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException { FilterChain chain) throws IOException, ServletException {
...@@ -117,12 +116,22 @@ public class HostnameFilter implements Filter { ...@@ -117,12 +116,22 @@ public class HostnameFilter implements Filter {
{ {
sessionmgmt.updateSessionUser(httpRequest.getSession().getId(), httpRequest.getUserPrincipal().getName()); sessionmgmt.updateSessionUser(httpRequest.getSession().getId(), httpRequest.getUserPrincipal().getName());
} }
while (trail.size() >= 10) {
trail.remove(); Object trailO = httpRequest.getSession().getAttribute(HTTP_TRAIL_NAME);
ConcurrentLinkedQueue<Object> trail = null;
if (trailO != null && trailO instanceof ConcurrentLinkedQueue)
{
trail = (ConcurrentLinkedQueue<Object>) trailO;
} else {
trail = new ConcurrentLinkedQueue<Object>();
httpRequest.getSession().setAttribute(HTTP_TRAIL_NAME, trail);
}
for (int remove = trail.size() - 10; remove > 0; --remove) {
Object removed = trail.poll();
logger.debug("Removed {} from http trail", removed);
} }
if (!httpRequest.getRequestURI().matches(".*(resource).*")) { if (!httpRequest.getRequestURI().matches(".*(resource).*")) {
trail.add(httpRequest.getRequestURI()); trail.add(httpRequest.getRequestURI());
httpRequest.getSession().setAttribute("trail", trail);
} }
} }
......
#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net) #Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
#Bill number #Bill number
# Validationmessages # Validationmessages
actionlog.create.header = Create new actionmessage actionlog.create.header = Create new actionmessage
actionlog.create.message = Message actionlog.create.message = Message
actionlog.create.role = Target role actionlog.create.role = Target role
actionlog.create.submitbutton = Send actionlog.create.submitbutton = Send
actionlog.create.taskradio = Task actionlog.create.taskradio = Task
actionlog.crew = Crew actionlog.crew = Crew
actionlog.message = Event actionlog.message = Event
actionlog.messagelist.description = You can follow and create new action messages in this view actionlog.messagelist.description = You can follow and create new action messages in this view
actionlog.messagelist.header = Messagelist actionlog.messagelist.header = Messagelist
actionlog.state = State actionlog.state = State
actionlog.task = Task actionlog.task = Task
actionlog.tasklist.header = Tasklist actionlog.tasklist.header = Tasklist
actionlog.time = Time actionlog.time = Time
actionlog.user = User actionlog.user = User
bill.billMarkedPaidMail.message = Your deposit number {0} has been marked as paid. bill.billMarkedPaidMail.message = Your deposit number {0} has been marked as paid.
bill.billMarkedPaidMail.subject = [Streamparty] Your credits have been updated bill.billMarkedPaidMail.subject = [Streamparty] Your credits have been updated
error.contact = If this happens again, contact Info with the following code: error.contact = If this happens again, contact Info with the following code:
error.error = You have encountered an error. error.error = You have encountered an error.
eventorg.create = Create eventorg.create = Create
eventorg.edit = Edit eventorg.edit = Edit
global.cancel = Cancel global.cancel = Cancel
global.copyright = Codecrew Ry global.copyright = Codecrew Ry
global.infomail = info@streamparty.org global.infomail = info@streamparty.org
global.notAuthorizedExecute = You are not authorized to execute that!! global.notAuthorizedExecute = You are not authorized to execute that!!
global.notauthorized = You don't have enough rights to enter this site. global.notauthorized = You don't have enough rights to enter this site.
global.save = Save global.save = Save
global.webpage = http://www.streamparty.org global.webpage = http://www.streamparty.org
httpsession.creationTime = Created httpsession.creationTime = Created
login.login = Login login.login = Login
login.logout = Logout login.logout = Logout
login.logoutmessage = You have logged out of the system login.logoutmessage = You have logged out of the system
login.password = Password login.password = Password
login.submit = Login login.submit = Login
login.username = Username login.username = Username
loginerror.header = Login failed loginerror.header = Login failed
loginerror.message = Username of password incorrect. loginerror.message = Username of password incorrect.
loginerror.resetpassword = Reset password loginerror.resetpassword = Reset password
passwordChanged.body = You can now login with the new password. passwordChanged.body = You can now login with the new password.
passwordChanged.header = Password changed successfully. passwordChanged.header = Password changed successfully.
passwordReset.errorChanging = Unexpected error whilst password reset. Contact your administrator. passwordReset.errorChanging = Unexpected error whilst password reset. Contact your administrator.
passwordReset.hashNotFound = Password change token has expired. Please send the query again. passwordReset.hashNotFound = Password change token has expired. Please send the query again.
permissiondenied.alreadyLoggedIn = You don't have enough rights permissiondenied.alreadyLoggedIn = You don't have enough rights
permissiondenied.header = Access denied permissiondenied.header = Access denied
permissiondenied.notLoggedIn = You don't have enough rights to enter this site. permissiondenied.notLoggedIn = You don't have enough rights to enter this site.
resetMail.body = You can change a forgotten password by inserting your username to the field below. A link where you can change the password will be sent to the email address associated to that. resetMail.body = You can change a forgotten password by inserting your username to the field below. A link where you can change the password will be sent to the email address associated to that.
resetMail.header = Reset lost password resetMail.header = Reset lost password
resetMail.send = Send email resetMail.send = Send email
resetMail.username = Username resetMail.username = Username
resetmailSent.body = Email has been sent containing a link where you can change the password. resetmailSent.body = Email has been sent containing a link where you can change the password.
resetmailSent.header = Email sent resetmailSent.header = Email sent
...@@ -208,13 +208,19 @@ foodWave.time = Aika ...@@ -208,13 +208,19 @@ foodWave.time = Aika
foodWave.totalReserved = Yhteens\u00E4 foodWave.totalReserved = Yhteens\u00E4
foodWave.unconfirmedOrders = Vahvistamattomia foodWave.unconfirmedOrders = Vahvistamattomia
foodadmin.editTemplate = Muokkaa
foodshop.buyAndPay = Varaa ja maksa
foodshop.buyFromCounter = Maksa infossa foodshop.buyFromCounter = Maksa infossa
foodshop.buyFromInternet = Maksa Internetiss\u00E4 foodshop.buyFromInternet = Maksa Internetiss\u00E4
foodshop.total = Yhteens\u00E4
foodwave.orders = Maksetut Tilaukset foodwave.orders = Maksetut Tilaukset
foodwave.template.basicinfo = Template Infot foodwave.template.basicinfo = Template Infot
foodwave.template.description = Kuvaus
foodwave.template.edit.title = Foodwave Template Editori foodwave.template.edit.title = Foodwave Template Editori
foodwave.template.list.title = Ruokatilaus Templatet foodwave.template.list.title = Ruokatilaus Templatet
foodwave.template.name = Nimi
foodwave.template.selectproducts = Tuotteet foodwave.template.selectproducts = Tuotteet
foodwaveTemplate.name = Nimi foodwaveTemplate.name = Nimi
...@@ -223,16 +229,21 @@ foodwavetemplate.actions = Toimet ...@@ -223,16 +229,21 @@ foodwavetemplate.actions = Toimet
foodwavetemplate.addproduct = Lis\u00E4\u00E4 foodwavetemplate.addproduct = Lis\u00E4\u00E4
foodwavetemplate.basicinfo = Templeitti foodwavetemplate.basicinfo = Templeitti
foodwavetemplate.createFoodwave = Luo ruokatilaus foodwavetemplate.createFoodwave = Luo ruokatilaus
foodwavetemplate.createwave = Luo tilauspohja
foodwavetemplate.description = Kuvaus foodwavetemplate.description = Kuvaus
foodwavetemplate.edit = Muokkaa tilauspohjaa
foodwavetemplate.editRow = Muokkaa foodwavetemplate.editRow = Muokkaa
foodwavetemplate.maxfoods = Tilausten enimm\u00E4ism\u00E4\u00E4r\u00E4
foodwavetemplate.name = Nimi foodwavetemplate.name = Nimi
foodwavetemplate.price = Hinta foodwavetemplate.price = Hinta
foodwavetemplate.productdescription = Kuvaus foodwavetemplate.productdescription = Kuvaus
foodwavetemplate.productname = Nimi\r\n foodwavetemplate.productname = Nimi\n
foodwavetemplate.removeFromList = Poista foodwavetemplate.removeFromList = Poista
foodwavetemplate.save = Ok foodwavetemplate.save = Ok
foodwavetemplate.savetemplate = Tallenna foodwavetemplate.savetemplate = Tallenna
foodwavetemplate.selectproducts = Tuotteet foodwavetemplate.selectproducts = Tuotteet
foodwavetemplate.startTime = Tilausaika
foodwavetemplate.waveName = Tilauksen nimi
game.gamepoints = Insomnia Game pisteet: game.gamepoints = Insomnia Game pisteet:
...@@ -603,6 +614,9 @@ submenu.auth.sendResetMail = Salasanan palautus ...@@ -603,6 +614,9 @@ submenu.auth.sendResetMail = Salasanan palautus
submenu.bill.billSummary = Laskujen yhteenveto submenu.bill.billSummary = Laskujen yhteenveto
submenu.bill.list = N\u00E4yt\u00E4 omat laskut submenu.bill.list = N\u00E4yt\u00E4 omat laskut
submenu.bill.listAll = Kaikki laskut submenu.bill.listAll = Kaikki laskut
submenu.foodadmin.createTemplate = Luo tilauspohja
submenu.foodadmin.listTemplates = Muokkaa tilauspohjia
submenu.foodmanager.listFoodwaves = Aktiiviset ruokatilaukset
submenu.foodwave.list = Avoimet tilaukset submenu.foodwave.list = Avoimet tilaukset
submenu.index = Etusivu submenu.index = Etusivu
submenu.map.create = Uusi kartta submenu.map.create = Uusi kartta
......
#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net) #Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
#Bill number #Bill number
# Validationmessages # Validationmessages
actionlog.create.header = Luo uusi ActionMessage actionlog.create.header = Luo uusi ActionMessage
actionlog.create.message = Viesti actionlog.create.message = Viesti
actionlog.create.role = Kohderooli actionlog.create.role = Kohderooli
actionlog.create.submitbutton = L\u00E4het\u00E4 actionlog.create.submitbutton = L\u00E4het\u00E4
actionlog.create.taskradio = Teht\u00E4v\u00E4 actionlog.create.taskradio = Teht\u00E4v\u00E4
actionlog.crew = Crew actionlog.crew = Crew
actionlog.message = Tapahtuma actionlog.message = Tapahtuma
actionlog.messagelist.description = Voit seurata sek\u00E4 luoda uusia ActionMessageja t\u00E4ss\u00E4 n\u00E4kym\u00E4ss\u00E4. actionlog.messagelist.description = Voit seurata sek\u00E4 luoda uusia ActionMessageja t\u00E4ss\u00E4 n\u00E4kym\u00E4ss\u00E4.
actionlog.messagelist.header = Viestilista actionlog.messagelist.header = Viestilista
actionlog.state = Tila actionlog.state = Tila
actionlog.task = Teht\u00E4v\u00E4 actionlog.task = Teht\u00E4v\u00E4
actionlog.tasklist.header = Teht\u00E4v\u00E4lista actionlog.tasklist.header = Teht\u00E4v\u00E4lista
actionlog.time = Aika actionlog.time = Aika
actionlog.user = Tekij\u00E4 actionlog.user = Tekij\u00E4
bill.billMarkedPaidMail.message = Laskusi numero {0} on merkitty maksetuksi. Voit nyt siirty\u00E4 lippukauppaan varamaamaan haluamasi paikat. \nTervetuloa tapahtumaan!\n\nTerveisin,\nInsomnia lippupalvelu\nwww.insomnia.fi bill.billMarkedPaidMail.message = Laskusi numero {0} on merkitty maksetuksi. Voit nyt siirty\u00E4 lippukauppaan varamaamaan haluamasi paikat. \nTervetuloa tapahtumaan!\n\nTerveisin,\nInsomnia lippupalvelu\nwww.insomnia.fi
bill.billMarkedPaidMail.subject = [INSOMNIA] Lasku merkitty maksetuksi bill.billMarkedPaidMail.subject = [INSOMNIA] Lasku merkitty maksetuksi
error.contact = Jos t\u00E4m\u00E4 toistuu, ota seuraava koodi talteen ja ota yhteys Infoon: error.contact = Jos t\u00E4m\u00E4 toistuu, ota seuraava koodi talteen ja ota yhteys Infoon:
error.error = Olet kohdannut virheen. error.error = Olet kohdannut virheen.
eventorg.create = Luo eventorg.create = Luo
eventorg.edit = Muokkaa eventorg.edit = Muokkaa
global.cancel = Peruuta global.cancel = Peruuta
global.copyright = Codecrew Ry global.copyright = Codecrew Ry
global.infomail = info@insomnia.fi global.infomail = info@insomnia.fi
global.notAuthorizedExecute = Sinulla ei ole riitt\u00E4v\u00E4sti oikeuksia suorittaa t\u00E4t\u00E4 toimenpidett\u00E4! global.notAuthorizedExecute = Sinulla ei ole riitt\u00E4v\u00E4sti oikeuksia suorittaa t\u00E4t\u00E4 toimenpidett\u00E4!
global.notauthorized = Sinulla ei ole riitt\u00E4vi\u00E4 oikeuksia t\u00E4lle sivulle. global.notauthorized = Sinulla ei ole riitt\u00E4vi\u00E4 oikeuksia t\u00E4lle sivulle.
global.save = Tallenna global.save = Tallenna
global.webpage = http://www.insomnia.fi global.webpage = http://www.insomnia.fi
httpsession.creationTime = Luotu httpsession.creationTime = Luotu
login.login = Kirjaudu sis\u00E4\u00E4n login.login = Kirjaudu sis\u00E4\u00E4n
login.logout = Kirjaudu ulos login.logout = Kirjaudu ulos
login.logoutmessage = Olet kirjautunut ulos j\u00E4rjestelm\u00E4st\u00E4. login.logoutmessage = Olet kirjautunut ulos j\u00E4rjestelm\u00E4st\u00E4.
login.password = Salasana login.password = Salasana
login.submit = Kirjaudu sis\u00E4\u00E4n login.submit = Kirjaudu sis\u00E4\u00E4n
login.username = K\u00E4ytt\u00E4j\u00E4tunnus login.username = K\u00E4ytt\u00E4j\u00E4tunnus
loginerror.header = Kirjautuminen ep\u00E4onnistui loginerror.header = Kirjautuminen ep\u00E4onnistui
loginerror.message = K\u00E4ytt\u00E4j\u00E4tunnus tai salasana ei ollut oikein. loginerror.message = K\u00E4ytt\u00E4j\u00E4tunnus tai salasana ei ollut oikein.
loginerror.resetpassword = Salasana unohtunut? loginerror.resetpassword = Salasana unohtunut?
passwordChanged.body = Voit nyt kirjautua k\u00E4ytt\u00E4j\u00E4tunnuksella ja uudella salasanalla sis\u00E4\u00E4n j\u00E4rjestelm\u00E4\u00E4n. passwordChanged.body = Voit nyt kirjautua k\u00E4ytt\u00E4j\u00E4tunnuksella ja uudella salasanalla sis\u00E4\u00E4n j\u00E4rjestelm\u00E4\u00E4n.
passwordChanged.header = Salasana vaihdettu onnistuneesti passwordChanged.header = Salasana vaihdettu onnistuneesti
passwordReset.errorChanging = Odotamaton virhe. Ota yhteytt\u00E4 yll\u00E4pitoon. passwordReset.errorChanging = Odotamaton virhe. Ota yhteytt\u00E4 yll\u00E4pitoon.
passwordReset.hashNotFound = Salasanan vaihto on vanhentunut. Jos haluat vaihtaa salasanan l\u00E4het\u00E4 vaihtopyynt\u00F6 uudelleen. passwordReset.hashNotFound = Salasanan vaihto on vanhentunut. Jos haluat vaihtaa salasanan l\u00E4het\u00E4 vaihtopyynt\u00F6 uudelleen.
permissiondenied.alreadyLoggedIn = Sinulla ei ole riitt\u00E4v\u00E4sti oikeuksia! permissiondenied.alreadyLoggedIn = Sinulla ei ole riitt\u00E4v\u00E4sti oikeuksia!
permissiondenied.header = P\u00E4\u00E4sy kielletty permissiondenied.header = P\u00E4\u00E4sy kielletty
permissiondenied.notLoggedIn = Sinulla ei ole riitt\u00E4v\u00E4sti oikeuksia t\u00E4lle sivulle. permissiondenied.notLoggedIn = Sinulla ei ole riitt\u00E4v\u00E4sti oikeuksia t\u00E4lle sivulle.
resetMail.body = Voit vaihtaa unohtuneen salasanan sy\u00F6tt\u00E4m\u00E4ll\u00E4 k\u00E4ytt\u00E4j\u00E4tunnuksesi allaolevaan kentt\u00E4\u00E4n. Tunnukseen liitettyyn s\u00E4hk\u00F6postiosoitteeseen l\u00E4hetet\u00E4\u00E4n kertak\u00E4ytt\u00F6inen osoite jossa voit vaihtaa sy\u00F6tt\u00E4m\u00E4si k\u00E4ytt\u00E4j\u00E4tunnuksen salasanan. resetMail.body = Voit vaihtaa unohtuneen salasanan sy\u00F6tt\u00E4m\u00E4ll\u00E4 k\u00E4ytt\u00E4j\u00E4tunnuksesi allaolevaan kentt\u00E4\u00E4n. Tunnukseen liitettyyn s\u00E4hk\u00F6postiosoitteeseen l\u00E4hetet\u00E4\u00E4n kertak\u00E4ytt\u00F6inen osoite jossa voit vaihtaa sy\u00F6tt\u00E4m\u00E4si k\u00E4ytt\u00E4j\u00E4tunnuksen salasanan.
resetMail.header = Salasana unohtunut? resetMail.header = Salasana unohtunut?
resetMail.send = L\u00E4het\u00E4 s\u00E4hk\u00F6posti resetMail.send = L\u00E4het\u00E4 s\u00E4hk\u00F6posti
resetmailSent.body = Antamasi k\u00E4ytt\u00E4j\u00E4tunnuksen s\u00E4hk\u00F6postiosoitteeseen on l\u00E4hetetty osoite jossa voit vaihtaa tunnuksen salasanan. resetmailSent.body = Antamasi k\u00E4ytt\u00E4j\u00E4tunnuksen s\u00E4hk\u00F6postiosoitteeseen on l\u00E4hetetty osoite jossa voit vaihtaa tunnuksen salasanan.
resetmailSent.header = S\u00E4hk\u00F6posti l\u00E4hetetty resetmailSent.header = S\u00E4hk\u00F6posti l\u00E4hetetty
...@@ -15,7 +15,8 @@ import javax.faces.model.ListDataModel; ...@@ -15,7 +15,8 @@ import javax.faces.model.ListDataModel;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import com.sun.xml.rpc.processor.schema.UnimplementedFeatureException; import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.insomnia.bortal.beans.AccountEventBeanLocal; import fi.insomnia.bortal.beans.AccountEventBeanLocal;
import fi.insomnia.bortal.beans.BillBeanLocal; import fi.insomnia.bortal.beans.BillBeanLocal;
...@@ -68,9 +69,12 @@ public class FoodWaveView extends GenericCDIView { ...@@ -68,9 +69,12 @@ public class FoodWaveView extends GenericCDIView {
private Integer foodWaveId; private Integer foodWaveId;
private ListDataModel<AccountEvent> accountEventLines; private ListDataModel<AccountEvent> accountEventLines;
private List<FoodWave> foodWaves; private List<FoodWave> foodWaves;
private static final Logger logger = LoggerFactory.getLogger(FoodWaveView.class);
public List<Product> getProducts() { public List<Product> getProducts() {
return productbeanlocal.getProducts(); List<Product> ret = productbeanlocal.getProducts();
ret.removeAll(template.getProducts());
return ret;
} }
public void onEdit() { public void onEdit() {
...@@ -143,22 +147,22 @@ public class FoodWaveView extends GenericCDIView { ...@@ -143,22 +147,22 @@ public class FoodWaveView extends GenericCDIView {
super.beginConversation(); super.beginConversation();
} }
} }
public List<FoodwaveProductSummary> getProductSummaries() { public List<FoodwaveProductSummary> getProductSummaries() {
System.out.println("..asdfasdf"); System.out.println("..asdfasdf");
HashMap<Product, FoodwaveProductSummary> pmap = new HashMap<Product, FoodwaveProductSummary>(); HashMap<Product, FoodwaveProductSummary> pmap = new HashMap<Product, FoodwaveProductSummary>();
for(AccountEvent ae : getSelectedFoodWave().getAccountEvents()) { for (AccountEvent ae : getSelectedFoodWave().getAccountEvents()) {
if(!pmap.containsKey(ae.getProduct())) { if (!pmap.containsKey(ae.getProduct())) {
pmap.put(ae.getProduct(), new FoodwaveProductSummary(ae.getProduct(), new BigDecimal(0), new BigDecimal(0))); pmap.put(ae.getProduct(), new FoodwaveProductSummary(ae.getProduct(), new BigDecimal(0), new BigDecimal(0)));
} }
System.out.println(".."); System.out.println("..");
pmap.get(ae.getProduct()).add(ae); pmap.get(ae.getProduct()).add(ae);
} }
System.out.println("::"+pmap.values().size()); System.out.println("::" + pmap.values().size());
return new ArrayList<FoodwaveProductSummary>(pmap.values()); return new ArrayList<FoodwaveProductSummary>(pmap.values());
} }
private void createNewProductSkeleton() { private void createNewProductSkeleton() {
...@@ -222,9 +226,9 @@ public class FoodWaveView extends GenericCDIView { ...@@ -222,9 +226,9 @@ public class FoodWaveView extends GenericCDIView {
public void initFoodWaveOrderList() { public void initFoodWaveOrderList() {
if (super.requirePermissions(ShopPermission.MANAGE_FOODWAVES) && selectedFoodWave == null) { if (super.requirePermissions(ShopPermission.MANAGE_FOODWAVES) && selectedFoodWave == null) {
System.out.println("Testiä");
selectedFoodWave = foodWaveBean.findFoodwave(foodWaveId);
selectedFoodWave = foodWaveBean.findFoodwave(foodWaveId);
logger.debug("Got foodwave {} with id {}", selectedFoodWave, foodWaveId);
this.setAccountEventLines(new ListDataModel<AccountEvent>(selectedFoodWave.getAccountEvents())); this.setAccountEventLines(new ListDataModel<AccountEvent>(selectedFoodWave.getAccountEvents()));
List<BillLine> tmpLines = new ArrayList<BillLine>(); List<BillLine> tmpLines = new ArrayList<BillLine>();
...@@ -265,7 +269,7 @@ public class FoodWaveView extends GenericCDIView { ...@@ -265,7 +269,7 @@ public class FoodWaveView extends GenericCDIView {
} }
public FoodWave getSelectedFoodWave() { public FoodWave getSelectedFoodWave() {
//System.out.println("APOFKASFASFASFASFASFASFASFASFASFKJIOJIO"); // System.out.println("APOFKASFASFASFASFASFASFASFASFASFKJIOJIO");
return selectedFoodWave; return selectedFoodWave;
} }
......
...@@ -72,7 +72,6 @@ public class ProductShopView extends GenericCDIView { ...@@ -72,7 +72,6 @@ public class ProductShopView extends GenericCDIView {
private boolean blip = false; private boolean blip = false;
private ListDataModel<ProductShopItem> boughtItems; private ListDataModel<ProductShopItem> boughtItems;
@EJB
public void initBillView() { public void initBillView() {
if (requirePermissions(ShopPermission.LIST_USERPRODUCTS) if (requirePermissions(ShopPermission.LIST_USERPRODUCTS)
&& shoppingcart == null) { && shoppingcart == null) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!