Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
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 581d1512
authored
Oct 24, 2013
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AccountEvent fixes
1 parent
e999a1c9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
18 deletions
code/MoyaWeb/WebContent/useradmin/accountEvents.xhtml
code/MoyaWeb/WebContent/useradmin/editAccountevent.xhtml
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_en.properties
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_fi.properties
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/shop/FoodWaveView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/AccountEventView.java
code/MoyaWeb/WebContent/useradmin/accountEvents.xhtml
View file @
581d151
<!DOCTYPE html
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
"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"
<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:users=
"http://java.sun.com/jsf/composite/cditools/user"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:users=
"http://java.sun.com/jsf/composite/cditools/user"
xmlns:f=
"http://java.sun.com/jsf/core"
>
xmlns:f=
"http://java.sun.com/jsf/core"
>
<h:body>
<h:body>
<ui:composition
template=
"#{sessionHandler.template}"
>
<ui:composition
template=
"#{sessionHandler.template}"
>
<f:metadata>
<f:metadata>
...
@@ -64,12 +62,16 @@
...
@@ -64,12 +62,16 @@
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['accountEvent.delivered']}"
/>
<h:outputText
value=
"#{i18n['accountEvent.delivered']}"
/>
</f:facet>
</f:facet>
<h:outputText
rendered=
"#{!empty ac.delivered}"
value=
"#{ac.delivered.time}"
>
<h:outputText
rendered=
"#{!empty ac.delivered}"
value=
"#{ac.delivered.time}"
>
<f:convertDateTime
pattern=
"#{sessionHandler.datetimeFormat}"
timeZone=
"#{sessionHandler.timezone}"
/>
<f:convertDateTime
pattern=
"#{sessionHandler.datetimeFormat}"
timeZone=
"#{sessionHandler.timezone}"
/>
</h:outputText>
</h:outputText>
</h:column>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['accountEvent.foodwave']}"
/>
</f:facet>
<h:outputText
rendered=
"#{!empty ac.foodWave}"
value=
"#{ac.foodWave.name}"
/>
</h:column>
<h:column>
<h:column>
<h:link
outcome=
"/useradmin/editAccountevent"
value=
"#{i18n['accountEvent.edit']}"
>
<h:link
outcome=
"/useradmin/editAccountevent"
value=
"#{i18n['accountEvent.edit']}"
>
...
...
code/MoyaWeb/WebContent/useradmin/editAccountevent.xhtml
View file @
581d151
...
@@ -19,30 +19,40 @@
...
@@ -19,30 +19,40 @@
<h:form
id=
"acform"
>
<h:form
id=
"acform"
>
<h:panelGrid
columns=
"3"
>
<h:panelGrid
columns=
"3"
>
<h:outputLabel
for=
"user"
value=
"#{i18n['account
e
vent.user']}"
/>
<h:outputLabel
for=
"user"
value=
"#{i18n['account
E
vent.user']}"
/>
<h:outputText
id=
"user"
value=
"#{accountEventView.accountevent.user.user.id} / #{accountEventView.accountevent.user.user.wholeName}"
/>
<h:outputText
id=
"user"
value=
"#{accountEventView.accountevent.user.user.id} / #{accountEventView.accountevent.user.user.wholeName}"
/>
<h:message
for=
"user"
/>
<h:message
for=
"user"
/>
<h:outputLabel
for=
"price"
value=
"#{i18n['account
e
vent.price']}"
/>
<h:outputLabel
for=
"price"
value=
"#{i18n['account
E
vent.price']}"
/>
<h:inputText
id=
"price"
value=
"#{accountEventView.accountevent.unitPrice}"
>
<h:inputText
id=
"price"
value=
"#{accountEventView.accountevent.unitPrice}"
>
<f:convertNumber
minFractionDigits=
"0"
maxFractionDigits=
"4"
/>
<f:convertNumber
minFractionDigits=
"0"
maxFractionDigits=
"4"
/>
</h:inputText>
</h:inputText>
<h:message
for=
"price"
/>
<h:message
for=
"price"
/>
<h:outputLabel
for=
"quantity"
value=
"#{i18n['account
e
vent.quantity']}"
/>
<h:outputLabel
for=
"quantity"
value=
"#{i18n['account
E
vent.quantity']}"
/>
<h:inputText
id=
"quantity"
value=
"#{accountEventView.accountevent.quantity}"
>
<h:inputText
id=
"quantity"
value=
"#{accountEventView.accountevent.quantity}"
>
<f:convertNumber
minFractionDigits=
"0"
maxFractionDigits=
"4"
/>
<f:convertNumber
minFractionDigits=
"0"
maxFractionDigits=
"4"
/>
</h:inputText>
</h:inputText>
<h:message
for=
"quantity"
/>
<h:message
for=
"quantity"
/>
<h:outputLabel
for=
"time"
value=
"#{i18n['account
event.quantity
']}"
/>
<h:outputLabel
for=
"time"
value=
"#{i18n['account
Event.eventTime
']}"
/>
<p:calendar
id=
"time"
value=
"#{accountEventView.accountevent.eventTime.time}"
pattern=
"#{sessionHandler.datetimeFormat}"
timeZone=
"#{sessionHandler.timezone}"
/>
<p:calendar
id=
"time"
value=
"#{accountEventView.accountevent.eventTime.time}"
pattern=
"#{sessionHandler.datetimeFormat}"
timeZone=
"#{sessionHandler.timezone}"
/>
<h:message
for=
"time"
/>
<h:message
for=
"time"
/>
<h:outputLabel
for=
"fw"
value=
"#{i18n['accountEvent.foodwave']}"
/>
<h:link
id=
"fw"
value=
"#{accountEventView.accountevent.foodWave.name}"
outcome=
"/foodmanager/listOrders"
>
<f:param
name=
"foodwaveid"
value=
"#{accountEventView.accountevent.foodWave.id}"
/>
</h:link>
<h:message
for=
"fw"
/>
<h:outputLabel
for=
"delivered"
value=
"#{i18n['accountEvent.delivered']}"
/>
<p:calendar
id=
"delivered"
value=
"#{accountEventView.accountevent.delivered.time}"
pattern=
"#{sessionHandler.datetimeFormat}"
timeZone=
"#{sessionHandler.timezone}"
/>
<h:message
for=
"delivered"
/>
</h:panelGrid>
</h:panelGrid>
<h:commandButton
action=
"#{accountEventView.save()}"
rendered=
"#{accountEventView.canSave}"
value=
"#{i18n['account
e
vent.save']}"
/>
<h:commandButton
action=
"#{accountEventView.save()}"
rendered=
"#{accountEventView.canSave}"
value=
"#{i18n['account
E
vent.save']}"
/>
<h:commandButton
action=
"#{accountEventView.delete()}"
rendered=
"#{accountEventView.canSave}"
value=
"#{i18n['account
e
vent.delete']}"
/>
<h:commandButton
action=
"#{accountEventView.delete()}"
rendered=
"#{accountEventView.canSave}"
value=
"#{i18n['account
E
vent.delete']}"
/>
</h:form>
</h:form>
</ui:define>
</ui:define>
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_en.properties
View file @
581d151
...
@@ -8,15 +8,20 @@ acc_line.quantity = Quantity
...
@@ -8,15 +8,20 @@ acc_line.quantity = Quantity
acc_line.time
=
Transaction Date
acc_line.time
=
Transaction Date
accountEvent.commit
=
Save
accountEvent.commit
=
Save
accountEvent.delete
=
Delete
accountEvent.delivered
=
Delivered
accountEvent.delivered
=
Delivered
accountEvent.edit
=
Edit
accountEvent.edit
=
Edit
accountEvent.eventTime
=
Time
accountEvent.eventTime
=
Time
accountEvent.foodwave
=
Foodwave
accountEvent.inventoryQuantity
=
Inventory Count
accountEvent.inventoryQuantity
=
Inventory Count
accountEvent.price
=
Price
accountEvent.productname
=
Product
accountEvent.productname
=
Product
accountEvent.quantity
=
Count
accountEvent.quantity
=
Count
accountEvent.save
=
Save
accountEvent.seller
=
Sold by
accountEvent.seller
=
Sold by
accountEvent.total
=
Total
accountEvent.total
=
Total
accountEvent.unitPrice
=
Unit price
accountEvent.unitPrice
=
Unit price
accountEvent.user
=
User
actionlog.create.header
=
Create new actionmessage
actionlog.create.header
=
Create new actionmessage
actionlog.create.message
=
Message
actionlog.create.message
=
Message
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_fi.properties
View file @
581d151
...
@@ -8,15 +8,20 @@ acc_line.quantity = M\u00E4\u00E4r\u00E4
...
@@ -8,15 +8,20 @@ acc_line.quantity = M\u00E4\u00E4r\u00E4
acc_line.time
=
Ostoaika
acc_line.time
=
Ostoaika
accountEvent.commit
=
Tallenna
accountEvent.commit
=
Tallenna
accountEvent.delete
=
Poista
accountEvent.delivered
=
Toimitettu
accountEvent.delivered
=
Toimitettu
accountEvent.edit
=
Muokkaa
accountEvent.edit
=
Muokkaa
accountEvent.eventTime
=
Aika
accountEvent.eventTime
=
Aika
accountEvent.foodwave
=
Ruokatilaus
accountEvent.inventoryQuantity
=
Varastossa
accountEvent.inventoryQuantity
=
Varastossa
accountEvent.price
=
Hinta
accountEvent.productname
=
Tuote
accountEvent.productname
=
Tuote
accountEvent.quantity
=
Lkm
accountEvent.quantity
=
Lkm
accountEvent.save
=
Tallenna
accountEvent.seller
=
Myyj
\u
00E4
accountEvent.seller
=
Myyj
\u
00E4
accountEvent.total
=
Yhteens
\u
00E4
accountEvent.total
=
Yhteens
\u
00E4
accountEvent.unitPrice
=
Yksikk
\u
00F6hinta
accountEvent.unitPrice
=
Yksikk
\u
00F6hinta
accountEvent.user
=
K
\u
00E4ytt
\u
00E4j
\u
00E4
actionlog.create.header
=
Luo uusi ActionMessage
actionlog.create.header
=
Luo uusi ActionMessage
actionlog.create.message
=
Viesti
actionlog.create.message
=
Viesti
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/shop/FoodWaveView.java
View file @
581d151
...
@@ -79,7 +79,7 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -79,7 +79,7 @@ public class FoodWaveView extends GenericCDIView {
public
void
onEdit
()
{
public
void
onEdit
()
{
this
.
foodWaveBean
.
saveTemplate
(
template
);
this
.
foodWaveBean
.
saveTemplate
(
template
);
}
}
public
void
onEditFoodWave
()
{
public
void
onEditFoodWave
()
{
FoodWave
fw
=
foodWaves
.
getRowData
();
FoodWave
fw
=
foodWaves
.
getRowData
();
this
.
foodWaveBean
.
merge
(
fw
);
this
.
foodWaveBean
.
merge
(
fw
);
...
@@ -92,8 +92,8 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -92,8 +92,8 @@ public class FoodWaveView extends GenericCDIView {
public
void
initFoodwaveManagerList
()
{
public
void
initFoodwaveManagerList
()
{
if
(
super
.
requirePermissions
(
ShopPermission
.
MANAGE_FOODWAVES
))
if
(
super
.
requirePermissions
(
ShopPermission
.
MANAGE_FOODWAVES
))
{
{
if
(
foodWaves
==
null
)
{
if
(
foodWaves
==
null
)
{
super
.
beginConversation
();
super
.
beginConversation
();
foodWaves
=
new
ListDataModel
<
FoodWave
>(
foodWaveBean
.
getEventFoodWaves
());
foodWaves
=
new
ListDataModel
<
FoodWave
>(
foodWaveBean
.
getEventFoodWaves
());
}
}
...
@@ -231,7 +231,7 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -231,7 +231,7 @@ public class FoodWaveView extends GenericCDIView {
public
String
markBillPaid
()
{
public
String
markBillPaid
()
{
if
(
permbean
.
hasPermission
(
BillPermission
.
WRITE_ALL
)
&&
getBillLines
().
isRowAvailable
())
{
if
(
permbean
.
hasPermission
(
BillPermission
.
WRITE_ALL
)
&&
getBillLines
().
isRowAvailable
())
{
Bill
b
=
getBillLines
().
getRowData
().
getBill
();
Bill
b
=
getBillLines
().
getRowData
().
getBill
();
b
=
getBillbean
()
.
markPaid
(
b
,
Calendar
.
getInstance
());
b
=
billbean
.
markPaid
(
b
,
Calendar
.
getInstance
());
foodWaveId
=
selectedFoodWave
.
getId
();
foodWaveId
=
selectedFoodWave
.
getId
();
selectedFoodWave
=
null
;
selectedFoodWave
=
null
;
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/AccountEventView.java
View file @
581d151
...
@@ -53,7 +53,7 @@ public class AccountEventView extends GenericCDIView {
...
@@ -53,7 +53,7 @@ public class AccountEventView extends GenericCDIView {
public
String
delete
()
public
String
delete
()
{
{
accounteventbean
.
delete
(
accountevent
);
userview
.
setUser
(
accounteventbean
.
delete
(
accountevent
)
);
return
"/useradmin/accountEvents"
;
return
"/useradmin/accountEvents"
;
}
}
...
...
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