Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 31880a33
authored
Oct 27, 2012
by
Riku Silvola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
foodwaves
1 parent
6228cb68
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
100 additions
and
46 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
code/LanBortalWeb/WebContent/foodadmin/editTemplate.xhtml
code/LanBortalWeb/WebContent/foodmanager/listFoodwaves.xhtml
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
code/LanBortalWeb/WebContent/useradmin/list.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en_ST.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi_IN.properties
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
View file @
31880a3
...
...
@@ -54,9 +54,6 @@ public class FoodWave extends GenericEntity {
@OneToMany
(
mappedBy
=
"foodwave"
)
private
List
<
BillLine
>
billLines
;
@OneToMany
(
mappedBy
=
"foodwave"
)
private
List
<
BillLine
>
unpaidBills
;
@ManyToOne
@JoinColumn
(
name
=
"template_id"
,
referencedColumnName
=
"id"
,
nullable
=
false
)
private
FoodWaveTemplate
template
;
...
...
@@ -197,12 +194,4 @@ public class FoodWave extends GenericEntity {
this
.
maximumFoods
=
maximumFoods
;
}
public
List
<
BillLine
>
getUnpaidBills
()
{
return
unpaidBills
;
}
public
void
setUnpaidBills
(
List
<
BillLine
>
unpaidBills
)
{
this
.
unpaidBills
=
unpaidBills
;
}
}
code/LanBortalWeb/WebContent/foodadmin/editTemplate.xhtml
View file @
31880a3
...
...
@@ -23,8 +23,9 @@
</ui:define>
<ui:define
name=
"content"
>
<h:form>
<p:panel
header=
"#{i18n['foodwavetemplate.edit']}"
>
<h:form>
<h:panelGrid
columns=
"3"
>
<h:outputLabel
for=
"name"
value=
"#{i18n['foodwave.template.name']}"
/>
...
...
@@ -41,15 +42,18 @@
<h:commandButton
action=
"#{foodWaveView.saveTemplate()}"
value=
"#{i18n['foodwavetemplate.save']}"
/>
</h:panelGrid>
<!-- <h:selectOneMenu value="#{foodWaveView.currentProduct}"
</h:form>
<h:form>
<h:selectOneMenu
value=
"#{foodWaveView.currentProduct}"
converter=
"#{productConverter}"
>
<f:selectItems
value=
"#{foodWaveView.products}"
var=
"product"
itemLabel=
"#{product.name}"
></f:selectItems>
</h:selectOneMenu>
<p:commandButton
value=
"#{i18n['foodwavetemplate.addproduct']}"
actionListener=
"#{foodWaveView.addProductToTemplate}"
update="productTable" /> -->
ajax=
"false"
/>
</h:form>
<h:form>
<h:panelGrid
columns=
"4"
>
<h:outputText
value=
"#{i18n['foodwavetemplate.productname']}"
/>
...
...
@@ -67,10 +71,11 @@
<p:commandButton
value=
"#{i18n['foodwavetemplate.addproduct']}"
actionListener=
"#{foodWaveView.addProductToTemplate}"
update=
"productTabl
e"
/>
ajax=
"fals
e"
/>
</h:panelGrid>
</h:form>
<h:form>
<p:dataTable
name=
"productTable"
id=
"productTable"
value=
"#{foodWaveView.template.products}"
var=
"product"
editable=
"true"
>
...
...
@@ -126,8 +131,8 @@
<h:commandButton
action=
"#{foodWaveView.saveTemplate()}"
value=
"#{i18n['foodwavetemplate.savetemplate']}"
/>
<!-- -->
</p:panel>
</h:form>
</p:panel>
<h:form>
<p:panel
header=
"#{i18n['foodwavetemplate.createwave']}"
>
<h:panelGrid
columns=
"3"
>
...
...
code/LanBortalWeb/WebContent/foodmanager/listFoodwaves.xhtml
View file @
31880a3
...
...
@@ -56,7 +56,7 @@
<f:facet
name=
"header"
>
<h:outputText
value=
"${i18n['foodWave.unconfirmedOrders']}"
/>
</f:facet>
<h:outputText
value=
"#{foodwave.
billLine
s.size()}"
/>
<h:outputText
value=
"#{foodwave.
unpaidBill
s.size()}"
/>
</p:column>
<p:column>
<f:facet
name=
"header"
>
...
...
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
View file @
31880a3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:foodwave=
"http://java.sun.com/jsf/composite/cditools/foodwave"
xmlns:users=
"http://java.sun.com/jsf/composite/cditools/user"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:foodwave=
"http://java.sun.com/jsf/composite/cditools/foodwave"
xmlns:users=
"http://java.sun.com/jsf/composite/cditools/user"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:p=
"http://primefaces.org/ui"
>
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<f:viewParam
name=
"foodwaveid"
value=
"#{foodWaveView.foodWaveId}"
/>
<f:event
type=
"preRenderView"
listener=
"#{foodWaveView.initFoodWaveOrderList}"
/>
<f:event
type=
"preRenderView"
listener=
"#{foodWaveView.initFoodWaveOrderList}"
/>
<!-- <f:event type="preRenderView" listener="#{foodWaveView.initFoodwaveAccountEventList}" /> -->
</f:metadata>
<ui:define
name=
"title"
>
<h1>
fixme
</h1>
<h1>
#{foodWaveView.foodWave.name}
</h1>
</ui:define>
<ui:define
name=
"content"
>
<h:form>
<p:dataTable
styleClass=
"bordertable"
value=
"#{foodWaveView.billLines}"
var=
"bill_line"
>
<p:dataTable
styleClass=
"bordertable"
value=
"#{foodWaveView.billLines}"
var=
"bill_line"
>
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['foodWave.billLines']}"
/>
</f:facet>
...
...
@@ -25,14 +33,16 @@
<h:outputLabel
value=
"#{i18n['billLine.time']}"
/>
</f:facet>
<h:outputText
value=
"#{bill_line.bill.sentDate.getTime()}"
>
<f:convertDateTime
pattern=
"
hh:mm d/M/yy
"
/>
<f:convertDateTime
pattern=
"
#{sessionHandler.datetimeFormat}
"
/>
</h:outputText>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['billLine.quantity']}"
/>
</f:facet>
<h:outputText
value=
"#{bill_line.quantity}"
/>
<h:outputText
style=
"text-align: center;"
value=
"#{bill_line.quantity}"
>
<f:convertNumber
minFractionDigits=
"2"
maxFractionDigits=
"2"
/>
</h:outputText>
</p:column>
<p:column>
<f:facet
name=
"header"
>
...
...
@@ -44,7 +54,8 @@
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['billLine.eventuser']}"
/>
</f:facet>
<h:link
outcome=
"/useradmin/edit"
value=
"#{bill_line.bill.user.wholeName}"
>
<h:link
outcome=
"/useradmin/edit"
value=
"#{bill_line.bill.user.wholeName}"
>
<f:param
name=
"userid"
value=
"#{bill_line.bill.user.id}"
/>
</h:link>
</p:column>
...
...
@@ -52,7 +63,8 @@
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['billLine.nick']}"
/>
</f:facet>
<h:link
outcome=
"/useradmin/edit"
value=
"#{bill_line.bill.user.nick}"
>
<h:link
outcome=
"/useradmin/edit"
value=
"#{bill_line.bill.user.nick}"
>
<f:param
name=
"userid"
value=
"#{bill_line.bill.user.id}"
/>
</h:link>
</p:column>
...
...
@@ -60,18 +72,23 @@
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['billLine.price']}"
/>
</f:facet>
<h:outputText
value=
"#{bill_line.linePrice}"
/>
<h:outputText
style=
"text-align: center;"
value=
"#{bill_line.linePrice}"
>
<f:convertNumber
minFractionDigits=
"2"
maxFractionDigits=
"2"
/>
</h:outputText>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['bill.totalprice']}"
/>
</f:facet>
<h:outputText
value=
"#{bill_line.bill.totalPrice}"
/>
<h:outputText
style=
"text-align: center;"
value=
"#{bill_line.bill.totalPrice}"
>
<f:convertNumber
minFractionDigits=
"2"
maxFractionDigits=
"2"
/>
</h:outputText>
</p:column>
<p:column>
<h:commandButton
value=
"#{i18n['bill.markPaid']}"
action=
"#{foodWaveView.markBillPaid}"
/>
<h:commandButton
value=
"#{i18n['bill.markPaid']}"
action=
"#{foodWaveView.markBillPaid}"
/>
</p:column>
<!--
<p:column>
...
...
@@ -87,23 +104,28 @@
<h:outputLabel
value=
"#{i18n['foodwave.orders']}"
/>
</h1>
<h:form>
<p:dataTable
styleClass=
"bordertable"
value=
"#{foodWaveView.accountEventLines}"
var=
"acc_line"
>
<f:facet
name=
"header"
>
<p:dataTable
styleClass=
"bordertable"
value=
"#{foodWaveView.accountEventLines}"
var=
"acc_line"
>
<!-- <f:facet name="header">
<h:outputLabel value="#{i18n['foodWave.accountevents']}" />
</f:facet>
</f:facet>
-->
<p:column>
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['acc_line
s
.time']}"
/>
<h:outputLabel
value=
"#{i18n['acc_line.time']}"
/>
</f:facet>
<h:outputText
value=
"#{acc_line.eventTime.getTime()}"
>
<f:convertDateTime
pattern=
"hh:mm d/M/yy"
/>
<h:outputText
style=
"text-align: center;"
value=
"#{acc_line.eventTime.getTime()}"
>
<f:convertDateTime
pattern=
"#{sessionHandler.datetimeFormat}"
timeZone=
"#{sessionHandler.timezone}"
/>
</h:outputText>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['acc_line.quantity']}"
/>
</f:facet>
<h:outputText
value=
"#{acc_line.quantity}"
/>
<h:outputText
style=
"text-align: center;"
value=
"#{acc_line.quantity}"
>
<f:convertNumber
minFractionDigits=
"2"
maxFractionDigits=
"2"
/>
</h:outputText>
</p:column>
<p:column>
<f:facet
name=
"header"
>
...
...
@@ -115,7 +137,8 @@
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['acc_line.eventuser']}"
/>
</f:facet>
<h:link
outcome=
"/useradmin/edit"
value=
"#{acc_line.user.wholeName}"
>
<h:link
outcome=
"/useradmin/edit"
value=
"#{acc_line.user.wholeName}"
>
<f:param
value=
"#{acc_line.user.id}"
/>
</h:link>
</p:column>
...
...
@@ -131,8 +154,11 @@
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['accountEvent.delivered']}"
/>
</f:facet>
<h:outputText
rendered=
"#{acc_line.eventDelivered}"
value=
"#{i18n['accountEvent.delivered']}"
/>
<h:commandButton
rendered=
"#{not acc_line.eventDelivered}"
value=
"#{i18n['accountEvent.deliver']}"
action=
"#{foodWaveView.deliverAccountEvent}"
/>
<h:outputText
rendered=
"#{acc_line.eventDelivered}"
value=
"#{i18n['accountEvent.delivered']}"
/>
<h:commandButton
rendered=
"#{not acc_line.eventDelivered}"
value=
"#{i18n['accountEvent.deliver']}"
action=
"#{foodWaveView.deliverAccountEvent}"
/>
</p:column>
</p:dataTable>
...
...
@@ -143,8 +169,8 @@
<br
/>
<br
/>
<foodwave:summary
foodwaveProductSummaries=
"#{foodWaveView.productSummaries}"
foodwave=
"#{foodWaveView.selectedFoodWave}"
/>
<
!-- <
foodwave:summary foodwaveProductSummaries="#{foodWaveView.productSummaries}" foodwave="#{foodWaveView.selectedFoodWave}"/>
-->
</ui:define>
...
...
code/LanBortalWeb/WebContent/useradmin/list.xhtml
View file @
31880a3
...
...
@@ -51,7 +51,7 @@
<h:outputText
value=
" #{userCartView.userCartSize}"
/>
<h:commandButton
action=
"#{userCartView.clearCart()}"
value=
"#{i18n['usercart.clear']}"
/>
<br
/>
<h:commandButton
actionListener=
"#{userSearchView.addToCart}"
value=
"#{i18n['usercart.addSearche
r
Users']}"
/>
<h:commandButton
actionListener=
"#{userSearchView.addToCart}"
value=
"#{i18n['usercart.addSearche
d
Users']}"
/>
<h:commandButton
action=
"#{userCartView.traverse}"
value=
"#{i18n['usercart.traverse']}"
/>
</div>
</h:panelGroup>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n.properties
View file @
31880a3
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en.properties
View file @
31880a3
acc_line.eventuser
=
Customer
acc_line.nick
=
Nick
acc_line.product
=
Product
acc_line.quantity
=
Quantity
acc_line.time
=
Transaction Date
accountEvent.commit
=
Save
accountEvent.delivered
=
Delivered
accountEvent.edit
=
Edit
...
...
@@ -63,6 +69,14 @@ bill.sentDate = Sent date
bill.show
=
Show
bill.theirReference
=
Clients reference
bill.totalPrice
=
Total
bill.totalprice
=
Total
billLine.eventuser
=
Customer
billLine.nick
=
Nick
billLine.price
=
Unit Price
billLine.product
=
Product
billLine.quantity
=
Quantity
billLine.time
=
Order Date
billedit.billnotfound
=
Bill not found. Select again.
...
...
@@ -182,6 +196,7 @@ eventorganiser.name = Eventorganiser
food
=
Food
foodWave.billLines
=
Pending Online Payments
foodWave.description
=
Description
foodWave.list
=
FoodWave Listing
foodWave.name
=
Foodwave
...
...
@@ -198,6 +213,7 @@ foodWave.unconfirmedOrders = Unconfirmed
foodshop.buyFromCounter
=
Pay at info
foodshop.buyFromInternet
=
Pay at Internet
foodwave.orders
=
Foodwave Orders
foodwave.template.basicinfo
=
Template Information
foodwave.template.edit.title
=
Foodwave Template Editor
foodwave.template.list.title
=
Foodwave Templates
...
...
@@ -751,6 +767,7 @@ userView.image = Image
usercart.addSearchedUsers
=
Add searched users
usercart.cartsize
=
Size
usercart.clear
=
Clear Cart
usercart.showCart
=
Show usercart
usercart.traverse
=
Traverse
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en_ST.properties
View file @
31880a3
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
View file @
31880a3
acc_line.eventuser
=
Asiakas
acc_line.nick
=
Nimimerkki
acc_line.product
=
Tuote
acc_line.quantity
=
M
\u
00E4
\u
00E4r
\u
00E4
acc_line.time
=
Ostoaika
accountEvent.commit
=
Tallenna
accountEvent.delivered
=
Toimitettu
accountEvent.edit
=
Muokkaa
...
...
@@ -63,6 +69,14 @@ bill.sentDate = P\u00E4iv\u00E4ys
bill.show
=
N
\u
00E4yt
\u
00E4
bill.theirReference
=
Asiakkaan viite
bill.totalPrice
=
Laskun summa
bill.totalprice
=
Yhteens
\u
00E4
billLine.eventuser
=
Asiakas
billLine.nick
=
Nimimerkki
billLine.price
=
Kappalehinta
billLine.product
=
Tuote
billLine.quantity
=
M
\u
00E4
\u
00E4r
\u
00E4
billLine.time
=
Tilausaika
billine.linePrice
=
Yhteens
\u
00E4
billine.name
=
Tuote
...
...
@@ -180,6 +194,7 @@ eventorganiser.name = Tapahtumaj\u00E4rjest\u00E4j\u00E4
food
=
Ruoka
foodWave.billLines
=
Maksamattomat Verkkomaksut
foodWave.description
=
Kuvaus
foodWave.list
=
Ruokatilausten listaus
foodWave.name
=
Ruokatilaus
...
...
@@ -196,6 +211,7 @@ foodWave.unconfirmedOrders = Vahvistamattomia
foodshop.buyFromCounter
=
Maksa infossa
foodshop.buyFromInternet
=
Maksa Internetiss
\u
00E4
foodwave.orders
=
Maksetut Tilaukset
foodwave.template.basicinfo
=
Template Infot
foodwave.template.edit.title
=
Foodwave Template Editori
foodwave.template.list.title
=
Ruokatilaus Templatet
...
...
@@ -731,6 +747,7 @@ userView.image = Kuva
usercart.addSearchedUsers
=
Lis
\u
00E4
\u
00E4 haetut k
\u
00E4ytt
\u
00E4j
\u
00E4t
usercart.cartsize
=
Koko
usercart.clear
=
Tyhjenn
\u
00E4 k
\u
00E4ytt
\u
00E4j
\u
00E4kori
usercart.showCart
=
K
\u
00E4ytt
\u
00E4j
\u
00E4kori
usercart.traverse
=
K
\u
00E4y l
\u
00E4pi
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi_IN.properties
View file @
31880a3
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
View file @
31880a3
...
...
@@ -264,7 +264,7 @@ public class FoodWaveView extends GenericCDIView {
}
public
FoodWave
getSelectedFoodWave
()
{
System
.
out
.
println
(
"APOFKASFASFASFASFASFASFASFASFASFKJIOJIO"
);
//
System.out.println("APOFKASFASFASFASFASFASFASFASFASFKJIOJIO");
return
selectedFoodWave
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment